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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 18 Jan 2021 23:46:34 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Hangbin Liu <liuhangbin@...il.com>, bpf@...r.kernel.org
Cc:     netdev@...r.kernel.org, Jesper Dangaard Brouer <brouer@...hat.com>,
        John Fastabend <john.fastabend@...il.com>,
        Yonghong Song <yhs@...com>,
        Toke Høiland-Jørgensen <toke@...hat.com>
Subject: Re: [PATCHv7 bpf-next] samples/bpf: add xdp program on egress for
 xdp_redirect_map

On 1/15/21 7:24 AM, Hangbin Liu wrote:
> This patch add a xdp program on egress to show that we can modify
> the packet on egress. In this sample we will set the pkt's src
> mac to egress's mac address. The xdp_prog will be attached when
> -X option supplied.
> 
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>

This has a bunch of minor checkpatch issues, see also netdev/checkpatch	[0];
disregard the 'exceeds 80 columns' but there is a double newline and other
minor stuff that slipped in (usually good to catch before submission):

WARNING: Missing a blank line after declarations
#133: FILE: samples/bpf/xdp_redirect_map_kern.c:139:
+	unsigned char mac[6] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x1};
+	return xdp_redirect_map_egress(ctx, mac);

WARNING: Missing a blank line after declarations
#141: FILE: samples/bpf/xdp_redirect_map_kern.c:147:
+	unsigned char mac[6] = {0x0, 0x0, 0x0, 0x0, 0x1, 0x1};
+	return xdp_redirect_map_egress(ctx, mac);

ERROR: do not initialise statics to false
#164: FILE: samples/bpf/xdp_redirect_map_user.c:29:
+static bool xdp_devmap_attached = false;

CHECK: Please don't use multiple blank lines
#340: FILE: samples/bpf/xdp_redirect_map_user.c:285:
+
+

Please carry ACK forward, fix them up and resubmit, thanks!

   [0] https://patchwork.kernel.org/project/netdevbpf/patch/20210115062433.2624893-1-liuhangbin@gmail.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ