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] [thread-next>] [day] [month] [year] [list]
Message-ID: <bcf174d8-607b-e61a-2091-eccd3ffe0dfe@kernel.dk>
Date:   Fri, 14 Jul 2023 08:52:40 -0600
From:   Jens Axboe <axboe@...nel.dk>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     io-uring@...r.kernel.org, linux-kernel@...r.kernel.org,
        tglx@...utronix.de, mingo@...hat.com, andres@...razel.de
Subject: Re: [PATCH 4/8] io_uring: add support for futex wake and wait

On 7/13/23 11:24?AM, Peter Zijlstra wrote:
> On Thu, Jul 13, 2023 at 01:15:13PM +0200, Peter Zijlstra wrote:
>> On Wed, Jul 12, 2023 at 10:20:13AM -0600, Jens Axboe wrote:
>>
>>> +int io_futex_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
>>> +{
>>> +	struct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);
>>> +
>>> +	if (unlikely(sqe->addr2 || sqe->buf_index || sqe->addr3))
>>> +		return -EINVAL;
>>> +
>>> +	iof->futex_op = READ_ONCE(sqe->fd);
>>> +	iof->uaddr = u64_to_user_ptr(READ_ONCE(sqe->addr));
>>> +	iof->futex_val = READ_ONCE(sqe->len);
>>> +	iof->futex_mask = READ_ONCE(sqe->file_index);
>>> +	iof->futex_flags = READ_ONCE(sqe->futex_flags);
>>> +	if (iof->futex_flags & FUTEX_CMD_MASK)
>>> +		return -EINVAL;
>>> +
>>> +	return 0;
>>> +}
>>
>> I'm a little confused on the purpose of iof->futex_op, it doesn't appear
>> to be used. Instead iof->futex_flags is used as the ~FUTEX_CMD_MASK part
>> of ops.
>>
>> The latter actually makes sense since you encode the actual op in the
>> IOURING_OP_ space.
> 
> Futex is slowly getting back to me; I'm thinking these io_uring
> interfaces should perhaps use the futex2 flags instead of the futex_op
> encoded muck.
> 
> I'll try and send out a few patches tomorrow to clarify things a little
> -- the futex2 work seems to have stalled somewhere halfway :/

Saw your series - I'll take a look. In terms of staging when we get
there, would it be possible to split your flags series into the bare
minimum and trivial, and then have that as a dependency for this series
and the rest of your series?

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ