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: <20250429-begeben-zulagen-543d4ea75ca2@brauner>
Date: Tue, 29 Apr 2025 13:08:02 +0200
From: Christian Brauner <brauner@...nel.org>
To: Jan Kara <jack@...e.cz>
Cc: Joe Damato <jdamato@...tly.com>, Carlos Llamas <cmllamas@...gle.com>, 
	linux-fsdevel@...r.kernel.org, Alexander Viro <viro@...iv.linux.org.uk>, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Sridhar Samudrala <sridhar.samudrala@...el.com>, Alexander Duyck <alexander.h.duyck@...el.com>, 
	open list <linux-kernel@...r.kernel.org>, Tudor Ambarus <tudor.ambarus@...aro.org>, 
	William McVicker <willmcvicker@...gle.com>
Subject: Re: [PATCH vfs/vfs.fixes v2] eventpoll: Set epoll timeout if it's in
 the future

On Tue, Apr 29, 2025 at 12:19:15PM +0200, Jan Kara wrote:
> On Mon 28-04-25 15:41:17, Joe Damato wrote:
> > On Mon, Apr 28, 2025 at 10:32:31PM +0000, Carlos Llamas wrote:
> > > On Mon, Apr 28, 2025 at 09:50:02AM -0700, Joe Damato wrote:
> > > > Thank you for spotting that and sorry for the trouble.
> > > 
> > > This was also flagged by our Android's epoll_pwait2 tests here:
> > > https://android.googlesource.com/platform/bionic/+/refs/heads/main/tests/sys_epoll_test.cpp
> > > They would all timeout, so the hang reported by Christian fits.
> > > 
> > > 
> > > > Christian / Jan what would be the correct way for me to deal with
> > > > this? Would it be to post a v3 (re-submitting the patch in its
> > > > entirety) or to post a new patch that fixes the original and lists
> > > > the commit sha from vfs.fixes with a Fixes tag ?
> > > 
> > > The original commit has landed in mainline already, so it needs to be
> > > new patch at this point. If if helps, here is the tag:
> > > Fixes: 0a65bc27bd64 ("eventpoll: Set epoll timeout if it's in the future")
> > > 
> > > > diff --git a/fs/eventpoll.c b/fs/eventpoll.c
> > > > index 4bc264b854c4..1a5d1147f082 100644
> > > > --- a/fs/eventpoll.c
> > > > +++ b/fs/eventpoll.c
> > > > @@ -2111,7 +2111,9 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
> > > > 
> > > >                 write_unlock_irq(&ep->lock);
> > > > 
> > > > -               if (!eavail && ep_schedule_timeout(to))
> > > > +               if (!ep_schedule_timeout(to))
> > > > +                       timed_out = 1;
> > > > +               else if (!eavail)
> > > >                         timed_out = !schedule_hrtimeout_range(to, slack,
> > > >                                                               HRTIMER_MODE_ABS);
> > > >                 __set_current_state(TASK_RUNNING);
> > > 
> > > I've ran your change through our internal CI and I confirm it fixes the
> > > hangs seen on our end. If you send the fix feel free to add:
> > > 
> > > Tested-by: Carlos Llamas <cmllamas@...gle.com>
> > 
> > Thanks, will do.
> > 
> > I was waiting to hear back from Christian / Jan if they are OK with
> > the proposed fix before submitting something, but glad to hear it
> > fixes the issue for you. Sorry for the trouble.
> 
> Yep, a new patch submission with proper Fixes tag is needed at this point.

Yes, please send a new fixes patch that I can pick up!

Thanks!
Christian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ