Re: new USB audio class v2.0 driver

2019-01-02 Thread Max Fillinger
I tested the diff with a FiiO E10K Olympus 2. Previously, it only produced stuttering audio, which I assumed was because it's a UAC v1.0 device and I connected it on ehci. Now, it can't be opened at all. The first thing I noticed was that the kernel now finds two uaudio devices instead of one

Re: [patch] mg: Prevent out-of-bounds read when PATH="/:..."

2016-01-19 Thread Max Fillinger
On Tue, Jan 19, 2016 at 12:35:27PM +0100, Sunil Nimmagadda wrote: > > - dlen = strlen(dir); > > - while (dir[dlen-1] == '/') > > - dir[--dlen] = '\0'; /* strip trailing '/' */ > dlen could never be zero as we are replacing dir[0] with '.' if >

[patch] mg: Prevent out-of-bounds read when PATH="/:..."

2016-01-14 Thread Max Fillinger
I looked for more instances of the pattern that lead to reading one byte before an allocated buffer in which(1) when PATH begins with "/:". I found only one, in the function csexists() in usr.bin/mg/cscope.c. While at it, I replaced the manual length check before snprintf() with a check of the

[patch] which(1): out of bounds read

2016-01-13 Thread Max Fillinger
If PATH starts with "/:", which(1) reads outside of allocated memory. Maybe that caused the non-reproduceable coredump mentioned in [0]? The function progname sets path = strdup(path) and pathcpy = path and runs the following loop: > while ((p = strsep(, ":")) != NULL) { > if (*p ==

[patch]: Small which(1) man page error

2016-01-13 Thread Max Fillinger
The man page says that which(1) works with unset PATH environment variable, as long as the argument is a pathname. However: $ unset PATH $ /usr/bin/which /usr/bin/which which: can't get $PATH from environment: Undefined error: 0 Index: usr.bin/which/which.1

Re: faq/current.html: Mention sudo removal

2015-07-08 Thread Max Fillinger
On Sat, Jul 04, 2015 at 01:40:00PM +1000, Steven McDonald wrote: +sudo(8) has been removed from the base OS. +The old binaries and manual pages should be removed: +pre + rm -f /usr/bin/sudo /usr/bin/sudoedit /usr/sbin/visudo + rm -f /usr/share/man/man8/sudo.8

Re: Unlock the reaper

2015-07-08 Thread Max Fillinger
On Wed, Jul 08, 2015 at 03:53:46PM +0200, Mark Kettenis wrote: I'm looking for testers for this diff. This should be safe to run on amd64, i386 and sparc64. But has been reported to lock up i386 machines. I can't reproduce this on any of my own systems. So I'm looking for help. I'm

Re: important audio simplifications to test and review

2015-06-11 Thread Max Fillinger
My uaudio device stopped working with this patch: $ aucat -i test.wav -f snd/0 snd/0: couldn't open audio device With AUDIO_DEBUG enabled, I see the following output on the console: audio1: setpar: req enc=10 bits=16, bps=2, msb=1 rate=48000, pchan=2, rchan=2, round=960, nblks=2 audio1: 0x180:

Re: bioctl -d: accept DUIDs

2015-04-26 Thread Max Fillinger
On Sun, Apr 26, 2015 at 11:17:36PM +1000, bytevolc...@safe-mail.net wrote: Whilst I mostly like this patch, and it appears to be much cleaner than the bodgy solution I came up with a few years back, perhaps there is something here worth mentioning: ... I'm glad you like it, but the devs

man EVP_EncryptInit: Two small errors

2015-04-12 Thread Max Fillinger
It's out, not outl, that needs to contain sufficient room. Also, add a pair of parentheses to mark EVP_DecryptInit_ex as a function. Index: lib/libssl/src/doc/crypto/EVP_EncryptInit.pod === RCS file:

bioctl -d: accept DUIDs

2015-04-11 Thread Max Fillinger
Here's a diff to enable DUID support for bioctl -d. Basically, I did as the comment in bio_deleteraid suggests and replaced the string devname with a dev_t. In softraid.c, I just recover the sdX from the dev_t using findblkname and the DISKUNIT macro. Or am I missing the point of that comment

Re: ehci(4) Full-speed isochronous transfers support

2015-03-29 Thread Max Fillinger
Thanks a lot for working on this! I've tested the diff with my USB headphone amp: uaudio0 at uhub2 port 1 configuration 1 interface 0 Burr-Brown from TI USB Audi o DAC rev 1.10/1.00 addr 6 uaudio0: audio rev 1.00, 2 mixer controls audio1 at uaudio0 uhidev2 at uhub2 port 1 configuration 1

man ntpd.conf: small errors in constraints section

2015-02-14 Thread Max Fillinger
Some small issues in the new section: - 'NTP servers' means actual servers, not the keyword, so remove the .Ic - 'constraint' is used instead of 'constraint from' in some places; that might be ok as an abbreviation, but at least the example should use the full keyword. In the diff below, I

Allow resuming with closed lid

2015-01-29 Thread Max Fillinger
Currently, there's code in acpi.c that sends the system back to sleep when resuming with closed lid and machdep.lidsuspend=1. I often use my laptop in a docking station with an external monitor and keep the lid closed, and I'd like to be able to resume just by pushing the power button on the

Re: relayd: convert to siphash

2014-12-13 Thread Max Fillinger
On Fri, Dec 12, 2014 at 12:57:08PM -0500, Ted Unangst wrote: On Wed, Dec 10, 2014 at 21:51, Max Fillinger wrote: Here's a version without malloc'ing the key. Looks like it still does? Yes, I managed to just repost the previous diff...at least the thing is in more competent hands now.

Re: relayd: convert to siphash

2014-12-10 Thread Max Fillinger
Here's a version without malloc'ing the key. Index: usr.sbin/relayd/parse.y === RCS file: /cvs/src/usr.sbin/relayd/parse.y,v retrieving revision 1.195 diff -u -p -r1.195 parse.y --- usr.sbin/relayd/parse.y 20 Nov 2014 05:51:20

ospf{,6}d: siphash

2014-12-09 Thread Max Fillinger
This diff replaces hash32 by SipHash in the hash table in ospf{,6}d/lsupdate.c. Seems pretty straightforward... Index: usr.sbin/ospfd/lsupdate.c === RCS file: /cvs/src/usr.sbin/ospfd/lsupdate.c,v retrieving revision 1.41 diff -u -p

relayd: convert to siphash

2014-12-09 Thread Max Fillinger
This diff converts relayd from hash32 to siphash. Relayd does not use the hash function for an actual hash table, but can select a host based on the hash of the source-address, destination-address and other data. The key is generated when the hash function is first used (this may happen in two

Re: relayd: convert to siphash [mistake]

2014-12-09 Thread Max Fillinger
Sorry...I just realized that I forgot to check for malloc return values. I need some sleep.

siphash manpage: some more details

2014-12-06 Thread Max Fillinger
To pass the time until siphash arrives in userland... I'd like to suggest some changes to the manpage of SipHash24(9): I added some more details about the intended purpose of SipHash and I moved the recommendation to use arc4random for the key to the beginning. In case you don't like this diff,

Re: siphash manpage: some more details

2014-12-06 Thread Max Fillinger
Here's a version without If, but with the paper, then. Since, it's not an official standard, I figured that the HISTORY section would be the right place. Correct? Index: share/man/man9/SipHash24.9 === RCS file:

diff: Adding a device to umass_quirks.c

2014-09-29 Thread Max Fillinger
When I mount my mp3-player (Archos 24y Vision) in OpenBSD, it always takes quite a long time and I see the following output on the console: umass0 at uhub2 port 2 configuration 1 interface 0 ARCHOS ARCHOS rev 2.00/0.00 addr 8 umass0: using SCSI over Bulk-Only scsibus4 at umass0: 2 targets,

[diff] Comments in sys/dev/rnd.c: RC4 - ChaCha20

2014-09-15 Thread Max Fillinger
Not really an important issue, but here's a diff to bring the comments in rnd.c more up to date. In particular: - The PRNG uses ChaCha20 instead of RC4 - The first few bytes are not thrown away anymore - The comments list ways to access the generated randomness; add getentropy() to that list