[lkml]   [2019]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] bpf: Replace BUG_ON when fp_old is NULL
On 12/19/19 6:39 PM, Aditya Pakki wrote:
> On 12/16/19 5:17 AM, Daniel Borkmann wrote:
>> On 12/15/19 11:08 PM, Yonghong Song wrote:
>>> On 12/15/19 7:44 AM, Aditya Pakki wrote:
>>>> If fp_old is NULL in bpf_prog_realloc, the program does an assertion
>>>> and crashes. However, we can continue execution by returning NULL to
>>>> the upper callers. The patch fixes this issue.
>>> Could you share how to reproduce the assertion and crash? I would
>>> like to understand the problem first before making changes in the code.
>>> Thanks!
>> Fully agree, Aditya, please elaborate if you have seen a crash!
> Thanks for your responses Alexei and Daniel. We identified this issue via static analysis
> and have not seen a crash. However, by looking at the callers of bpf_prog_realloc, I do
> agree that fp_old is never NULL.
> Would you recommend removing the BUG_ON assertion altogether ?

If it would ever happen, we'd already crash in fp_old->pages there, so yes,
lets remove the unneeded BUG_ON().


 \ /
  Last update: 2019-12-19 18:49    [W:0.055 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site