Patch "selftests/bpf: Fix compiling kfree_skb.c with musl-libc" has been added to the 6.1-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 compiling kfree_skb.c with musl-libc

to the 6.1-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-compiling-kfree_skb.c-with-musl-li.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 2abd1492dbb4f65d4540bbb8692c0962221496db
Author: Tony Ambardar <tony.ambardar@xxxxxxxxx>
Date:   Mon Jul 22 22:54:39 2024 -0700

    selftests/bpf: Fix compiling kfree_skb.c with musl-libc
    
    [ Upstream commit bae9a5ce7d3a9b3a9e07b31ab9e9c58450e3e9fd ]
    
    The GNU version of 'struct tcphdr' with member 'doff' is not exposed by
    musl headers unless _GNU_SOURCE is defined. Add this definition to fix
    errors seen compiling for mips64el/musl-libc:
    
      In file included from kfree_skb.c:2:
      kfree_skb.c: In function 'on_sample':
      kfree_skb.c:45:30: error: 'struct tcphdr' has no member named 'doff'
         45 |         if (CHECK(pkt_v6->tcp.doff != 5, "check_tcp",
            |                              ^
    
    Fixes: 580d656d80cf ("selftests/bpf: Add kfree_skb raw_tp test")
    Signed-off-by: Tony Ambardar <tony.ambardar@xxxxxxxxx>
    Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/e2d8cedc790959c10d6822a51f01a7a3616bea1b.1721713597.git.tony.ambardar@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/bpf/prog_tests/kfree_skb.c b/tools/testing/selftests/bpf/prog_tests/kfree_skb.c
index 73579370bfbd6..353499cfb1e41 100644
--- a/tools/testing/selftests/bpf/prog_tests/kfree_skb.c
+++ b/tools/testing/selftests/bpf/prog_tests/kfree_skb.c
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
+#define _GNU_SOURCE
 #include <test_progs.h>
 #include <network_helpers.h>
 #include "kfree_skb.skel.h"




[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