lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEf4BzYzxv3q2G_MoOZ8PwjhgdRjZW2GPDknfqZ6aUzrL=6YVw@mail.gmail.com>
Date:   Fri, 17 Jan 2020 11:03:22 -0800
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Quentin Monnet <quentin.monnet@...ronome.com>
Cc:     Andrii Nakryiko <andriin@...com>, bpf <bpf@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Kernel Team <kernel-team@...com>
Subject: Re: [PATCH bpf-next 4/4] bpftool: avoid const discard compilation warning

On Fri, Jan 17, 2020 at 7:55 AM Quentin Monnet
<quentin.monnet@...ronome.com> wrote:
>
> 2020-01-16 22:08 UTC-0800 ~ Andrii Nakryiko <andriin@...com>
> > Avoid compilation warning in bpftool when assigning disassembler_options by
> > casting explicitly to non-const pointer.
> >
> > Fixes: 3ddeac6705ab ("tools: bpftool: use 4 context mode for the NFP disasm")
> > Signed-off-by: Andrii Nakryiko <andriin@...com>
> > ---
> >  tools/bpf/bpftool/jit_disasm.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/bpf/bpftool/jit_disasm.c b/tools/bpf/bpftool/jit_disasm.c
> > index bfed711258ce..22ef85b0f86c 100644
> > --- a/tools/bpf/bpftool/jit_disasm.c
> > +++ b/tools/bpf/bpftool/jit_disasm.c
> > @@ -119,7 +119,7 @@ void disasm_print_insn(unsigned char *image, ssize_t len, int opcodes,
> >       info.arch = bfd_get_arch(bfdf);
> >       info.mach = bfd_get_mach(bfdf);
> >       if (disassembler_options)
> > -             info.disassembler_options = disassembler_options;
> > +             info.disassembler_options = (char *)disassembler_options;
> >       info.buffer = image;
> >       info.buffer_length = len;
> >
> >
>
> Thanks Andrii,
>
> This fix has been proposed and discussed before:
> https://lore.kernel.org/bpf/20190328141652.wssqboyekxmp6tkw@yubo-2/t/#u
>
> I still believe that we should not add the cast.

Oh, ok, didn't know that. Seems like Alexei dropped it already.

>
> Best regards,
> Quentin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ