Re: macppc kernel and clang

2020-03-18 Thread George Koehler
On Tue, 17 Mar 2020 13:23:28 -0400 George Koehler wrote: > clang -static -L. -nopie -o instbin instbin.o dd.lo ... > /usr/bin/ld: dd.lo(.text+0x14): R_PPC_PLTREL24 reloc against local symbol > > ... > > Passing -M to crunchgen(8), as we do on {longsoon,octeon,sgi}, might > work around the

Re: bt.5: Fix time() description

2020-03-18 Thread Ingo Schwarze
Hi Martin, hi Klemens, Martin Pieuchot wrote on Wed, Mar 18, 2020 at 09:06:24PM +0100: > On 18/03/20(Wed) 20:45, Klemens Nanni wrote: >> It takes a format string, e.g. >> >> syscall:sysctl:entry { >> time("%+\n") >> } I can't comment on the content of bt(5). > This is

Re: bt.5: Fix time() description

2020-03-18 Thread Klemens Nanni
On Wed, Mar 18, 2020 at 09:06:24PM +0100, Martin Pieuchot wrote: > This is indeed an improvement, thanks! I don't know how to point that > 'format' or 'timefmt' is the same as describe in strftime(3). Does that > mean strftime(3) should appear in SEE ALSO? I see no value in adding it to that

Re: bt.5: Fix time() description

2020-03-18 Thread Martin Pieuchot
On 18/03/20(Wed) 20:45, Klemens Nanni wrote: > It takes a format string, e.g. > > syscall:sysctl:entry { > time("%+\n") > } > This is indeed an improvement, thanks! I don't know how to point that 'format' or 'timefmt' is the same as describe in strftime(3). Does that

bt.5: Fix time() description

2020-03-18 Thread Klemens Nanni
It takes a format string, e.g. syscall:sysctl:entry { time("%+\n") } OK? Index: bt.5 === RCS file: /cvs/src/usr.sbin/btrace/bt.5,v retrieving revision 1.2 diff -u -p -r1.2 bt.5 --- bt.527

Re: usb(4): use cacheable buffers for data transfers (massive speedup)

2020-03-18 Thread Patrick Wildt
On Wed, Mar 18, 2020 at 11:22:40AM +0100, Patrick Wildt wrote: > Hi, > > I've spent a few days investigating why USB ethernet adapters are so > horribly slow on my ARMs. Using dt(4) I realized that it was spending > most of its time in memcpy. But, why? As it turns out, all USB data > buffers

Re: Patch: Sending credentials over Unix datagram sockets

2020-03-18 Thread David Mackay
Claudio Jeker wrote: > I highly suspect that this is not correct without further changes. > There is a reason why the comment is explicit about the fact that it only > works if SCM_RIGHTS is the only control message type. Just ignoring this > fact is probably a security risk. Isn't the

Re: uvm_map_inentry diff for testing

2020-03-18 Thread Martin Pieuchot
On 18/03/20(Wed) 11:55, Mark Kettenis wrote: > > Date: Wed, 18 Mar 2020 11:34:59 +0100 > > From: Martin Pieuchot > > > > On 17/03/20(Tue) 20:08, Mark Kettenis wrote: > > > While playing with dt(4)/btrace(4) flamegraphs on a 32-core arm64 > > > machine, I noticed that the kernel was spending a

Re: uvm_map_inentry diff for testing

2020-03-18 Thread Mark Kettenis
> Date: Wed, 18 Mar 2020 11:34:59 +0100 > From: Martin Pieuchot > > On 17/03/20(Tue) 20:08, Mark Kettenis wrote: > > While playing with dt(4)/btrace(4) flamegraphs on a 32-core arm64 > > machine, I noticed that the kernel was spending a lot of time (6.84%) > > in uvm_map_inentry(). This is

Re: uvm_map_inentry diff for testing

2020-03-18 Thread Martin Pieuchot
On 17/03/20(Tue) 20:08, Mark Kettenis wrote: > While playing with dt(4)/btrace(4) flamegraphs on a 32-core arm64 > machine, I noticed that the kernel was spending a lot of time (6.84%) > in uvm_map_inentry(). This is caused by kernel lock contention. > Pushing baack the kernel lock further into

Re: Regarding the understanding of the malloc(3) code

2020-03-18 Thread Otto Moerbeek
On Wed, Mar 18, 2020 at 03:35:45PM +0530, Neeraj Pal wrote: > On Wed, 18 Mar, 2020, 12:46 pm Otto Moerbeek, wrote: > > > There are several types of canaries. They try to detect corruption of > > various meta data structures. There are alo canaries for user allocated > > data, they are enabled

usb(4): use cacheable buffers for data transfers (massive speedup)

2020-03-18 Thread Patrick Wildt
Hi, I've spent a few days investigating why USB ethernet adapters are so horribly slow on my ARMs. Using dt(4) I realized that it was spending most of its time in memcpy. But, why? As it turns out, all USB data buffers are mapped COHERENT, which on some/most ARMs means uncached. Using cached

Re: Patch: Sending credentials over Unix datagram sockets

2020-03-18 Thread Claudio Jeker
On Wed, Mar 18, 2020 at 02:53:14AM -, David Mackay wrote: > Dear openbsd-tech, > > On GNU HURD and FreeBSD, the control message SCM_CREDS may be allocated by a > client of a Unix datagram socket. When the kernel encounters this, it fills > out > a struct cmsgcred containing PID, UID, GID,

Re: Regarding the understanding of the malloc(3) code

2020-03-18 Thread Neeraj Pal
On Wed, 18 Mar, 2020, 12:46 pm Otto Moerbeek, wrote: > There are several types of canaries. They try to detect corruption of > various meta data structures. There are alo canaries for user allocated > data, they are enabled with the C option. > Yeah, I am using option C through sysctl(8) to

Re: Patch: Sending credentials over Unix datagram sockets

2020-03-18 Thread Stuart Henderson
On 2020/03/18 02:53, David Mackay wrote: > Dear openbsd-tech, > > On GNU HURD and FreeBSD, the control message SCM_CREDS may be allocated by a > client of a Unix datagram socket. When the kernel encounters this, it fills > out > a struct cmsgcred containing PID, UID, GID, effective UID, and

Re: Regarding the understanding of the malloc(3) code

2020-03-18 Thread Otto Moerbeek
On Wed, Mar 18, 2020 at 07:29:51AM +0530, Neeraj Pal wrote: > On Fri, Mar 13, 2020, at 11:45 AM Otto Moerbeek wrote: > > > > Please indent your code snippets. > yeah, my apologies. I shall indent the code snippets. > > > > > di_info is special. Having a guard page on both sides for regular > >