From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932534AbdJJRVe (ORCPT ); Tue, 10 Oct 2017 13:21:34 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:54730 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932487AbdJJRVa (ORCPT ); Tue, 10 Oct 2017 13:21:30 -0400 X-Google-Smtp-Source: AOwi7QAE6tDbsLTJBXRXHRZwNZkY4DcuCCgOzi/SABKOTaumZWJVMdbalNmTjrWOcwApLJgyKU4zWQ== Date: Tue, 10 Oct 2017 10:21:22 -0700 From: Stephen Hemminger To: Christina Jacob Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, brouer@redhat.com, Sunil.Goutham@cavium.com, daniel@iogearbox.net, dsahern@gmail.com, Christina Jacob Subject: Re: [PATCH v2] xdp: Sample xdp program implementing ip forward Message-ID: <20171010102122.6ca1e756@shemminger-XPS-13-9360> In-Reply-To: <1507620532-25804-2-git-send-email-Christina.Jacob@cavium.com> References: <1507620532-25804-1-git-send-email-Christina.Jacob@cavium.com> <1507620532-25804-2-git-send-email-Christina.Jacob@cavium.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 Oct 2017 12:58:52 +0530 Christina Jacob 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.