Enable rge(4) on arm64

2020-02-02 Thread Kevin Lo
Hi, I'd like to enable rge(4) on arm64. Tested on rockpro64: https://0x0.st/iztI.txt ok? Index: sys/arch/arm64/conf/GENERIC === RCS file: /cvs/src/sys/arch/arm64/conf/GENERIC,v retrieving revision 1.140 diff -u -p -u -p -r1.140 GENE

Re: Add support for hex floats to *scanf

2020-02-02 Thread ori
>> I wasn't sure which comments I should carry over from the CT_INT case >> (for example, above `case 'x':`), or if any of the other changes require >> additional comments. Please let me know if they do. > > Just bumping this so it doesn't get forgotten. I'd be happy to address > any feedback anyo

[PATCH] pledge: allow kern.somaxconn sysctl for inet

2020-02-02 Thread Jimmy Brush
No golang tcp server can be pledged without this change because it queries kern.somaxconn before it listens on a tcp socket[1][2][3]. I cannot think of any advantage this change would give an attacker who has compromised a pledged process. [1] https://golang.org/src/net/sock_posix.go#L57 [2] http

Re: Document that openlog's first paramater must continue to point to valid data

2020-02-02 Thread Theo de Raadt
Laurence Tratt wrote: > On Sun, Feb 02, 2020 at 04:20:13PM -0700, Theo de Raadt wrote: > > Hello Theo, > > > What is the difference between storage and contents > > You can't free() the backing memory *and* (according to GNU's man page, at > least) you can't safely change the string contents e

Re: Document that openlog's first paramater must continue to point to valid data

2020-02-02 Thread Laurence Tratt
On Sun, Feb 02, 2020 at 04:20:13PM -0700, Theo de Raadt wrote: Hello Theo, > What is the difference between storage and contents You can't free() the backing memory *and* (according to GNU's man page, at least) you can't safely change the string contents either on some OSs. I've tried something

Re: Document that openlog's first paramater must continue to point to valid data

2020-02-02 Thread Theo de Raadt
Laurence Tratt wrote: > On Sun, Feb 02, 2020 at 03:22:12PM -0700, Theo de Raadt wrote: > > Hello Theo, > > >> OpenBSD's documentation for openlog's first paramater 'ident' is less > >> clear than Debian [1] or GNU [2] that the memory pointed to must remain > >> valid for as long as syslog is ca

Re: Document that openlog's first paramater must continue to point to valid data

2020-02-02 Thread Laurence Tratt
On Sun, Feb 02, 2020 at 03:22:12PM -0700, Theo de Raadt wrote: Hello Theo, >> OpenBSD's documentation for openlog's first paramater 'ident' is less >> clear than Debian [1] or GNU [2] that the memory pointed to must remain >> valid for as long as syslog is called (which I'm assuming without hard

Re: Document that openlog's first paramater must continue to point to valid data

2020-02-02 Thread Theo de Raadt
>OpenBSD's documentation for openlog's first paramater 'ident' is less clear >than Debian [1] or GNU [2] that the memory pointed to must remain valid for >as long as syslog is called (which I'm assuming without hard evidence is >equivalent to "until closelog is called"). > >Although this isn't spec

Document that openlog's first paramater must continue to point to valid data

2020-02-02 Thread Laurence Tratt
OpenBSD's documentation for openlog's first paramater 'ident' is less clear than Debian [1] or GNU [2] that the memory pointed to must remain valid for as long as syslog is called (which I'm assuming without hard evidence is equivalent to "until closelog is called"). Although this isn't specified

Include AUDIO_MIXER_xxx ioctls in the "audio" pledge() promise

2020-02-02 Thread Alexandre Ratchov
The plan is to make sndiod need to control volume knobs. This diff adds the AUDIO_MIXER_xxx ioctls to the "audio" pledge. Another option would be to introduce a new "audioctl" promise, but IMHO we don't seed such fine-grained promises. OK? Index: kern_pledge.c

Re: acpiac(4): refresh status after resume (looking for tests)

2020-02-02 Thread Jeremie Courreges-Anglas
On Sat, Jan 25 2020, Jeremie Courreges-Anglas wrote: > So I have this diff for apmd -z/-Z that uses APM_POWER_CHANGE events to > trigger autosuspend. It works fine except for one glitch: if I plug the > AC cable and then resume, apmd will receive another APM_POWER_CHANGE > event and read the powe

Re: ldom.conf: curly braces in vnet block

2020-02-02 Thread Klemens Nanni
On Sun, Feb 02, 2020 at 01:50:58PM +, Andrew Grillet wrote: > I have used the mac-addr feature (for netboot reasons). I think this > probably caused me grief > but I assumed I was at fault and did not bother reporting it. Please consider to do so in the future. > I prefer same line, no curly b

Re: ldom.conf: curly braces in vnet block

2020-02-02 Thread Andrew Grillet
I have used the mac-addr feature (for netboot reasons). I think this probably caused me grief but I assumed I was at fault and did not bother reporting it. I prefer same line, no curly braces, and accurate documentation. And also error messages that are more explicit: Vnet.conf:4 Syntax error - Un

ldom.conf: curly braces in vnet block

2020-02-02 Thread Klemens Nanni
ldom.conf(5) says vnet [{keyword=value ...}] Assign a vnet(4) network interface to the guest domain. This keyword can be used multiple times. The curly braces are optional and can contain the following keywords: But curly braces must not e

Re: [patch] /bin/cp: reduce scope variable

2020-02-02 Thread Theo de Raadt
>On Sat, Feb 01, 2020 at 04:57:26PM +0100, Ingo Schwarze wrote: >> Hi Jeremie, >> >> Jeremie Courreges-Anglas wrote on Sat, Feb 01, 2020 at 01:37:32PM +0100: >> > On Fri, Jan 31 2020, Ingo Schwarze wrote: >> >> ngc...@gmail.com wrote on Fri, Jan 31, 2020 at 10:14:52PM +0900: >> >> >>> Reduce sco

Re: [patch] /bin/cp: reduce scope variable

2020-02-02 Thread Marc Espie
On Sat, Feb 01, 2020 at 04:57:26PM +0100, Ingo Schwarze wrote: > Hi Jeremie, > > Jeremie Courreges-Anglas wrote on Sat, Feb 01, 2020 at 01:37:32PM +0100: > > On Fri, Jan 31 2020, Ingo Schwarze wrote: > >> ngc...@gmail.com wrote on Fri, Jan 31, 2020 at 10:14:52PM +0900: > > >>> Reduce scope of a

Replace ttkqflush() with klist_invalidate()

2020-02-02 Thread Visa Hankala
tty(4) uses custom code for revoking knotes. It should be changed to use klist_invalidate() to handle the revocation in one place. The following diff does that. In addition, the patch makes the code store the tty context pointer in kn_hook directly. This simplifies the code. Unlike ttkqflush(), k