ehci(4): split interrupt transfer fix

2019-01-18 Thread SASANO Takayoshi
Hello, There is a problem about using USB2.0 hub which has single-TT. When attaching USB keyboard and USB speaker to same hub and playing music via speaker, the sound is noisy. Current code schedules split isochronous transfer and split interrupt transfer to same timing, so TT cannot handle both

Re: return value check in snprintf(3) example code

2019-01-18 Thread Theo de Raadt
Ted Unangst wrote: > Theo Buehler wrote: > > According to our documentation and all the standards I checked, > > snprintf() returns a negative value on error, not necessarily -1. > > This confused me quite a bit recently so I suggest to adjust the > > example code as follows: > > I don't know.

Re: return value check in snprintf(3) example code

2019-01-18 Thread Ted Unangst
Theo Buehler wrote: > According to our documentation and all the standards I checked, > snprintf() returns a negative value on error, not necessarily -1. > This confused me quite a bit recently so I suggest to adjust the > example code as follows: I don't know. I guess it's technially correct, bu

pfctl: use mnemonic macros, terminate string with null char

2019-01-18 Thread Klemens Nanni
A few assorted nits for consistency and proper format, no object change. OK? Index: pfctl.c === RCS file: /cvs/src/sbin/pfctl/pfctl.c,v retrieving revision 1.365 diff -u -p -r1.365 pfctl.c --- pfctl.c 11 Jan 2019 03:09:24 -

Re: openssl dgst: switch to SHA256 default

2019-01-18 Thread Theo Buehler
On Sat, Jan 19, 2019 at 12:04:20AM +0100, Christian Weisgerber wrote: > Match OpenSSL 1.1's openssl(1) and switch the default algorithm for > the dgst command from MD5 to SHA256. > > This is in line with the MD5 -> SHA256 change in the default key > derivation for the enc command, and general good

openssl dgst: switch to SHA256 default

2019-01-18 Thread Christian Weisgerber
Match OpenSSL 1.1's openssl(1) and switch the default algorithm for the dgst command from MD5 to SHA256. This is in line with the MD5 -> SHA256 change in the default key derivation for the enc command, and general good crypto principles. ok? Index: dgst.c

Re: openssl enc: fix synopsis, option descriptions

2019-01-18 Thread Jason McIntyre
On Fri, Jan 18, 2019 at 10:41:45PM +0100, Christian Weisgerber wrote: > Add -iter and -pbkdf2 to the usage synopsis. > Reorder option descriptions so -iter and -pbkdf2 show up alphabetically. > Add missing argument name for -iter. > > ok? > ok. jmc > Index: enc.c > =

openssl enc: fix synopsis, option descriptions

2019-01-18 Thread Christian Weisgerber
Add -iter and -pbkdf2 to the usage synopsis. Reorder option descriptions so -iter and -pbkdf2 show up alphabetically. Add missing argument name for -iter. ok? Index: enc.c === RCS file: /cvs/src/usr.bin/openssl/enc.c,v retrieving rev

Re: kcov: trace cmp

2019-01-18 Thread Anton Lindqvist
On Fri, Jan 18, 2019 at 04:58:16PM +0100, Alexander Bluhm wrote: > On Fri, Jan 18, 2019 at 04:38:55PM +0100, Anton Lindqvist wrote: > > > - You allocate nmemb * sizeof(uintptr_t) bytes. > > > - kd_buf[nmemb - 1] is the largest valid index. > > > - kd_nmemb is nmemb - 1. > > > - kd_buf[idx * 4 + 4]

return value check in snprintf(3) example code

2019-01-18 Thread Theo Buehler
According to our documentation and all the standards I checked, snprintf() returns a negative value on error, not necessarily -1. This confused me quite a bit recently so I suggest to adjust the example code as follows: Index: lib/libc/stdio/printf.3 ==

Re: kcov: trace cmp

2019-01-18 Thread Alexander Bluhm
On Fri, Jan 18, 2019 at 04:38:55PM +0100, Anton Lindqvist wrote: > > - You allocate nmemb * sizeof(uintptr_t) bytes. > > - kd_buf[nmemb - 1] is the largest valid index. > > - kd_nmemb is nmemb - 1. > > - kd_buf[idx * 4 + 4] is the access at the largest position. > > - So return if (idx * 4 + 4 > k

Re: kcov: trace cmp

2019-01-18 Thread Anton Lindqvist
On Wed, Jan 16, 2019 at 10:36:29PM +0100, Alexander Bluhm wrote: > On Wed, Jan 16, 2019 at 09:17:33PM +0100, Anton Lindqvist wrote: > > + idx = kd->kd_buf[0]; > > + if (idx * 4 + 4 + 1 >= kd->kd_nmemb) > > + return; > > + > > + kd->kd_buf[idx * 4 + 1] = type; > > + kd->kd_buf[idx

if_pppoe.c patch

2019-01-18 Thread Peter J. Philipp
I have "covered" up PPPoE Session ID's from users because it is a value that is only gotten on the Data Link layer and historically non-root users did not have access to that. It really is a value that doesn't concern them. I have wrapped the display with a suser() conditional. The magic value 0

Re: Request for testing malloc and multi-threaded applications

2019-01-18 Thread Otto Moerbeek
On Fri, Jan 18, 2019 at 08:41:57AM +0100, Alexandr Nedvedicky wrote: > Hello Otto, > > I gave it a try with firefox. according to my subjective tests > I could not spot any differences with various setting. > > I've decided to try with some memory benchmarks I could find on github [1]. I > did c

handling of magic number in LCP echo replies

2019-01-18 Thread Peter J. Philipp
Hi, I'd like to get some help determining if this is a problem per se. In /sys/net/if_spppsubr.c lines 1323-1327 the nmagic is assembled and checked against sp->lcp.magic, and if it doesn't match then it does something weird. It resets the sp->pp_alivecnt to 0. This to me does nothing much ot