Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752158AbdHHVyh (ORCPT ); Tue, 8 Aug 2017 17:54:37 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:55562 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751919AbdHHVyg (ORCPT ); Tue, 8 Aug 2017 17:54:36 -0400 Date: Tue, 08 Aug 2017 14:54:33 -0700 (PDT) Message-Id: <20170808.145433.1287676484744976417.davem@davemloft.net> To: james.hogan@imgtec.com Cc: daniel@iogearbox.net, ast@kernel.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org, mingo@redhat.com, netdev@vger.kernel.org Subject: Re: [RFC PATCH 2/2] bpf: Initialise mod[] in bpf_trace_printk From: David Miller In-Reply-To: <650EB3B0-1101-4624-905A-E68D2EC5920F@imgtec.com> References: <59897A7C.10009@iogearbox.net> <20170808.094857.245786887664041622.davem@davemloft.net> <650EB3B0-1101-4624-905A-E68D2EC5920F@imgtec.com> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 08 Aug 2017 14:54:35 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 607 Lines: 17 From: James Hogan Date: Tue, 08 Aug 2017 22:20:05 +0100 > cool, i hadn't realised unmentioned elements in an initialiser are > always zeroed, even when non-global/static, so had interpreted the > whole array as uninitialised. learn something new every day :-) > sorry for the noise. You didn't have to know in the first place, you could have simply compiled the code into assembler by running: make kernel/trace/bpf_trace.s and seen for yourself before putting all of this time and effort into this patch and discussion. If you don't know what the compiler does, simply look!