[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e79a20ce-0d11-3d37-ff81-e46f1849903e@fb.com>
Date: Thu, 18 Jan 2018 14:40:59 -0800
From: Alexei Starovoitov <ast@...com>
To: Eric Dumazet <eric.dumazet@...il.com>,
Alexei Starovoitov <ast@...nel.org>, <davem@...emloft.net>
CC: <daniel@...earbox.net>, <edumazet@...gle.com>,
<netdev@...r.kernel.org>, <kernel-team@...com>
Subject: Re: [PATCH bpf] bpf: fix 32-bit divide by zero
On 1/18/18 2:30 PM, Eric Dumazet wrote:
> On Fri, 2018-01-12 at 18:59 -0800, Alexei Starovoitov wrote:
>> due to some JITs doing if (src_reg == 0) check in 64-bit mode
>> for div/mod opreations mask upper 32-bits of src register
>> before doing the check
>>
>
> Is the plan to fix JIT, and if they can all be fixed,
> revert this patch ?
No need to fix JITs.
I'd rather remove 'cmp rX, 0' from JITs and let verifier emit it.
It's more generic and gives us flexibility to decide what to do
with divide by zero and other exceptions.
Powered by blists - more mailing lists