[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20171103.095115.2252068730328661789.davem@davemloft.net>
Date: Fri, 03 Nov 2017 09:51:15 +0900 (KST)
From: David Miller <davem@...emloft.net>
To: mark.d.rustad@...el.com
Cc: bhole_prashant_q7@....ntt.co.jp, netdev@...r.kernel.org,
ast@...nel.org, daniel@...earbox.net
Subject: Re: [PATCH net-next] tools: bpf: handle long path in jit disasm
From: "Rustad, Mark D" <mark.d.rustad@...el.com>
Date: Thu, 2 Nov 2017 21:19:44 +0000
>
>> On Nov 2, 2017, at 1:09 AM, Prashant Bhole <bhole_prashant_q7@....ntt.co.jp> wrote:
>>
>> Use PATH_MAX instead of hardcoded array size 256
>>
>> Signed-off-by: Prashant Bhole <bhole_prashant_q7@....ntt.co.jp>
...
>> 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?
Powered by blists - more mailing lists