[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 10 Oct 2017 10:21:22 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Christina Jacob <christina.jacob.koikara@...il.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, brouer@...hat.com,
Sunil.Goutham@...ium.com, daniel@...earbox.net, dsahern@...il.com,
Christina Jacob <Christina.Jacob@...ium.com>
Subject: Re: [PATCH v2] xdp: Sample xdp program implementing ip forward
On Tue, 10 Oct 2017 12:58:52 +0530
Christina Jacob <christina.jacob.koikara@...il.com> wrote:
> + bzero(&route, sizeof(route));
> + bzero(dsts, sizeof(dsts));
> + bzero(dsts_len, sizeof(dsts_len));
> + bzero(gws, sizeof(gws));
> + bzero(ifs, sizeof(ifs));
> + bzero(&route, sizeof(route));
This is all unnecessary.
It looks like you write OpenBSD security code.
Only a security person would zero stack variables before return
and only BSD people use bzero(), Linux style is to use memset.
Powered by blists - more mailing lists