lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <dd4dc3b2-115d-5973-6882-9b9916182a88@intel.com>
Date:   Mon, 20 Feb 2023 16:48:30 +0100
From:   Alexander Lobakin <aleksander.lobakin@...el.com>
To:     Martin KaFai Lau <martin.lau@...ux.dev>
CC:     Toke Høiland-Jørgensen <toke@...hat.com>,
        Song Liu <song@...nel.org>,
        Jesper Dangaard Brouer <hawk@...nel.org>,
        Jakub Kicinski <kuba@...nel.org>, <bpf@...r.kernel.org>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        "Daniel Borkmann" <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>
Subject: Re: [PATCH bpf-next v4] bpf, test_run: fix &xdp_frame misplacement
 for LIVE_FRAMES

From: Martin Kafai Lau <martin.lau@...ux.dev>
Date: Fri, 17 Feb 2023 12:32:36 -0800

> On 2/15/23 10:54 AM, Alexander Lobakin wrote:
>> +#if BITS_PER_LONG == 64 && PAGE_SIZE == SZ_4K
>> +/*
>> tools/testing/selftests/bpf/prog_tests/xdp_do_redirect.c:%MAX_PKT_SIZE
>> + * must be updated accordingly when any of these changes, otherwise BPF
>> + * selftests will fail.
>> + */
>> +#ifdef __s390x__
>> +#define TEST_MAX_PKT_SIZE 3216
>> +#else
>> +#define TEST_MAX_PKT_SIZE 3408
> 
> I have to revert this patch for now. It is not right to assume cache
> line size:

Userspace part tries to guess it :D Anyway, let's keep as it was for now.
Sent v5 without the static assertion, I hope it can still hit current
cycle? Or too late already?

> https://lore.kernel.org/bpf/50c35055-afa9-d01e-9a05-ea5351280e4f@intel.com/
> 
> Please resubmit and consider if this static_assert is really needed in
> the kernel test_run.c.
> 
>> +#endif
>> +static_assert(SKB_WITH_OVERHEAD(TEST_XDP_FRAME_SIZE -
>> XDP_PACKET_HEADROOM) ==
>> +          TEST_MAX_PKT_SIZE);
>> +#endif
> 

Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ