Re: /usr/lib/clang

2019-08-13 Thread Theo de Raadt
Jan Stary  wrote:

> On Aug 13 08:21:55, dera...@openbsd.org wrote:
> > The installer code in question is:
> > 
> > if [[ -f /mnt/usr/bin/clang ]]; then
> > CVER=$(cd /mnt/usr/lib/clang && ls -r | sed -e 1q)
> > rm -rf -- `ls -d /mnt/usr/lib/clang/* | grep -v "${CVER}$"`
> > fi
> > 
> > -f is used instead of -d, in case someone tweaked their install by
> > moving the space then making a symbolic link back to it.
> 
> That's [[ -f /mnt/usr/bin/clang ]], not /mnt/usr/lib/clang,
> so [[ -d /mnt/usr/bin/clang ]] wouldn't make sense, right?
> 
> > Anyways, existance then failure to cd indicates something is really
> > screwed about your machine.
> > Your mail provides insufficient information to diagnose this further.
> 
> Indeed, I didn't say I was upgrading all the way back from 6.0-current.
> Perhaps that's how (/mnt)/usr/bin/clang was already present
> without the (/mnt)/usr/lib/clang directory?

Yes, to support clang a few pieces were moved to base.  That's why.



Re: /usr/lib/clang

2019-08-13 Thread Jan Stary
On Aug 13 08:21:55, dera...@openbsd.org wrote:
> The installer code in question is:
> 
> if [[ -f /mnt/usr/bin/clang ]]; then
> CVER=$(cd /mnt/usr/lib/clang && ls -r | sed -e 1q)
> rm -rf -- `ls -d /mnt/usr/lib/clang/* | grep -v "${CVER}$"`
> fi
> 
> -f is used instead of -d, in case someone tweaked their install by
> moving the space then making a symbolic link back to it.

That's [[ -f /mnt/usr/bin/clang ]], not /mnt/usr/lib/clang,
so [[ -d /mnt/usr/bin/clang ]] wouldn't make sense, right?

> Anyways, existance then failure to cd indicates something is really
> screwed about your machine.
> Your mail provides insufficient information to diagnose this further.

Indeed, I didn't say I was upgrading all the way back from 6.0-current.
Perhaps that's how (/mnt)/usr/bin/clang was already present
without the (/mnt)/usr/lib/clang directory?

> Jan Stary  wrote:
> 
> > At the end of upgrading to a current/i386 (dmesg below),
> > the upgrade script said:
> > 
> > /upgrade: cd: /mnt/usr/lib/clang - No such file or directory
> > ls: /mnt/usr/lib/clang/*: No such file or directory
> > Making all device nodes... done
> > Relinking to create unique kernel...
> > 
> > The upgrade finishes successfully; after the reboot,
> > everything seems to work fine, and /usr/lib/clang/ contains
> > 8.0.0/include full of header files (I did choose the comp66.tgz
> > set during the upgrade).
> > 
> > Jan
> > 
> > OpenBSD 6.6-beta (GENERIC) #0: Sun Aug 11 04:18:00 CEST 2019
> > h...@www.stare.cz:/usr/src/sys/arch/i386/compile/GENERIC
> > real mem  = 259207168 (247MB)
> > avail mem = 238747648 (227MB)
> > mpath0 at root
> > scsibus0 at mpath0: 256 targets
> > mainbus0 at root
> > bios0 at mainbus0: date 07/19/10, BIOS32 rev. 0 @ 0xfa950
> > apm0 at bios0: Power Management spec V1.2 (slowidle)
> > pcibios0 at bios0: rev 2.1 @ 0xf/0xdfb4
> > pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf30/128 (6 entries)
> > pcibios0: PCI Exclusive IRQs: 5 10 11
> > pcibios0: no compatible PCI ICU found: ICU vendor 0x1022 product 0x2090
> > pcibios0: Warning, unable to fix up PCI interrupt routing
> > pcibios0: PCI bus #0 is the last bus
> > bios0: ROM list: 0xc/0x8000 0xc8000/0xa800 0xef000/0x1000!
> > cpu0 at mainbus0: (uniprocessor)
> > cpu0: Geode(TM) Integrated Processor by AMD PCS ("AuthenticAMD" 586-class) 
> > 499 MHz, 05-0a-02
> > cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX,MMXX,3DNOW2,3DNOW
> > mtrr: K6-family MTRR support (2 registers)
> > amdmsr0 at mainbus0
> > pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> > pchb0 at pci0 dev 1 function 0 "AMD Geode LX" rev 0x33
> > vga1 at pci0 dev 1 function 1 "AMD Geode LX Video" rev 0x00
> > wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> > wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> > glxsb0 at pci0 dev 1 function 2 "AMD Geode LX Crypto" rev 0x00: RNG AES
> > vr0 at pci0 dev 13 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 11, 
> > address 00:0d:b9:0e:9e:f4
> > ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 
> > 0x004063, model 0x0034
> > glxpcib0 at pci0 dev 15 function 0 "AMD CS5536 ISA" rev 0x03: rev 3, 32-bit 
> > 3579545Hz timer, watchdog, gpio, i2c
> > gpio0 at glxpcib0: 32 pins
> > iic0 at glxpcib0
> > pciide0 at pci0 dev 15 function 2 "AMD CS5536 IDE" rev 0x01: DMA, channel 0 
> > wired to compatibility, channel 1 wired to compatibility
> > wd0 at pciide0 channel 0 drive 0: 
> > wd0: 1-sector PIO, LBA48, 15259MB, 31250432 sectors
> > wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
> > pciide0: channel 1 ignored (disabled)
> > auglx0 at pci0 dev 15 function 3 "AMD CS5536 Audio" rev 0x01: irq 11, 
> > CS5536 AC97
> > ac97: codec id 0x414c4770 (Avance Logic ALC203 rev 0)
> > ac97: codec features headphone, 20 bit DAC, 18 bit ADC, No 3D Stereo
> > audio0 at auglx0
> > ohci0 at pci0 dev 15 function 4 "AMD CS5536 USB" rev 0x02: irq 5, version 
> > 1.0, legacy support
> > ehci0 at pci0 dev 15 function 5 "AMD CS5536 USB" rev 0x02: irq 5
> > usb0 at ehci0: USB revision 2.0
> > uhub0 at usb0 configuration 1 interface 0 "AMD EHCI root hub" rev 2.00/1.00 
> > addr 1
> > isa0 at glxpcib0
> > isadma0 at isa0
> > com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> > com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
> > pckbc0 at isa0 port 0x60/5 irq 1 irq 12
> > pckbd0 at pckbc0 (kbd slot)
> > wskbd0 at pckbd0: console keyboard, using wsdisplay0
> > pcppi0 at isa0 port 0x61
> > spkr0 at pcppi0
> > lpt0 at isa0 port 0x378/4 irq 7
> > wbsio0 at isa0 port 0x2e/2: W83627HF rev 0x41
> > lm1 at wbsio0 port 0x290/8: W83627HF
> > npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
> > usb1 at ohci0: USB revision 1.0
> > uhub1 at usb1 configuration 1 interface 0 "AMD OHCI root hub" rev 1.00/1.00 
> > addr 1
> > umass0 at uhub0 port 4 configuration 1 interface 0 "Prolific Technology 
> > Inc. Mass Storage Device" rev 2.00/1.00 addr 2
> > umass0: us

Re: Need to clean some space on /usr

2019-08-13 Thread Ingo Schwarze
Hi Jay,

Jay Hart wrote on Tue, Aug 13, 2019 at 08:55:33PM -0400:

> Currently have 6.5 stable installed on my router/firewal.
> 
> My /usr partition is a bit on the "too loaded" side, space wise.
> Its a 2GB partition with 1.8GB being used (175MB being reported as free).
> I also have the following '/usr' dedicated slices (as
> separate partitions):
> 
> /usr/local
> /usr/X11R6
> /usr/obj
> /usr/src
> 
> I haven't been compiling anything since 6.3 or 6.2,
> so I haven't loaded the src tarballs in a while.

I'm not convinced /usr/src/ is really needed on a router/firewall,
in particular not since syspatch(8) has been available since
OpenBSD 6.1.

Having /usr/src/ around can be useful for various purposes:

 * bleeding edge development on -current
 * testing backported security or reliability patches on -stable
 * testing experimental private patches to the base system

But i doubt that a production firewall is a good place for doing
any of that.

The fact that you didn't actually use /usr/src/ for more than a year
confirms my argument that it usually won't be needed.

The only reason i can think of that might make sense for having
/usr/src/ around on a production server is if you want to backport
selected bugfix patches to selected programs that no official patches
are issued for but that matter for you for specific reasons (for
example, i do that for mandoc(1) and man.cgi(8) on man.openbsd.org
which is otherwise running -stable).  That is not a typical need
at all, though.  People choose -stable when low maintenance effort
and low danger of regressions matters more than having all the
latest minor bugs fixed.  So why would you then go ahead and fix
minor issues manually anyway - risking regressions in case you botch
a backport that you do yourself?

All this applies to /usr/xenocara/, too, and even more so.  Few
parts of X11 will ever be used on a firewall, so it is very unlikely
that applying minor patches to xenocara by hand on a firewall
provides any benefit.

> /usr/xenocara currently is using 650MB of space and it looks like
> the last data set installed was Oct of 2018.

On machines where i do install /usr/xenocara/ because i might do X11
developmenmt there, i usually put it on its own partition.  The /usr/
partition does not look like its best home to me in the first place.
For starters, /usr/xenocara/ can be mounted nosuid...

But i don't recall ever installing it on a firewall, or ever using
it on any kind of a server - and that even though i did commit a
number of patches to xenocara in the past.

> I used 'sysclean' to remove all unneeded files this evening.
> 
> Going to assume I can remove all the data within the xenocara
> directory to free up some space.
> Would 'rm -f /usr/xenocara' be the best command to use?

Well, i guess you mean 'rm -rf /usr/xenocara'.

Unless you have put private data or patches somewhere below that
directory that you want to preserve, i don't see how doing that
could adversely affect the operation or maintenenace of a firewall.

> In lieu of cleaning xenocara, what else would you recommend?

/usr/xenocara/ looks like an excellent candidate for removal, even
before using sysclean IMHO, so i don't see much need to look any
further unless you put some other data into the /usr/ partition
that doesn't belong there in the first place.

Yours,
  Ingo



Need to clean some space on /usr

2019-08-13 Thread Jay Hart
Currently have 6.5 stable installed on my router/firewal.

My /usr partition is a bit on the "too loaded" side, space wise.  Its a 2GB 
partition with 1.8GB
being used (175MB being reported as free).  I also have the following '/usr' 
dedicated slices (as
separate partitions):

/usr/local
/usr/X11R6
/usr/obj
/usr/src

I haven't been compiling anything since 6.3 or 6.2, so I haven't loaded the src 
tarballs in a while.

/usr/xenocara currently is using 650MB of space and it looks like the last data 
set installed was
Oct of 2018.

I used 'sysclean' to remove all unneeded files this evening.

Going to assume I can remove all the data within the xenocara directory to free 
up some space.
Would 'rm -f /usr/xenocara' be the best command to use?

In lieu of cleaning xenocara, what else would you recommend?

Thanks in advance.

Jay



Re: IPv6 problems

2019-08-13 Thread Jordan Geoghegan



On 8/13/19 10:11 AM, Thomas Bohl wrote:

Hello,


My hostname.vio0 looks like this:


dhcp

inet6 alias  64



You most likely need to add a route. Add something like this to your 
hostname file:

!route add -inet6 default fe80::1%vio0


Just in case you have the same problem. For whatever reason, after a 
reboot, I have to do this in order to get IPv6 traffic flowing:

ping6 -c 10 fe80::1%vio0


or just add your gateway to your /etc/mygate file.




Re: IPv6 problems

2019-08-13 Thread Brian Brombacher
You can also add a second line to /etc/mygate if you’re using that.

> On Aug 13, 2019, at 1:11 PM, Thomas Bohl  wrote:
> 
> Hello,
> 
>> My hostname.vio0 looks like this:
>> dhcp
>> inet6 alias > provider> 64
>> 
> 
> You most likely need to add a route. Add something like this to your hostname 
> file:
> !route add -inet6 default fe80::1%vio0
> 
> 
> Just in case you have the same problem. For whatever reason, after a reboot, 
> I have to do this in order to get IPv6 traffic flowing:
> ping6 -c 10 fe80::1%vio0
> 



Re: IPv6 problems

2019-08-13 Thread Thomas Bohl

Hello,


My hostname.vio0 looks like this:


dhcp

inet6 alias  64
 


You most likely need to add a route. Add something like this to your 
hostname file:

!route add -inet6 default fe80::1%vio0


Just in case you have the same problem. For whatever reason, after a 
reboot, I have to do this in order to get IPv6 traffic flowing:

ping6 -c 10 fe80::1%vio0



Re: IPv6 problems

2019-08-13 Thread Denis Fondras
On Tue, Aug 13, 2019 at 05:25:43PM +0200, list wrote:
> Hi,
> 
> I have been trying to set up IPv6 on my OpenBSD machine.
> 
> It is running on stable branch. 
> 
> The interface I am trying to configure IPv6 on is "vio".
> 
> My hostname.vio0 looks like this:
> 
> 
> dhcp
> 
> inet6 alias  provider> 64
> 
> 
> But I just can't get it to work. It is not reachable at all. I may not
> be reached and I can't reach anybody else via IPv6.
> 
> 
> I'd appreciate any help.
> 

Perhaps you are missing a route ?

> 
> Thank you for your time.
> 
> 
> With kind regards,
> 
> Stephan
> 



IPv6 problems

2019-08-13 Thread list
Hi,

I have been trying to set up IPv6 on my OpenBSD machine.

It is running on stable branch. 

The interface I am trying to configure IPv6 on is "vio".

My hostname.vio0 looks like this:


dhcp

inet6 alias  64


But I just can't get it to work. It is not reachable at all. I may not
be reached and I can't reach anybody else via IPv6.


I'd appreciate any help.


Thank you for your time.


With kind regards,

Stephan



Re: Good Quality Microphone for Podcasts compatible with OpenBSD

2019-08-13 Thread Samuel Larkin
On August 12, 2019 6:09:36 AM MDT, Jan Stary  wrote:
>Can you please post the mixerctl -av of that?
>
>Have you tried (re)mapping the outputs
>with mixerctl's *_source variables?
>
>Jan

I will try this when I get home from work.



Re: Good Quality Microphone for Podcasts compatible with OpenBSD

2019-08-13 Thread Samuel Larkin
On August 11, 2019 10:34:55 PM MDT, jungle boogie  
wrote:
>Thus said Samuel Larkin  on Sun, 11 Aug 2019 
>19:59:19 -0600


>What are your microphones into the preamp 

I have an AKG p170 and an AudioTechnica ATM 610. I also have a Nady audio TMP-1 
preamp I found at a pawn shop.

> and what software are you 
>using to record on OpenBSD?

I used ardour when recording on linux. I haven't yet decided what I like best 
on OpenBSD.



Re: /usr/lib/clang

2019-08-13 Thread Theo de Raadt
The installer code in question is:

if [[ -f /mnt/usr/bin/clang ]]; then
CVER=$(cd /mnt/usr/lib/clang && ls -r | sed -e 1q)
rm -rf -- `ls -d /mnt/usr/lib/clang/* | grep -v "${CVER}$"`
fi

-f is used instead of -d, in case someone tweaked their install by
moving the space then making a symbolic link back to it.

Anyways, existance then failure to cd indicates something is really
screwed about your machine.

Your mail provides insufficient information to diagnose this further.

Jan Stary  wrote:

> At the end of upgrading to a current/i386 (dmesg below),
> the upgrade script said:
> 
>   /upgrade: cd: /mnt/usr/lib/clang - No such file or directory
>   ls: /mnt/usr/lib/clang/*: No such file or directory
>   Making all device nodes... done
>   Relinking to create unique kernel...
> 
> The upgrade finishes successfully; after the reboot,
> everything seems to work fine, and /usr/lib/clang/ contains
> 8.0.0/include full of header files (I did choose the comp66.tgz
> set during the upgrade).
> 
> Jan
> 
> OpenBSD 6.6-beta (GENERIC) #0: Sun Aug 11 04:18:00 CEST 2019
> h...@www.stare.cz:/usr/src/sys/arch/i386/compile/GENERIC
> real mem  = 259207168 (247MB)
> avail mem = 238747648 (227MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: date 07/19/10, BIOS32 rev. 0 @ 0xfa950
> apm0 at bios0: Power Management spec V1.2 (slowidle)
> pcibios0 at bios0: rev 2.1 @ 0xf/0xdfb4
> pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf30/128 (6 entries)
> pcibios0: PCI Exclusive IRQs: 5 10 11
> pcibios0: no compatible PCI ICU found: ICU vendor 0x1022 product 0x2090
> pcibios0: Warning, unable to fix up PCI interrupt routing
> pcibios0: PCI bus #0 is the last bus
> bios0: ROM list: 0xc/0x8000 0xc8000/0xa800 0xef000/0x1000!
> cpu0 at mainbus0: (uniprocessor)
> cpu0: Geode(TM) Integrated Processor by AMD PCS ("AuthenticAMD" 586-class) 
> 499 MHz, 05-0a-02
> cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX,MMXX,3DNOW2,3DNOW
> mtrr: K6-family MTRR support (2 registers)
> amdmsr0 at mainbus0
> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> pchb0 at pci0 dev 1 function 0 "AMD Geode LX" rev 0x33
> vga1 at pci0 dev 1 function 1 "AMD Geode LX Video" rev 0x00
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> glxsb0 at pci0 dev 1 function 2 "AMD Geode LX Crypto" rev 0x00: RNG AES
> vr0 at pci0 dev 13 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 11, 
> address 00:0d:b9:0e:9e:f4
> ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 
> 0x004063, model 0x0034
> glxpcib0 at pci0 dev 15 function 0 "AMD CS5536 ISA" rev 0x03: rev 3, 32-bit 
> 3579545Hz timer, watchdog, gpio, i2c
> gpio0 at glxpcib0: 32 pins
> iic0 at glxpcib0
> pciide0 at pci0 dev 15 function 2 "AMD CS5536 IDE" rev 0x01: DMA, channel 0 
> wired to compatibility, channel 1 wired to compatibility
> wd0 at pciide0 channel 0 drive 0: 
> wd0: 1-sector PIO, LBA48, 15259MB, 31250432 sectors
> wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
> pciide0: channel 1 ignored (disabled)
> auglx0 at pci0 dev 15 function 3 "AMD CS5536 Audio" rev 0x01: irq 11, CS5536 
> AC97
> ac97: codec id 0x414c4770 (Avance Logic ALC203 rev 0)
> ac97: codec features headphone, 20 bit DAC, 18 bit ADC, No 3D Stereo
> audio0 at auglx0
> ohci0 at pci0 dev 15 function 4 "AMD CS5536 USB" rev 0x02: irq 5, version 
> 1.0, legacy support
> ehci0 at pci0 dev 15 function 5 "AMD CS5536 USB" rev 0x02: irq 5
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 configuration 1 interface 0 "AMD EHCI root hub" rev 2.00/1.00 
> addr 1
> isa0 at glxpcib0
> isadma0 at isa0
> com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
> pckbc0 at isa0 port 0x60/5 irq 1 irq 12
> pckbd0 at pckbc0 (kbd slot)
> wskbd0 at pckbd0: console keyboard, using wsdisplay0
> pcppi0 at isa0 port 0x61
> spkr0 at pcppi0
> lpt0 at isa0 port 0x378/4 irq 7
> wbsio0 at isa0 port 0x2e/2: W83627HF rev 0x41
> lm1 at wbsio0 port 0x290/8: W83627HF
> npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
> usb1 at ohci0: USB revision 1.0
> uhub1 at usb1 configuration 1 interface 0 "AMD OHCI root hub" rev 1.00/1.00 
> addr 1
> umass0 at uhub0 port 4 configuration 1 interface 0 "Prolific Technology Inc. 
> Mass Storage Device" rev 2.00/1.00 addr 2
> umass0: using SCSI over Bulk-Only
> scsibus1 at umass0: 2 targets, initiator 0
> sd0 at scsibus1 targ 1 lun 0:  SCSI0 0/direct fixed 
> serial.067b2506
> sd0: 152627MB, 512 bytes/sector, 312581808 sectors
> vscsi0 at root
> scsibus2 at vscsi0: 256 targets
> softraid0 at root
> scsibus3 at softraid0: 256 targets
> root on wd0a (5162f658323b2b07.a) swap on wd0b dump on wd0b
> 



Invitation for OSS Community Research based in the University of Leeds. Many Thanks!

2019-08-13 Thread Xinming Guo
Dear OpenBSD Community Members,

I am a master student based in the University of Leeds (UK), currently 
conducting a research in regards to investigating how open source software 
community culture, governance and structure, motivation of participation 
influence the innovation capability of OSS community. I found OpenBSD community 
is very active and supportive with members around the world, which makes it 
perfect for this research. I am writing to ask if you could help to take part 
in this research for more accurate results.

This research data is to be collected via questionnaire with the anonymous link 
below:
https://leedsubs.eu.qualtrics.com/jfe/form/SV_cUPSObEbxQqEX1b

The questionnaire should take you 5-10 minutes to complete. Your participation 
is very important to disclose the relationship between community culture, 
governance structure, motivation of participation and the innovation capability 
of OSS community.

I would very much appreciate if you could help to participate this research, 
and if you have any questions about the research, I am happy to answer, just 
e-mail me on bn1...@leeds.ac.uk. Thanks a lot!

Best Regards,

Sophy Guo






APU2/3/4 get ACPI GPIO & IOMMU support

2019-08-13 Thread Noth

Hi all,

  The PC Engines APU2/3/4 mainline firmware was updated this week and 
they've enabled ACPI GPIO calls as well as IOMMU support. I saw tech@ 
got a patch for apugpio in March, maybe it could be updated to use ACPI?


Link to firmware is here: 
https://pcengines.github.io/?utm_source=PC+Engines+Open+Source+Firmware+Release&utm_campaign=8e5255d4da-EMAIL_CAMPAIGN_2019_05_10_09_20_COPY_01&utm_medium=email&utm_term=0_b9727cda45-8e5255d4da-48008233



Cheers,

Noth



Re: lrint(INT_MAX) != INT_MAX

2019-08-13 Thread Boudewijn Dijkstra

Op Fri, 09 Aug 2019 19:19:14 +0200 schreef Jan Stary :

On Jul 31 14:40:42, mailinglists.boudew...@indes.com wrote:

Op Tue, 30 Jul 2019 17:12:56 +0200 schreef :
> This is what happens on my relatively current
> OpenBSD bbb.stare.cz 6.5 GENERIC#0 armv7   (BeagleBone Black)
> OpenBSD ppc.stare.cz 6.5 GENERIC#0 macppc  (an old MacMini)
>
> #include 
> #include 
> #include 
>
> int
> main()
> {
>long l;
>double d = INT_MAX;
>
>l = lrint(d);
>printf("%f is %ld\n", d, l);
>
>l = lround(d);
>printf("%f is %ld\n", d, l);
>
>return 0;
> }
>
> 2147483647.00 is -1
> 2147483647.00 is -1
>
> That doesn't seem right: isn't INT_MAX representable as a long,
> even on these machines where sizeof(int) == sizeof(long)?

If it is less than LONG_MAX, then yes.


Less than, as in strictly less?
Why? Do you mean <= ?


My statement is true for both < and <=, but I guess it would have been  
less confusing if I had written "less then or equal to".



> If so, shouldn't lrint(INT_MAX) == INT_MAX = lround(INT_MAX)?

If the double type provides enough mantisse (which I think it does on  
all

platforms), and if I read a few C standards correctly, then yes.

> On i386 (an ALIX), I see
>
> 2147483647.00 is 2147483647
> 2147483647.00 is -1
>
> so lrint() returns the expected value but lround() does not.
>
> On the amd64s I have, I see the expected:
> 2147483647.00 is 2147483647
> 2147483647.00 is 2147483647
>
> Is this a bug or am I missing something obvious?

I'd say it's a bug. Also with a float variable and with lrintf/lroundf  
the

outcome should ideally be 2147483647.


OK, how can I help debug this?
(The code in lib/libm/src/*rint*.c seems a bit over my head.)


What Otto said. You could download {Free,Net}BSD code and expand your  
program to compare different variants.




--
Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/



Expected pf behavior for TCP:SYN requests with block drop all

2019-08-13 Thread Dominique Fuchs
Hi everyone,

I‘m running OpenBSD 6.5 (release) on a server with a public IP but very 
limiting pf rules. I ran a nmap -sn on the corresponding address from another 
host to verify that it isn‘t detectable with a simple ICMP scan (please don‘t 
start a discussion how important this is - I do not say this is a real security 
benefit, I just like it on top of other security considerations). 

However, nmap unexpectedly returned ‚Host is up‘. Debugging output shows that 
the server responded with a TCP RA flag. This stumped me, because IMHO ‚block 
all‘ (which I really tested in the end as single rule with a seperate 
pf.config) results in ‚block drop all‘ by default, confirmed via pfctl -s rules.

Can someone point out me what I misunderstood here? My assumption was pf would 
really silently drop, including the absence of a TCP response. 

Thanks,
Dominique


/usr/lib/clang

2019-08-13 Thread Jan Stary
At the end of upgrading to a current/i386 (dmesg below),
the upgrade script said:

/upgrade: cd: /mnt/usr/lib/clang - No such file or directory
ls: /mnt/usr/lib/clang/*: No such file or directory
Making all device nodes... done
Relinking to create unique kernel...

The upgrade finishes successfully; after the reboot,
everything seems to work fine, and /usr/lib/clang/ contains
8.0.0/include full of header files (I did choose the comp66.tgz
set during the upgrade).

Jan

OpenBSD 6.6-beta (GENERIC) #0: Sun Aug 11 04:18:00 CEST 2019
h...@www.stare.cz:/usr/src/sys/arch/i386/compile/GENERIC
real mem  = 259207168 (247MB)
avail mem = 238747648 (227MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 07/19/10, BIOS32 rev. 0 @ 0xfa950
apm0 at bios0: Power Management spec V1.2 (slowidle)
pcibios0 at bios0: rev 2.1 @ 0xf/0xdfb4
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf30/128 (6 entries)
pcibios0: PCI Exclusive IRQs: 5 10 11
pcibios0: no compatible PCI ICU found: ICU vendor 0x1022 product 0x2090
pcibios0: Warning, unable to fix up PCI interrupt routing
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xc/0x8000 0xc8000/0xa800 0xef000/0x1000!
cpu0 at mainbus0: (uniprocessor)
cpu0: Geode(TM) Integrated Processor by AMD PCS ("AuthenticAMD" 586-class) 499 
MHz, 05-0a-02
cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX,MMXX,3DNOW2,3DNOW
mtrr: K6-family MTRR support (2 registers)
amdmsr0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 1 function 0 "AMD Geode LX" rev 0x33
vga1 at pci0 dev 1 function 1 "AMD Geode LX Video" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
glxsb0 at pci0 dev 1 function 2 "AMD Geode LX Crypto" rev 0x00: RNG AES
vr0 at pci0 dev 13 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 11, address 
00:0d:b9:0e:9e:f4
ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
glxpcib0 at pci0 dev 15 function 0 "AMD CS5536 ISA" rev 0x03: rev 3, 32-bit 
3579545Hz timer, watchdog, gpio, i2c
gpio0 at glxpcib0: 32 pins
iic0 at glxpcib0
pciide0 at pci0 dev 15 function 2 "AMD CS5536 IDE" rev 0x01: DMA, channel 0 
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: 
wd0: 1-sector PIO, LBA48, 15259MB, 31250432 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
auglx0 at pci0 dev 15 function 3 "AMD CS5536 Audio" rev 0x01: irq 11, CS5536 
AC97
ac97: codec id 0x414c4770 (Avance Logic ALC203 rev 0)
ac97: codec features headphone, 20 bit DAC, 18 bit ADC, No 3D Stereo
audio0 at auglx0
ohci0 at pci0 dev 15 function 4 "AMD CS5536 USB" rev 0x02: irq 5, version 1.0, 
legacy support
ehci0 at pci0 dev 15 function 5 "AMD CS5536 USB" rev 0x02: irq 5
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "AMD EHCI root hub" rev 2.00/1.00 
addr 1
isa0 at glxpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
wbsio0 at isa0 port 0x2e/2: W83627HF rev 0x41
lm1 at wbsio0 port 0x290/8: W83627HF
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "AMD OHCI root hub" rev 1.00/1.00 
addr 1
umass0 at uhub0 port 4 configuration 1 interface 0 "Prolific Technology Inc. 
Mass Storage Device" rev 2.00/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd0 at scsibus1 targ 1 lun 0:  SCSI0 0/direct fixed 
serial.067b2506
sd0: 152627MB, 512 bytes/sector, 312581808 sectors
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on wd0a (5162f658323b2b07.a) swap on wd0b dump on wd0b



Re: USB speakers, no sound

2019-08-13 Thread Raf Czlonka
On Sun, Aug 11, 2019 at 03:14:25PM BST, Doug Moss wrote:
> 
> To make sure I understand correctly / and possible help others in future 
> reading thread:
> (OpenBSD 6.5, amd64)
> 
> /etc/rc.conf.local
> sndiod_flags="-f rsnd/1"
> (This tells the sndiod daemon to configure the first _raw_ audio device = 
> 'audio1' in dmesg = 'rsnd/1',
 ^
Second - remember, the devices are 0[zero]-indexed.

> and this becomes exposed as the first sndiod device 'snd/0')

Cheers,

Raf