Patch "selftests/bpf: Fix xdp_synproxy compilation failure in 32-bit arch" 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 xdp_synproxy compilation failure in 32-bit arch

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-xdp_synproxy-compilation-failure-i.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 566f46774f6d29d26192b9f37ed11b061f38ba6e
Author: Yang Jihong <yangjihong1@xxxxxxxxxx>
Date:   Fri Nov 11 11:08:36 2022 +0800

    selftests/bpf: Fix xdp_synproxy compilation failure in 32-bit arch
    
    [ Upstream commit e4c9cf0ce8c413c2030e8fb215551d7e0582ee7b ]
    
    xdp_synproxy fails to be compiled in the 32-bit arch, log is as follows:
    
      xdp_synproxy.c: In function 'parse_options':
      xdp_synproxy.c:175:36: error: left shift count >= width of type [-Werror=shift-count-overflow]
        175 |                 *tcpipopts = (mss6 << 32) | (ttl << 24) | (wscale << 16) | mss4;
            |                                    ^~
      xdp_synproxy.c: In function 'syncookie_open_bpf_maps':
      xdp_synproxy.c:289:28: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
        289 |                 .map_ids = (__u64)map_ids,
            |                            ^
    
    Fix it.
    
    Fixes: fb5cd0ce70d4 ("selftests/bpf: Add selftests for raw syncookie helpers")
    Signed-off-by: Yang Jihong <yangjihong1@xxxxxxxxxx>
    Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
    Acked-by: Yonghong Song <yhs@xxxxxx>
    Link: https://lore.kernel.org/bpf/20221111030836.37632-1-yangjihong1@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/bpf/xdp_synproxy.c b/tools/testing/selftests/bpf/xdp_synproxy.c
index ff35320d2be9..410a1385a01d 100644
--- a/tools/testing/selftests/bpf/xdp_synproxy.c
+++ b/tools/testing/selftests/bpf/xdp_synproxy.c
@@ -104,7 +104,8 @@ static void parse_options(int argc, char *argv[], unsigned int *ifindex, __u32 *
 		{ "tc", no_argument, NULL, 'c' },
 		{ NULL, 0, NULL, 0 },
 	};
-	unsigned long mss4, mss6, wscale, ttl;
+	unsigned long mss4, wscale, ttl;
+	unsigned long long mss6;
 	unsigned int tcpipopts_mask = 0;
 
 	if (argc < 2)
@@ -286,7 +287,7 @@ static int syncookie_open_bpf_maps(__u32 prog_id, int *values_map_fd, int *ports
 
 	prog_info = (struct bpf_prog_info) {
 		.nr_map_ids = 8,
-		.map_ids = (__u64)map_ids,
+		.map_ids = (__u64)(unsigned long)map_ids,
 	};
 	info_len = sizeof(prog_info);
 



[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