public inbox for gfs2@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH v4 1/4] mm/gup: fix wrongly calculated returned value in fault_in_safe_writeable()
       [not found]   ` <20250410204338.4b2101afdf18d8898390ef58@linux-foundation.org>
@ 2025-04-11  5:32     ` Baoquan He
  2025-04-11 15:07       ` Andreas Gruenbacher
  0 siblings, 1 reply; 3+ messages in thread
From: Baoquan He @ 2025-04-11  5:32 UTC (permalink / raw)
  To: Andrew Morton, agruenba, gfs2
  Cc: linux-mm, david, osalvador, yanjun.zhu, linux-kernel

On 04/10/25 at 08:43pm, Andrew Morton wrote:
> On Thu, 10 Apr 2025 11:57:14 +0800 Baoquan He <bhe@redhat.com> wrote:
> 
> > Not like fault_in_readable() or fault_in_writeable(), in
> > fault_in_safe_writeable() local variable 'start' is increased page
> > by page to loop till the whole address range is handled. However,
> > it mistakenly calcalates the size of handled range with 'uaddr - start'.
> 
> What are the userspace-visible runtime effects of this change?

I see it mainly affect gfs2_file_direct_read(). Not sure if GFS2 people
can sense any exceptional behaviour caused by this code bug.

> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v4 1/4] mm/gup: fix wrongly calculated returned value in fault_in_safe_writeable()
  2025-04-11  5:32     ` [PATCH v4 1/4] mm/gup: fix wrongly calculated returned value in fault_in_safe_writeable() Baoquan He
@ 2025-04-11 15:07       ` Andreas Gruenbacher
  2025-04-11 23:22         ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Gruenbacher @ 2025-04-11 15:07 UTC (permalink / raw)
  To: Baoquan He
  Cc: Andrew Morton, gfs2, linux-mm, david, osalvador, yanjun.zhu,
	linux-kernel

On Fri, Apr 11, 2025 at 7:32 AM Baoquan He <bhe@redhat.com> wrote:
> On 04/10/25 at 08:43pm, Andrew Morton wrote:
> > On Thu, 10 Apr 2025 11:57:14 +0800 Baoquan He <bhe@redhat.com> wrote:
> >
> > > Not like fault_in_readable() or fault_in_writeable(), in
> > > fault_in_safe_writeable() local variable 'start' is increased page
> > > by page to loop till the whole address range is handled. However,
> > > it mistakenly calcalates the size of handled range with 'uaddr - start'.
> >
> > What are the userspace-visible runtime effects of this change?
>
> I see it mainly affect gfs2_file_direct_read(). Not sure if GFS2 people
> can sense any exceptional behaviour caused by this code bug.

Thanks for the heads up.

In gfs2, fault_in_iov_iter_writeable() is used in
gfs2_file_direct_read() and gfs2_file_read_iter(), so this potentially
affects buffered as well as direct reads. This bug could cause those
gfs2 functions to spin in a loop.

Can this fix please be sent to Linus for inclusion into 6.15?

Thanks,
Andreas


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v4 1/4] mm/gup: fix wrongly calculated returned value in fault_in_safe_writeable()
  2025-04-11 15:07       ` Andreas Gruenbacher
@ 2025-04-11 23:22         ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2025-04-11 23:22 UTC (permalink / raw)
  To: Andreas Gruenbacher
  Cc: Baoquan He, gfs2, linux-mm, david, osalvador, yanjun.zhu,
	linux-kernel

On Fri, 11 Apr 2025 17:07:32 +0200 Andreas Gruenbacher <agruenba@redhat.com> wrote:

> Can this fix please be sent to Linus for inclusion into 6.15?

Sure, I made the adjustments.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-11 23:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250410035717.473207-1-bhe@redhat.com>
     [not found] ` <20250410035717.473207-2-bhe@redhat.com>
     [not found]   ` <20250410204338.4b2101afdf18d8898390ef58@linux-foundation.org>
2025-04-11  5:32     ` [PATCH v4 1/4] mm/gup: fix wrongly calculated returned value in fault_in_safe_writeable() Baoquan He
2025-04-11 15:07       ` Andreas Gruenbacher
2025-04-11 23:22         ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox