Re: start unlocking kbind(2)

2022-06-15 Thread Scott Cheloha
On Wed, Jun 15, 2022 at 06:17:07PM -0600, Theo de Raadt wrote: > Mark Kettenis wrote: > > > Well, I believe that Scott was trying to fix a race condition that can > > only happen if code is using kbind(2) incorrectly, i.e. when the > > threads deliberately pass different cookies to kbind(2) or

Re: start unlocking kbind(2)

2022-06-15 Thread Theo de Raadt
Mark Kettenis wrote: > Well, I believe that Scott was trying to fix a race condition that can > only happen if code is using kbind(2) incorrectly, i.e. when the > threads deliberately pass different cookies to kbind(2) or execute > kbind(2) from different "text" addresses. > > I still think the

Re: start unlocking kbind(2)

2022-06-15 Thread Mark Kettenis
> From: Philip Guenther > Date: Wed, 15 Jun 2022 10:07:06 -0900 > > On Mon, 13 Jun 2022, Theo de Raadt wrote: > > Scott Cheloha wrote: > > > > Am I wrong that kbind is never called twice in the same address space? > > > > > > Isn't this exactly what happened the last time we tried this? > > >

Re: start unlocking kbind(2)

2022-06-15 Thread Philip Guenther
On Mon, 13 Jun 2022, Theo de Raadt wrote: > Scott Cheloha wrote: > > > Am I wrong that kbind is never called twice in the same address space? > > > > Isn't this exactly what happened the last time we tried this? > > Tried what? kbind has never been NOLOCK. Scott's referring to rev 1.237 of

Re: bgpd prevent infinite-loop in pfkey code

2022-06-15 Thread Theo Buehler
On Wed, Jun 15, 2022 at 04:34:41PM +0200, Claudio Jeker wrote: > Found by accident. If the pfkey message failed (sadb_msg_errno is set) > then the pfkey code ends in an infinite loop because the erroneous message > is not removed from the queue. > > pfkey_read() PEEKS at the message and returns 0

bgpd prevent infinite-loop in pfkey code

2022-06-15 Thread Claudio Jeker
Found by accident. If the pfkey message failed (sadb_msg_errno is set) then the pfkey code ends in an infinite loop because the erroneous message is not removed from the queue. pfkey_read() PEEKS at the message and returns 0 since it is what we expect. pfkey_reply() realizes it is an error and

Re: m4: gnu-m4 compat draft

2022-06-15 Thread Marc Espie
On Wed, Jun 08, 2022 at 09:44:19PM +0200, Marc Espie wrote: > Naddy told me about an app that wants a gnu-m4 extension that > requires >9 arguments to macros. > > I wrote a very quick patch that seems to do the work. There are probably > lots of kinks to work out, it's been very lightly tested.

Re: don't depend on pfkeyv2.h in portable bgpd code

2022-06-15 Thread Theo Buehler
On Wed, Jun 15, 2022 at 01:43:29PM +0200, Claudio Jeker wrote: > So pfkeyv2.h defines managed to sneak into the portable part of bgpd. > The fix was to just dump a pfkeyv2.h version into the -portable compat > code and call it a day. This is bad since pfkeyv2.h is highly OS > dependent. > > This

don't depend on pfkeyv2.h in portable bgpd code

2022-06-15 Thread Claudio Jeker
So pfkeyv2.h defines managed to sneak into the portable part of bgpd. The fix was to just dump a pfkeyv2.h version into the -portable compat code and call it a day. This is bad since pfkeyv2.h is highly OS dependent. This diff cleans up the mess by introducing new enums for the various IPsec

Re: [v2] amd64: simplify TSC sync testing

2022-06-15 Thread Stuart Henderson
Hi Scott, just installing on another 2-socket machine, could you point me at the latest version of the TSC sync testing diff please?

Re: bgpd more kroute cleanup

2022-06-15 Thread Claudio Jeker
On Tue, Jun 14, 2022 at 08:14:45PM +0200, Theo Buehler wrote: > On Tue, Jun 14, 2022 at 06:36:13PM +0200, Claudio Jeker wrote: > > This diff does introduce a new flag for routes that have been inserted > > into the FIB. Now I actually renamed the F_BGPD_INSERTED flag to F_BGPD > > and reused

Re: [PATCH 1/1] drm/amdgpu: Fix double free of dmabuf

2022-06-15 Thread Jonathan Gray
As mentioned earlier, you should send these patches to the linux maintainers. We don't even build this file. On Wed, Jun 15, 2022 at 11:29:31AM +0800, Xiaohui Zhang wrote: > amdgpu_amdkfd_gpuvm_free_memory_of_gpu drop dmabuf reference increased in > amdgpu_gem_prime_export. > amdgpu_bo_destroy

[PATCH 1/1] drm/amdgpu: Fix double free of dmabuf

2022-06-15 Thread Xiaohui Zhang
amdgpu_amdkfd_gpuvm_free_memory_of_gpu drop dmabuf reference increased in amdgpu_gem_prime_export. amdgpu_bo_destroy drop dmabuf reference increased in amdgpu_gem_prime_import. So remove this extra dma_buf_put to avoid double free. Signed-off-by: Xiaohui Zhang ---