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: <6d6df27f-a5c3-d6dd-ac1c-1d1c0fe53aaa@kernel.dk>
Date:   Wed, 17 Aug 2022 10:44:16 -0600
From:   Jens Axboe <axboe@...nel.dk>
To:     Dylan Yudaken <dylany@...com>, viro@...iv.linux.org.uk,
        bcrl@...ck.org
Cc:     linux-fsdevel@...r.kernel.org, linux-aio@...ck.org,
        linux-kernel@...r.kernel.org, Kernel-team@...com
Subject: Re: [PATCH] eventfd: guard wake_up in eventfd fs calls as well

On 8/16/22 07:59, Dylan Yudaken wrote:
> Guard wakeups that the user can trigger, and that may end up triggering a
> call back into eventfd_signal. This is in addition to the current approach
> that only guards in eventfd_signal.
> 
> Rename in_eventfd_signal -> in_eventfd at the same time to reflect this.
> 
> Without this there would be a deadlock in the following code using libaio:
> 
> int main()
> {
> 	struct io_context *ctx = NULL;
> 	struct iocb iocb;
> 	struct iocb *iocbs[] = { &iocb };
> 	int evfd;
>         uint64_t val = 1;
> 
> 	evfd = eventfd(0, EFD_CLOEXEC);
> 	assert(!io_setup(2, &ctx));
> 	io_prep_poll(&iocb, evfd, POLLIN);
> 	io_set_eventfd(&iocb, evfd);
> 	assert(1 == io_submit(ctx, 1, iocbs));
>         write(evfd, &val, 8);
> }

Reviewed-by: Jens Axboe <axboe@...nel.dk>

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ