Patch "selftests/bpf: Fix uprobe_multi compilation error" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests/bpf: Fix uprobe_multi compilation error

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-bpf-fix-uprobe_multi-compilation-error.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit aa6340ac7d2f595524d518f60f932d542e782bc4
Author: Alan Maguire <alan.maguire@xxxxxxxxxx>
Date:   Thu Sep 26 15:49:48 2024 +0100

    selftests/bpf: Fix uprobe_multi compilation error
    
    [ Upstream commit c27d8235ba97139d7a085367ff57773902eb3fc5 ]
    
    When building selftests, the following was seen:
    
    uprobe_multi.c: In function ‘trigger_uprobe’:
    uprobe_multi.c:108:40: error: ‘MADV_PAGEOUT’ undeclared (first use in this function)
      108 |                 madvise(addr, page_sz, MADV_PAGEOUT);
          |                                        ^~~~~~~~~~~~
    uprobe_multi.c:108:40: note: each undeclared identifier is reported only once for each function it appears in
    make: *** [Makefile:850: bpf-next/tools/testing/selftests/bpf/uprobe_multi] Error 1
    
    ...even with updated UAPI headers. It seems the above value is
    defined in UAPI <linux/mman.h> but including that file triggers
    other redefinition errors.  Simplest solution is to add a
    guarded definition, as was done for MADV_POPULATE_READ.
    
    Fixes: 3c217a182018 ("selftests/bpf: add build ID tests")
    Signed-off-by: Alan Maguire <alan.maguire@xxxxxxxxxx>
    Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
    Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx>
    Link: https://lore.kernel.org/bpf/20240926144948.172090-1-alan.maguire@xxxxxxxxxx
    Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/bpf/uprobe_multi.c b/tools/testing/selftests/bpf/uprobe_multi.c
index c7828b13e5ffd..dd38dc68f6359 100644
--- a/tools/testing/selftests/bpf/uprobe_multi.c
+++ b/tools/testing/selftests/bpf/uprobe_multi.c
@@ -12,6 +12,10 @@
 #define MADV_POPULATE_READ 22
 #endif
 
+#ifndef MADV_PAGEOUT
+#define MADV_PAGEOUT 21
+#endif
+
 int __attribute__((weak)) uprobe(void)
 {
 	return 0;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux