lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <657d1713-b4dc-4ecd-be9e-599a1c8e7a09@kernel.dk>
Date: Mon, 13 Jan 2025 07:41:04 -0700
From: Jens Axboe <axboe@...nel.dk>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Jann Horn <jannh@...gle.com>, Thomas Gleixner <tglx@...utronix.de>,
 Ingo Molnar <mingo@...hat.com>, Darren Hart <dvhart@...radead.org>,
 Davidlohr Bueso <dave@...olabs.net>, André Almeida
 <andrealmeid@...lia.com>, kernel list <linux-kernel@...r.kernel.org>,
 Pavel Begunkov <asml.silence@...il.com>, io-uring <io-uring@...r.kernel.org>
Subject: Re: futex+io_uring: futex_q::task can maybe be dangling (but is not
 actually accessed, so it's fine)

On 1/13/25 7:38 AM, Peter Zijlstra wrote:
> On Fri, Jan 10, 2025 at 08:33:34PM -0700, Jens Axboe wrote:
> 
>> @@ -548,7 +549,7 @@ void __futex_queue(struct futex_q *q, struct futex_hash_bucket *hb)
>>  
>>  	plist_node_init(&q->list, prio);
>>  	plist_add(&q->list, &hb->chain);
>> -	q->task = current;
>> +	q->task = task;
>>  }
>>  
>>  /**
> 
> The alternative is, I suppose, to move the q->task assignment out to
> these two callsites instead. Thomas, any opinions?

That suggestion was posed in my reply as well, but I didn't spend the
time checking if it was safe/feasible. If you/Thomas think it's safe, we
can certainly do that instead. But I'd much rather you make that call
than me :-)

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ