* [PATCH] tools/testing/vma: add missing function stub
@ 2025-05-28 14:15 Lorenzo Stoakes via B4 Relay
2025-05-28 14:40 ` Liam R. Howlett
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Lorenzo Stoakes via B4 Relay @ 2025-05-28 14:15 UTC (permalink / raw)
To: Andrew Morton, Liam R. Howlett, Vlastimil Babka, Jann Horn,
Pedro Falcato
Cc: linux-mm, linux-kernel, Lorenzo Stoakes
From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
The hugetlb fix introduced in commit ee40c9920ac2 ("mm: fix copy_vma()
error handling for hugetlb mappings") mistakenly did not provide a stub for
the VMA userland testing, which results in a compile error when trying to
build this.
Provide this stub to resolve the issue.
---
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
---
tools/testing/vma/vma_internal.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/testing/vma/vma_internal.h b/tools/testing/vma/vma_internal.h
index f6e45e62da3a6ee007b7431573f27ef5c2533865..441feb21aa5a92b7edddb07258c7f368171de15b 100644
--- a/tools/testing/vma/vma_internal.h
+++ b/tools/testing/vma/vma_internal.h
@@ -1461,4 +1461,9 @@ static inline int __call_mmap_prepare(struct file *file,
return file->f_op->mmap_prepare(desc);
}
+static inline void fixup_hugetlb_reservations(struct vm_area_struct *vma)
+{
+ (void)vma;
+}
+
#endif /* __MM_VMA_INTERNAL_H */
---
base-commit: 1637eadc7fdf2fa4069a149b1e836656a3b64150
change-id: 20250528-fix-vma-test-57b138f28f46
Best regards,
--
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tools/testing/vma: add missing function stub
2025-05-28 14:15 [PATCH] tools/testing/vma: add missing function stub Lorenzo Stoakes via B4 Relay
@ 2025-05-28 14:40 ` Liam R. Howlett
2025-05-28 22:52 ` Andrew Morton
2025-05-29 8:39 ` Pedro Falcato
2 siblings, 0 replies; 7+ messages in thread
From: Liam R. Howlett @ 2025-05-28 14:40 UTC (permalink / raw)
To: lorenzo.stoakes
Cc: Andrew Morton, Vlastimil Babka, Jann Horn, Pedro Falcato,
linux-mm, linux-kernel
* Lorenzo Stoakes via B4 Relay <devnull+lorenzo.stoakes.oracle.com@kernel.org> [250528 10:16]:
> From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
>
> The hugetlb fix introduced in commit ee40c9920ac2 ("mm: fix copy_vma()
> error handling for hugetlb mappings") mistakenly did not provide a stub for
> the VMA userland testing, which results in a compile error when trying to
> build this.
>
> Provide this stub to resolve the issue.
I need to be more careful in reviews for these things in the future.
LGTM.
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
>
> ---
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> ---
> tools/testing/vma/vma_internal.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/tools/testing/vma/vma_internal.h b/tools/testing/vma/vma_internal.h
> index f6e45e62da3a6ee007b7431573f27ef5c2533865..441feb21aa5a92b7edddb07258c7f368171de15b 100644
> --- a/tools/testing/vma/vma_internal.h
> +++ b/tools/testing/vma/vma_internal.h
> @@ -1461,4 +1461,9 @@ static inline int __call_mmap_prepare(struct file *file,
> return file->f_op->mmap_prepare(desc);
> }
>
> +static inline void fixup_hugetlb_reservations(struct vm_area_struct *vma)
> +{
> + (void)vma;
> +}
> +
> #endif /* __MM_VMA_INTERNAL_H */
>
> ---
> base-commit: 1637eadc7fdf2fa4069a149b1e836656a3b64150
> change-id: 20250528-fix-vma-test-57b138f28f46
>
> Best regards,
> --
> Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tools/testing/vma: add missing function stub
2025-05-28 14:15 [PATCH] tools/testing/vma: add missing function stub Lorenzo Stoakes via B4 Relay
2025-05-28 14:40 ` Liam R. Howlett
@ 2025-05-28 22:52 ` Andrew Morton
2025-05-29 5:39 ` Lorenzo Stoakes
2025-05-29 8:39 ` Pedro Falcato
2 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2025-05-28 22:52 UTC (permalink / raw)
To: lorenzo.stoakes
Cc: Lorenzo Stoakes via B4 Relay, Liam R. Howlett, Vlastimil Babka,
Jann Horn, Pedro Falcato, linux-mm, linux-kernel
On Wed, 28 May 2025 15:15:39 +0100 Lorenzo Stoakes via B4 Relay <devnull+lorenzo.stoakes.oracle.com@kernel.org> wrote:
> From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
>
> The hugetlb fix introduced in commit ee40c9920ac2 ("mm: fix copy_vma()
> error handling for hugetlb mappings") mistakenly did not provide a stub for
> the VMA userland testing, which results in a compile error when trying to
> build this.
Thanks, I'll add the Fixes: and the cc:stable (because ee40c9920ac2 had
cc:stable).
> Provide this stub to resolve the issue.
>
> ---
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
SOB goes above the "^---$", please ;)
> --- a/tools/testing/vma/vma_internal.h
> +++ b/tools/testing/vma/vma_internal.h
> @@ -1461,4 +1461,9 @@ static inline int __call_mmap_prepare(struct file *file,
> return file->f_op->mmap_prepare(desc);
> }
>
> +static inline void fixup_hugetlb_reservations(struct vm_area_struct *vma)
> +{
> + (void)vma;
<Curiousity> Was this statement found to be needed? Normally we just
use an empty function body in such cases.
> +}
> +
> #endif /* __MM_VMA_INTERNAL_H */
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tools/testing/vma: add missing function stub
2025-05-28 22:52 ` Andrew Morton
@ 2025-05-29 5:39 ` Lorenzo Stoakes
2025-05-29 15:23 ` Andrew Morton
0 siblings, 1 reply; 7+ messages in thread
From: Lorenzo Stoakes @ 2025-05-29 5:39 UTC (permalink / raw)
To: Andrew Morton
Cc: Lorenzo Stoakes via B4 Relay, Liam R. Howlett, Vlastimil Babka,
Jann Horn, Pedro Falcato, linux-mm, linux-kernel
On Wed, May 28, 2025 at 03:52:18PM -0700, Andrew Morton wrote:
> On Wed, 28 May 2025 15:15:39 +0100 Lorenzo Stoakes via B4 Relay <devnull+lorenzo.stoakes.oracle.com@kernel.org> wrote:
>
> > From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> >
> > The hugetlb fix introduced in commit ee40c9920ac2 ("mm: fix copy_vma()
> > error handling for hugetlb mappings") mistakenly did not provide a stub for
> > the VMA userland testing, which results in a compile error when trying to
> > build this.
>
> Thanks, I'll add the Fixes: and the cc:stable (because ee40c9920ac2 had
> cc:stable).
Yeah I intentionally excluded those, as it'll lead to some backport pain
for something that isn't shipped.
I'm not sure if we generally backport test fixes as a rule? Though I
suppose it might be useful if somebody is investigating an issue in a
stable kernel.
>
> > Provide this stub to resolve the issue.
> >
> > ---
> > Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
>
> SOB goes above the "^---$", please ;)
b4 decided to do this :) first experiment with it. Will look at options, I also
pinged Konstantin.
>
> > --- a/tools/testing/vma/vma_internal.h
> > +++ b/tools/testing/vma/vma_internal.h
> > @@ -1461,4 +1461,9 @@ static inline int __call_mmap_prepare(struct file *file,
> > return file->f_op->mmap_prepare(desc);
> > }
> >
> > +static inline void fixup_hugetlb_reservations(struct vm_area_struct *vma)
> > +{
> > + (void)vma;
>
> <Curiousity> Was this statement found to be needed? Normally we just
> use an empty function body in such cases.
I _could have sworn_ I was getting warnings in the gcc version I was using
the past by not doing this.
At any rate, it's consistent-ish with other functions here.
Since this is a churn-friendly file, I"ll probably do a pass to make all
the signatures consistent (by just removing variable names probably) at
some point.
>
> > +}
> > +
> > #endif /* __MM_VMA_INTERNAL_H */
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tools/testing/vma: add missing function stub
2025-05-28 14:15 [PATCH] tools/testing/vma: add missing function stub Lorenzo Stoakes via B4 Relay
2025-05-28 14:40 ` Liam R. Howlett
2025-05-28 22:52 ` Andrew Morton
@ 2025-05-29 8:39 ` Pedro Falcato
2025-05-30 5:15 ` Oliver Sang
2 siblings, 1 reply; 7+ messages in thread
From: Pedro Falcato @ 2025-05-29 8:39 UTC (permalink / raw)
To: lorenzo.stoakes
Cc: Andrew Morton, Liam R. Howlett, Vlastimil Babka, Jann Horn,
linux-mm, linux-kernel, oliver.sang
On Wed, May 28, 2025 at 03:15:39PM +0100, Lorenzo Stoakes via B4 Relay wrote:
> From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
>
> The hugetlb fix introduced in commit ee40c9920ac2 ("mm: fix copy_vma()
> error handling for hugetlb mappings") mistakenly did not provide a stub for
> the VMA userland testing, which results in a compile error when trying to
> build this.
>
> Provide this stub to resolve the issue.
>
> ---
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
I wonder if we could get the test bots to also build and run the userspace tests?
It would help finding this before getting merged, while also actively testing
vmas, xarray, maple, etc.
+Cc Oliver
--
Pedro
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tools/testing/vma: add missing function stub
2025-05-29 5:39 ` Lorenzo Stoakes
@ 2025-05-29 15:23 ` Andrew Morton
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Morton @ 2025-05-29 15:23 UTC (permalink / raw)
To: Lorenzo Stoakes
Cc: Lorenzo Stoakes via B4 Relay, Liam R. Howlett, Vlastimil Babka,
Jann Horn, Pedro Falcato, linux-mm, linux-kernel
On Thu, 29 May 2025 06:39:09 +0100 Lorenzo Stoakes <lorenzo.stoakes@oracle.com> wrote:
> On Wed, May 28, 2025 at 03:52:18PM -0700, Andrew Morton wrote:
> > On Wed, 28 May 2025 15:15:39 +0100 Lorenzo Stoakes via B4 Relay <devnull+lorenzo.stoakes.oracle.com@kernel.org> wrote:
> >
> > > From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> > >
> > > The hugetlb fix introduced in commit ee40c9920ac2 ("mm: fix copy_vma()
> > > error handling for hugetlb mappings") mistakenly did not provide a stub for
> > > the VMA userland testing, which results in a compile error when trying to
> > > build this.
> >
> > Thanks, I'll add the Fixes: and the cc:stable (because ee40c9920ac2 had
> > cc:stable).
>
> Yeah I intentionally excluded those, as it'll lead to some backport pain
> for something that isn't shipped.
>
> I'm not sure if we generally backport test fixes as a rule? Though I
> suppose it might be useful if somebody is investigating an issue in a
> stable kernel.
I do like to backport selftests fixes if doing so avoids bogus failures
and especially if they fix build breakage.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tools/testing/vma: add missing function stub
2025-05-29 8:39 ` Pedro Falcato
@ 2025-05-30 5:15 ` Oliver Sang
0 siblings, 0 replies; 7+ messages in thread
From: Oliver Sang @ 2025-05-30 5:15 UTC (permalink / raw)
To: Pedro Falcato
Cc: lorenzo.stoakes, Andrew Morton, Liam R. Howlett, Vlastimil Babka,
Jann Horn, linux-mm, linux-kernel, philip.li, oliver.sang
hi, Pedro,
On Thu, May 29, 2025 at 09:39:11AM +0100, Pedro Falcato wrote:
> On Wed, May 28, 2025 at 03:15:39PM +0100, Lorenzo Stoakes via B4 Relay wrote:
> > From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> >
> > The hugetlb fix introduced in commit ee40c9920ac2 ("mm: fix copy_vma()
> > error handling for hugetlb mappings") mistakenly did not provide a stub for
> > the VMA userland testing, which results in a compile error when trying to
> > build this.
> >
> > Provide this stub to resolve the issue.
> >
> > ---
> > Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
>
> Reviewed-by: Pedro Falcato <pfalcato@suse.de>
>
> I wonder if we could get the test bots to also build and run the userspace tests?
> It would help finding this before getting merged, while also actively testing
> vmas, xarray, maple, etc.
enabling other test suites under tools/testing besides selftests is in our plan.
unfortunately, we are still seeking resource to do it now.
>
> +Cc Oliver
>
> --
> Pedro
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-05-30 5:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-28 14:15 [PATCH] tools/testing/vma: add missing function stub Lorenzo Stoakes via B4 Relay
2025-05-28 14:40 ` Liam R. Howlett
2025-05-28 22:52 ` Andrew Morton
2025-05-29 5:39 ` Lorenzo Stoakes
2025-05-29 15:23 ` Andrew Morton
2025-05-29 8:39 ` Pedro Falcato
2025-05-30 5:15 ` Oliver Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox