aligned_alloc shouldn't require size to be a multiple of alignment
Hi, On OpenBSD, aligned_alloc currently fails with EINVAL if the requested size is not a multiple of the requested alignment. Indeed, this stems from a botch in the original specification in the C11 standard. See Defect Report 460 or the NetBSD man page for more details, but this silly requirement has been dropped in C17/C18, and I believe OpenBSD should conform to this. I haven't tested, but it might be sufficient to simply remove the check.
Re: mg: how to indent using spaces instead of tabs
> On Jun 5, 2022, at 4:24 AM, Sam Lee wrote: > > On 2022-06-05 10:58 +0200, Omar Polo wrote: >> M-x no-tab-mode RET seems to work (as long as you don't want to change >> the width of the `expandtab'; it always align to the nearest multiple >> of 8) > > How do people write Python programs using mg? > Python requires 4 space indentation ... I have to say it... Technically Python _requires_ any white space indentation, but the PEP 8 readability guidelines recommend sticking to four spaces. Google sticks to two spaces. I write prototype code in two spaces and code I intend to re-read at some point with four spaces (the “serious” stuff.) Some people use tabs, but they use tabs throughout. Mixing tabbed and spaced indenting is horrific in an indent specified language.
Re: PF table issue on 7.1-Current
On Tue, Jun 7, 2022 at 11:34 AM Zé Loff wrote: > > On Tue, Jun 07, 2022 at 04:26:11PM +0300, Barbaros Bilek wrote: > > Hello Misc, > > > > I think there is an issue about PF tables at current. > > Here my working PF config sample before 7.1-Current. > > block log quick inet from > > pfctl -f /etc/pf.conf > > Another software fills this Malicious table with this command: > > # pfctl -t Malicious -T add 1.2.3.4 > > 1 table created. > > 1/1 addresses added. > > # pfctl -t Malicious -T show 1.2.3.4 > > 1.2.3.4 > > > > But with my newly upgraded OpenBSD version it doesn't. > > OpenBSD 7.1-current (GENERIC.MP) #575: Mon Jun 6 10:11:31 MDT 2022 > > #pfctl -t Malicious -T add 1.2.3.4 > > 1 table created. > > pfctl: Table does not exist > > > > #pfctl -t Malicious -T show > > pfctl: Table does not exist > > > > > > Thanks for your time. > > > > -- > > Barbaros > > You now need to explicitly create the table with > > table > > on your pf.conf. This was not enforced in 7.1, so you got away with it, > but it is now. > that s a 'feature' ??? -- -- - Knowing is not enough; we must apply. Willing is not enough; we must do
Re: PF table issue on 7.1-Current
On Tue, Jun 07, 2022 at 04:26:11PM +0300, Barbaros Bilek wrote: > Hello Misc, > > I think there is an issue about PF tables at current. > Here my working PF config sample before 7.1-Current. > block log quick inet from > pfctl -f /etc/pf.conf > Another software fills this Malicious table with this command: > # pfctl -t Malicious -T add 1.2.3.4 > 1 table created. > 1/1 addresses added. > # pfctl -t Malicious -T show 1.2.3.4 > 1.2.3.4 > > But with my newly upgraded OpenBSD version it doesn't. > OpenBSD 7.1-current (GENERIC.MP) #575: Mon Jun 6 10:11:31 MDT 2022 > #pfctl -t Malicious -T add 1.2.3.4 > 1 table created. > pfctl: Table does not exist > > #pfctl -t Malicious -T show > pfctl: Table does not exist > > > Thanks for your time. > > -- > Barbaros You now need to explicitly create the table with table on your pf.conf. This was not enforced in 7.1, so you got away with it, but it is now. --
PF table issue on 7.1-Current
Hello Misc, I think there is an issue about PF tables at current. Here my working PF config sample before 7.1-Current. block log quick inet from pfctl -f /etc/pf.conf Another software fills this Malicious table with this command: # pfctl -t Malicious -T add 1.2.3.4 1 table created. 1/1 addresses added. # pfctl -t Malicious -T show 1.2.3.4 1.2.3.4 But with my newly upgraded OpenBSD version it doesn't. OpenBSD 7.1-current (GENERIC.MP) #575: Mon Jun 6 10:11:31 MDT 2022 #pfctl -t Malicious -T add 1.2.3.4 1 table created. pfctl: Table does not exist #pfctl -t Malicious -T show pfctl: Table does not exist Thanks for your time. -- Barbaros
xidle(1) and autosuspend
Since my other computer is a datacenter, and my laptop is just a glorified vt100, I figured how to autosuspend it when it's idle for some time. I already at xidle(1) in my .xsession to start xlock(1). I then discovered -startCmd in xlock(1). I know have this: $ cat xlock_zzz #! /bin/sh exec /usr/X11R6/bin/xlock -startCmd "/bin/sleep 300 && /usr/sbin/zzz" and this in my .xsession: xidle -program /home/florian/bin/xlock_zzz -timeout 300 & So after 5 minutes xidle starts xlock and 5 minutes after that my laptop autosuspends. If I unlock the laptop before 5 minutes expire the sleep gets killed and the laptop doesn't suspend. -- I'm not entirely sure you are real.
Re: Slow umass(4) on xhci(4)
Greg Steuck writes: > I was somehow sure I tried rsd1i before, but now I can see a 17x > difference: > > # dd if=/dev/rsd1i of=/dev/null bs=1M count=1000 > 1000+0 records in > 1000+0 records out > 1048576000 bytes transferred in 6.038 secs (173,659,835 bytes/sec) I received an excellent suggestion off-list to do another experiment on Linux to have a more comparable baseline. Disabling uas reduces performance quite a bit, but it remains much better than OpenBSD: root@ubuntu:/mnt/stats# dd if=/dev/sda1 of=/dev/null bs=1M count=1 1+0 records in 1+0 records out 1048576 bytes (10 GB, 9.8 GiB) copied, 14.698 s, 713 MB/s [0.00] Linux version 5.15.0-25-generic (buildd@ubuntu) (gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 (Ubuntu 5.15.0-25.25-generic 5.15.30) [0.00] Command line: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/ubuntu.seed maybe-ubiquity usb-storage.quirks=1058:264f:u splash --- ... [1.829835] usb 3-1: new SuperSpeed Plus Gen 2x1 USB device number 2 using xhci_hcd [1.850958] usb 3-1: New USB device found, idVendor=1058, idProduct=264f, bcdDevice=20.07 [1.851458] usb 3-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1 [1.851963] usb 3-1: Product: My Passport 264F [1.852466] usb 3-1: Manufacturer: Western Digital [1.852834] usb 3-1: SerialNumber: [1.876809] usb 3-1: UAS is ignored for this device, using usb-storage instead [1.877364] usb-storage 3-1:1.0: USB Mass Storage device detected [1.877962] usb-storage 3-1:1.0: Quirks match for vid 1058 pid 264f: 80 [1.878525] scsi host4: usb-storage 3-1:1.0 ... [2.798242] usb 2-5.2: new full-speed USB device number 4 using xhci_hcd [2.902789] scsi 4:0:0:0: Direct-Access WD My Passport 264F 2007 PQ: 0 ANSI: 6 [2.902960] scsi 4:0:0:1: Enclosure WD SES Device 2007 PQ: 0 ANSI: 6 [2.904303] sd 4:0:0:0: Attached scsi generic sg1 type 0 [2.904549] scsi 4:0:0:1: Attached scsi generic sg2 type 13 [2.904579] sd 4:0:0:0: [sda] 3906963617 512-byte logical blocks: (2.00 TB/1.82 TiB) [2.904879] sd 4:0:0:0: [sda] Write Protect is off [2.904883] sd 4:0:0:0: [sda] Mode Sense: 17 00 10 00 [2.905178] sd 4:0:0:0: [sda] No Caching mode page found [2.905182] sd 4:0:0:0: [sda] Assuming drive cache: write through [2.954970] sda: sda1 [2.988933] sd 4:0:0:0: [sda] Attached SCSI disk [3.053942] scsi 4:0:0:1: Failed to get diagnostic page 0x1 [3.053945] scsi 4:0:0:1: Failed to bind enclosure -19 [3.053966] ses 4:0:0:1: Attached Enclosure device ... [4.407558] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem [4.414707] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null). Quota mode: none.