Hi Lucas, On 5/12/22, Lucas De Marchi <lucas.demarchi@xxxxxxxxx> wrote: > On Mon, May 02, 2022 at 04:06:01PM +0200, Jason A. Donenfeld wrote: >>Events that poll() responds to are supposed to be consumed when the file >>is read(), not by the poll() itself. By putting it on the poll() itself, >>it makes it impossible to poll() on a epoll file descriptor, since the >>event gets consumed too early. Jann wrote a PoC, available in the link >>below. >> >>Reported-by: Jann Horn <jannh@xxxxxxxxxx> >>Cc: Kees Cook <keescook@xxxxxxxxxxxx> >>Cc: Luis Chamberlain <mcgrof@xxxxxxxxxx> >>Cc: linux-fsdevel@xxxxxxxxxxxxxxx >>Link: >> https://lore.kernel.org/lkml/CAG48ez1F0P7Wnp=PGhiUej=u=8CSF6gpD9J=Oxxg0buFRqV1tA@xxxxxxxxxxxxxx/ >>Signed-off-by: Jason A. Donenfeld <Jason@xxxxxxxxx> > > It seems to be my bug. This is indeed better. Also, I don't think it's > unsafe > to fix it like this neither. If my memory serves (it's what, 10+ years?), > this > was only tested and used with poll(), which will continue to work. You are not correct. Please read the entire thread. This breaks systemd. Jason