better return type for usqrt() in factor(6)

2016-08-31 Thread Theo Buehler
In factor(6), there is the line 216 stop = usqrt(val) + 1; where the u_int64_t stop is the upper bound for the sieve of Eratosthenes (I cautiously added 1 to be sure to be on the safe side). Unfortunately, the right hand side may now overflow for large enough val because my brilliant

Re: ifconfig baudrate

2016-08-31 Thread Theo de Raadt
> Whatever, you know what you're talking about but I guess the MCS table is to= > tally uninteresting for most users like me. For them, it is "utterly meaning= > less" to have some code and acronym instead of the actual calculated speed. I= > t's a blinkenlight but it will probably stay where it

Re: remove ntfs write code

2016-08-31 Thread Bob Beck
Yes, ok beck@ to be shortly followed by the ntfs code - don't we have a fuse version of this? On Wed, Aug 31, 2016 at 3:34 PM, Martin Natano wrote: > mount_ntfs forces the mount point to be MNT_RDONLY, so the write parts > in ntfs are never used. OK to remove? > > natano >

encrypt(1) readpassphrase

2016-08-31 Thread Dimitris Papastamos
Hi, encrypt(1) updated to use readpassphrase(3) instead of getpass(3). Thought I would grep the tree after the recent commit to passwd(1) by tedu. Index: encrypt.c === RCS file: /cvs/src/usr.bin/encrypt/encrypt.c,v retrieving

Re: remove ntfs write code

2016-08-31 Thread Sebastian Benoit
as far as i'm concerned ok benno@ btw i have incresingly problems with mounting ntfs partions (read-only) with this and use the ntfs_3g fuse port. Martin Natano(nat...@natano.net) on 2016.08.31 23:34:43 +0200: > mount_ntfs forces the mount point to be MNT_RDONLY, so the write parts > in ntfs are

Re: ifconfig baudrate

2016-08-31 Thread Reyk Floeter
> Am 31.08.2016 um 21:29 schrieb Chris Cappuccio : > > Reyk Floeter [r...@openbsd.org] wrote: >> >> Ok, it makes some sense to have this information for Ethernet. > > I am strongly opposed to this change on wired or wireless. Why the > push for having less information? > >>

remove ntfs write code

2016-08-31 Thread Martin Natano
mount_ntfs forces the mount point to be MNT_RDONLY, so the write parts in ntfs are never used. OK to remove? natano Index: ntfs/ntfs_subr.c === RCS file: /cvs/src/sys/ntfs/ntfs_subr.c,v retrieving revision 1.47 diff -u -p -r1.47

Re: ifconfig baudrate

2016-08-31 Thread Chris Cappuccio
Reyk Floeter [r...@openbsd.org] wrote: > > Ok, it makes some sense to have this information for Ethernet. > I am strongly opposed to this change on wired or wireless. Why the push for having less information? > For 11n and all these new wireless rates it doesn't provide any useful >

rewrite column(1)

2016-08-31 Thread Martijn van Duren
Hello tech@, Here's a complete restructuring of the column(1) utility. It's aim is to ease the implementation of UTF-8 support, which will come in a separate patch, but also fixes a few bugs while here: - Fix the width-calculation of a tab-character - Correct treatment of files without trailing

iwm(4): Fix off-by-one error in a range check in iwm_read_firmware().

2016-08-31 Thread Imre Vadasz
This fixes an off-by-one error in the "if (idx > howmany(IWM_NUM_UCODE_TLV_CAPA, 32))" range check. Since IWM_NUM_UCODE_TLV_CAPA is defined as 128, for an idx value of 4, we would potentially try to set bits 159..128 in the sc->sc_enabled_capa bitmap (which is just IWM_NUM_UCODE_TLV_CAPA bits

iwm(4): Use htole16 for policy field in iwm_time_event_cmd_v2 struct.

2016-08-31 Thread Imre Vadasz
Hi, The policy field in struct iwm_time_event_cmd_v2 is just a 16bit integer, so we should use htole16() when setting it, instead of htole32(). Index: sys/dev/pci/if_iwm.c === RCS file: /cvs/src/sys/dev/pci/if_iwm.c,v retrieving

iwm(4): Use uint32_t instead of enum type in __packed struct iwm_sf_cfg_cmd.

2016-08-31 Thread Imre Vadasz
Hi, Although this doesn't seem to cause any issue at the moment, using an enum type in a __packed struct should be avoided: Index: sys/dev/pci/if_iwmreg.h === RCS file: /cvs/src/sys/dev/pci/if_iwmreg.h,v retrieving revision 1.14

iwm(4): gc struct iwm_rbuf and the wantresp field in struct iwm_rx_data.

2016-08-31 Thread Imre Vadasz
Hi, The struct iwm_rbuf definition, and the wantresp field in struct iwm_rx_data aren't used anywhere and can be removed: Index: sys/dev/pci/if_iwmvar.h === RCS file: /cvs/src/sys/dev/pci/if_iwmvar.h,v retrieving revision 1.19 diff

sdmmc locking

2016-08-31 Thread Marcus Glocker
When a sdmmc device driver currently calls sdmmc_io_function_enable() in its attach routine it will cause a 'locking against myself' panic since the lock already has been set in the sdmmc attach path. Therefore just check if the lock already has been set in sdmmc_io_function_enable() fixes this.

Re: ifconfig baudrate

2016-08-31 Thread lists
Wed, 31 Aug 2016 09:42:07 -0600 "Theo de Raadt" > > I'd rather have this as an extra rather than replacing the more > > specific information. > > I agree... > Wed, 31 Aug 2016 17:17:26 +0200 Peter Hessler > On 2016 Aug 31 (Wed) at 17:04:38 +0200

Re: Let iked specify its source address when sending

2016-08-31 Thread Vincent Gross
On Wed, 31 Aug 2016 16:09:30 +0200 Reyk Floeter wrote: > On Wed, Aug 31, 2016 at 03:26:53PM +0200, Vincent Gross wrote: > > On Thu, 11 Aug 2016 16:57:27 +0100 > > Stuart Henderson wrote: > > > > > On 2016/06/27 13:00, J?r?mie Courr?ges-Anglas wrote:

Re: ifconfig baudrate

2016-08-31 Thread Stuart Henderson
On 2016/08/31 17:04, Stefan Sperling wrote: > This makes ifconfig display baudrates defined in ifmedia.h tables. > > Before (prints media subtype): > > $ ifconfig iwn0 | grep media: > media: IEEE802.11 autoselect (OFDM6 mode 11a) > $ ifconfig em0 | grep media: > media: Ethernet

Re: ifconfig baudrate

2016-08-31 Thread Theo de Raadt
> I'd rather have this as an extra rather than replacing the more > specific information. I agree...

ftpd and IPv6 traffic class

2016-08-31 Thread Jeremie Courreges-Anglas
Like in nc(1) IPTOS_* (supposedly IPv4) values are used for the IPv6 path. That's not a concern in practice. Index: ftpd.c === RCS file: /cvs/src/libexec/ftpd/ftpd.c,v retrieving revision 1.221 diff -u -p -p -u -r1.221 ftpd.c ---

Re: ifconfig baudrate

2016-08-31 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Wed, 31 Aug 2016 09:12:30 -0600 > > > This makes ifconfig display baudrates defined in ifmedia.h tables. > > > > Before (prints media subtype): > > > > $ ifconfig iwn0 | grep media: > > media: IEEE802.11 autoselect (OFDM6 mode 11a) >

Re: ifconfig baudrate

2016-08-31 Thread David Coppa
Il 31 agosto 2016 17:19:36 CEST, Reyk Floeter ha scritto: >On Wed, Aug 31, 2016 at 09:12:30AM -0600, Theo de Raadt wrote: >> > This makes ifconfig display baudrates defined in ifmedia.h tables. >> > >> > Before (prints media subtype): >> > >> > $ ifconfig iwn0 | grep media:

Re: ifconfig baudrate

2016-08-31 Thread Reyk Floeter
On Wed, Aug 31, 2016 at 09:12:30AM -0600, Theo de Raadt wrote: > > This makes ifconfig display baudrates defined in ifmedia.h tables. > > > > Before (prints media subtype): > > > > $ ifconfig iwn0 | grep media: > > media: IEEE802.11 autoselect (OFDM6 mode 11a) > > $ ifconfig em0 | grep

Re: ifconfig baudrate

2016-08-31 Thread Reyk Floeter
On Wed, Aug 31, 2016 at 05:04:38PM +0200, Stefan Sperling wrote: > This makes ifconfig display baudrates defined in ifmedia.h tables. > > Before (prints media subtype): > > $ ifconfig iwn0 | grep media: > media: IEEE802.11 autoselect (OFDM6 mode 11a) > $ ifconfig em0 | grep media: >

Re: ifconfig baudrate

2016-08-31 Thread Theo de Raadt
> This makes ifconfig display baudrates defined in ifmedia.h tables. > > Before (prints media subtype): > > $ ifconfig iwn0 | grep media: > media: IEEE802.11 autoselect (OFDM6 mode 11a) > $ ifconfig em0 | grep media: > media: Ethernet autoselect (100baseTX

ifconfig baudrate

2016-08-31 Thread Stefan Sperling
This makes ifconfig display baudrates defined in ifmedia.h tables. Before (prints media subtype): $ ifconfig iwn0 | grep media: media: IEEE802.11 autoselect (OFDM6 mode 11a) $ ifconfig em0 | grep media: media: Ethernet autoselect (100baseTX full-duplex,rxpause,txpause) After

passwd(1) - use explicit_bzero(3)

2016-08-31 Thread Gleydson Soares
after recents passwd(1) changes, We should use explicit_bzero(3) for clearing these sensitive strings. OK? Index: local_passwd.c === RCS file: /cvs/src/usr.bin/passwd/local_passwd.c,v retrieving revision 1.50 diff -u -p -r1.50

Re: Let iked specify its source address when sending

2016-08-31 Thread Reyk Floeter
On Wed, Aug 31, 2016 at 04:09:30PM +0200, Reyk Floeter wrote: > On Wed, Aug 31, 2016 at 03:26:53PM +0200, Vincent Gross wrote: > > On Thu, 11 Aug 2016 16:57:27 +0100 > > Stuart Henderson wrote: > > > > > On 2016/06/27 13:00, J?r?mie Courr?ges-Anglas wrote: > > [...] > > >

Re: Let iked specify its source address when sending

2016-08-31 Thread Reyk Floeter
On Wed, Aug 31, 2016 at 03:26:53PM +0200, Vincent Gross wrote: > On Thu, 11 Aug 2016 16:57:27 +0100 > Stuart Henderson wrote: > > > On 2016/06/27 13:00, J?r?mie Courr?ges-Anglas wrote: > [...] > > > > > > I also gave my ok to vgross by IM. > > > > > > I know that some

Re: Let iked specify its source address when sending

2016-08-31 Thread Vincent Gross
On Wed, 31 Aug 2016 15:26:53 +0200 Vincent Gross wrote: > On Thu, 11 Aug 2016 16:57:27 +0100 > Stuart Henderson wrote: > > > On 2016/06/27 13:00, Jérémie Courrèges-Anglas wrote: > [...] > > > > > > I also gave my ok to vgross by IM. > > > > > > I

regression tests and patch for calendar(1)

2016-08-31 Thread Andy Bradford
Hello, While writing a set of regression tests for calendar(1) I discovered a bug introduced by my last patch. The following patch fixes that and all regression tests in the attachment of tests passes. Thanks, Andy Index: day.c

Re: switch the cubie miniroot to cubieboard2

2016-08-31 Thread sid77
Speaking as a Cubieboard owner here ;-) Would it be too much hassle to provide both images? (and a pony!) -- Marco Bonetti

dhclient: Kill 'ifi' global

2016-08-31 Thread Martin Pieuchot
In order to properly separate some of dhclient's components I'd like to make clear which functions depend on the state of an interface. So the diff attached removes the 'ifi' global and passes it as an argument where necessary. One interesting place to look at are the timeouts that are now

Let iked specify its source address when sending

2016-08-31 Thread Vincent Gross
On Thu, 11 Aug 2016 16:57:27 +0100 Stuart Henderson wrote: > On 2016/06/27 13:00, Jérémie Courrèges-Anglas wrote: [...] > > > > I also gave my ok to vgross by IM. > > > > I know that some concerns have been exposed privately, I was not > > Cc'd, thus I have no idea what

Re: ksh cd two args

2016-08-31 Thread Alexander Hall
On Wed, Aug 31, 2016 at 01:53:30PM +0100, Theo Buehler wrote: > On Wed, Aug 31, 2016 at 08:39:51AM -0400, Ted Unangst wrote: > > About ten times a day I do something like this: > > $ cd cd tedu > > ksh: cd: bad substitution > > > > What does that even mean? According to the source, but not the

Array of TAILQs in kern_synch.c

2016-08-31 Thread Michal Mazurek
There is what appears to be a sensless hash in kern_synch.c. It's an array of 128 TAILQs which are hashed according to the high bits of the wchan. It's possible to write a program that adds kern.maxthread entries to one of those TAILQs. Just running chrome with 11 tabs open adds 35 entries to one

Re: ksh cd two args

2016-08-31 Thread Theo Buehler
On Wed, Aug 31, 2016 at 08:39:51AM -0400, Ted Unangst wrote: > About ten times a day I do something like this: > $ cd cd tedu > ksh: cd: bad substitution > > What does that even mean? According to the source, but not the manual, there > is some two argument cd syntax which substitutes something.

Re: remove ifdef from ftpd

2016-08-31 Thread Ted Unangst
Jeremie Courreges-Anglas wrote: > > As discussed I prefer this direction, but: > - the fgets code will make the server hang > - it's not the ftp user's business to know that IPv4 mapped addresses > aren't supported. I'd rather log something to syslog. yeah, ok

Re: vmd: cleaning up virtio.c

2016-08-31 Thread Mike Larkin
On Wed, Aug 31, 2016 at 06:04:22AM -0600, nayden wrote: > Addressing "this function needs a cleanup block, lots of free(blah); return > (0)" > comment for vioblk_notifyq() and doing the same for vionet_enq_rx(). > go for it, thanks. > Index: virtio.c >

ksh cd two args

2016-08-31 Thread Ted Unangst
About ten times a day I do something like this: $ cd cd tedu ksh: cd: bad substitution What does that even mean? According to the source, but not the manual, there is some two argument cd syntax which substitutes something. I have never once tried to do this on purpose. Thus, I think the error

Re: ifconfig setinstance -> setrdomain

2016-08-31 Thread Jeremie Courreges-Anglas
Stefan Sperling writes: > 'instance' is the name of an ifconfig subcommand related to ifmedia > so the name of the setinstance() function is slightly confusing. ok -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: RSSI values

2016-08-31 Thread Jeremie Courreges-Anglas
Stefan Sperling writes: > ifconfig scan displays RSSI (received signal strength indicator) values. > > If the driver sets ic->ic_max_rssi the value is displayed as a percentage > of ic_max_rssi. Otherwise ifconfig displays the value as dBm. > > The problem in the dBm case is that

Re: ifconfig setinstance -> setrdomain

2016-08-31 Thread Claudio Jeker
On Wed, Aug 31, 2016 at 02:23:00PM +0200, Stefan Sperling wrote: > 'instance' is the name of an ifconfig subcommand related to ifmedia > so the name of the setinstance() function is slightly confusing. OK > Index: ifconfig.c > ===

Re: hashfree: sizes for free(9) when using hashinit.

2016-08-31 Thread Ted Unangst
Mathieu - wrote: > Hello list, > > I'm introducing hashfree, a counterpart to hashinit in order to pass the > size to free(9) while hiding the implementation details. > Most of the api users are converted in the patch below, those not > included just simply do not free the memory (pid hash table

Re: remove ifdef from ftpd

2016-08-31 Thread Jeremie Courreges-Anglas
"Ted Unangst" writes: > Jeremie Courreges-Anglas wrote: >> I think that's a better choice. >> >> > >> >> >> >> > -#else >> >> > - while (fgets(line, sizeof(line), fd) != NULL) { >> >> > - line[strcspn(line, "\n")] = '\0'; >> >> > -

ifconfig setinstance -> setrdomain

2016-08-31 Thread Stefan Sperling
'instance' is the name of an ifconfig subcommand related to ifmedia so the name of the setinstance() function is slightly confusing. Index: ifconfig.c === RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v retrieving revision 1.327 diff

fusefs lookup/reclaim bug

2016-08-31 Thread Martin Natano
Watch this: $ doas fuse-zip ~/Downloads/foo.zip /mnt $ ls /mnt openbsd-www $ grep -IR foo /usr/src > /dev/null # force vfs to reclaim vnodes $ ls /mnt ls: /mnt: No such file or directory $ Currently fusefs nodes in the kernel remember the parent inode number for ".." lookups. This only works

vmd: cleaning up virtio.c

2016-08-31 Thread nayden
Addressing "this function needs a cleanup block, lots of free(blah); return (0)" comment for vioblk_notifyq() and doing the same for vionet_enq_rx(). Index: virtio.c === RCS file: /home/nayden/cvsync/src/usr.sbin/vmd/virtio.c,v

www/60.html: too many nbsp

2016-08-31 Thread Michael Plura
Trivial, but too many nbsp and too little comma in 60.html... Thanks, Michael Index: 60.html === RCS file: /cvs/www/60.html,v retrieving revision 1.71 diff -u -p -r1.71 60.html --- 60.html 25 Aug 2016 15:21:15 - 1.71

hashfree: sizes for free(9) when using hashinit.

2016-08-31 Thread Mathieu -
Hello list, I'm introducing hashfree, a counterpart to hashinit in order to pass the size to free(9) while hiding the implementation details. Most of the api users are converted in the patch below, those not included just simply do not free the memory (pid hash table etc). All, except for one

Re: switch the cubie miniroot to cubieboard2

2016-08-31 Thread Jonathan Gray
On Wed, Aug 31, 2016 at 07:26:27AM -0400, Ted Unangst wrote: > Jonathan Gray wrote: > > Now that the A20 works it likely makes sense to switch > > the cubie miniroot from the A10 based cubieboard1 to the A20 > > based cubieboard2 which more people seem to have? > > forgive the insane question,

Re: squeeze some isa drivers

2016-08-31 Thread Miod Vallat
> Time to play whack i386/conf/GENERIC with a bat and see what pops out. > > Extensive research in the archives indicates that these devices are extinct. You'll need to remove out the commented wss line in alpha GENERIC as well.

Re: per-ifp input task

2016-08-31 Thread Alexander Bluhm
On Mon, Aug 29, 2016 at 03:28:34PM +0200, Martin Pieuchot wrote: > Comments? Oks? OK bluhm@ > -if_input_process(void *xmq) > +if_input_process(void *xifidx) > { > - struct mbuf_queue *mq = xmq; > + unsigned int ifidx = (unsigned long)xifidx; > struct mbuf_list ml; > - struct

Re: switch the cubie miniroot to cubieboard2

2016-08-31 Thread Ted Unangst
Jonathan Gray wrote: > Now that the A20 works it likely makes sense to switch > the cubie miniroot from the A10 based cubieboard1 to the A20 > based cubieboard2 which more people seem to have? forgive the insane question, but does this imply that it doesn't work on the a10 board?

switch the cubie miniroot to cubieboard2

2016-08-31 Thread Jonathan Gray
Now that the A20 works it likely makes sense to switch the cubie miniroot from the A10 based cubieboard1 to the A20 based cubieboard2 which more people seem to have? Index: distrib/armv7/miniroot/cubie/Makefile === RCS file:

Re: Estonian keymap

2016-08-31 Thread Martin Pieuchot
On 08/30/16 21:14, Mart Tõnso wrote: This should be ok now: ok mpi@ Index: sys/dev/pckbc/wskbdmap_mfii.c === RCS file: /cvs/src/sys/dev/pckbc/wskbdmap_mfii.c,v retrieving revision 1.43 diff -u -p -r1.43 wskbdmap_mfii.c ---

squeeze some isa drivers

2016-08-31 Thread Ted Unangst
Time to play whack i386/conf/GENERIC with a bat and see what pops out. Extensive research in the archives indicates that these devices are extinct. Index: arch/i386/conf/GENERIC === RCS file: /cvs/src/sys/arch/i386/conf/GENERIC,v

RSSI values

2016-08-31 Thread Stefan Sperling
ifconfig scan displays RSSI (received signal strength indicator) values. If the driver sets ic->ic_max_rssi the value is displayed as a percentage of ic_max_rssi. Otherwise ifconfig displays the value as dBm. The problem in the dBm case is that many drivers end up reporting a positive value. The

Re: Undefined behaviour in subr_hibernate.c

2016-08-31 Thread Mike Larkin
On Wed, Aug 31, 2016 at 10:47:50AM +0200, Michal Mazurek wrote: > Section "J.2 Undefined behavior" of n1570 includes: > * Pointers that do not point to the same aggregate or union (nor just > beyond the same array object) are compared using relational > operators (6.5.8). > > I think that's

Undefined behaviour in subr_hibernate.c

2016-08-31 Thread Michal Mazurek
Section "J.2 Undefined behavior" of n1570 includes: * Pointers that do not point to the same aggregate or union (nor just beyond the same array object) are compared using relational operators (6.5.8). I think that's what's happening when using RB trees in subr_hibernate.c. subr_pool.c fixes

Re: bridge: drop gif(4) support

2016-08-31 Thread David Gwynne
ok > On 31 Aug 2016, at 02:09, Martin Pieuchot wrote: > >