From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] tools: bpf: handle long path in jit disasm Date: Fri, 03 Nov 2017 09:51:15 +0900 (KST) Message-ID: <20171103.095115.2252068730328661789.davem@davemloft.net> References: <20171102080945.7436-1-bhole_prashant_q7@lab.ntt.co.jp> <1174FFEE-A6FF-4FC5-A6CF-249D99124441@intel.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: bhole_prashant_q7@lab.ntt.co.jp, netdev@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net To: mark.d.rustad@intel.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:60168 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932398AbdKCAvX (ORCPT ); Thu, 2 Nov 2017 20:51:23 -0400 In-Reply-To: <1174FFEE-A6FF-4FC5-A6CF-249D99124441@intel.com> Sender: netdev-owner@vger.kernel.org List-ID: From: "Rustad, Mark D" Date: Thu, 2 Nov 2017 21:19:44 +0000 > >> On Nov 2, 2017, at 1:09 AM, Prashant Bhole wrote: >> >> Use PATH_MAX instead of hardcoded array size 256 >> >> Signed-off-by: Prashant Bhole ... >> static void get_asm_insns(uint8_t *image, size_t len, int opcodes) >> { >> int count, i, pc = 0; >> - char tpath[256]; >> + char tpath[PATH_MAX]; > > Seems like such a nice thing, *but* PATH_MAX is 4096. Can things really tolerate 4k on the stack here? This is userland code, why wouldn't it be able to handle 4K on the stack?