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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQ+20NcPHKYyMpAYr6SQ2fuvr4yqu5eiY90hL8J9-t1L9w@mail.gmail.com>
Date:   Fri, 23 Apr 2021 14:23:15 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Yonghong Song <yhs@...com>
Cc:     Andrii Nakryiko <andrii@...nel.org>, bpf <bpf@...r.kernel.org>,
        Network Development <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Kernel Team <kernel-team@...com>
Subject: Re: [PATCH v3 bpf-next 17/18] selftests/bpf: add map linking selftest

On Fri, Apr 23, 2021 at 11:54 AM Yonghong Song <yhs@...com> wrote:
>
>
>
> On 4/23/21 11:13 AM, Andrii Nakryiko wrote:
> > Add selftest validating various aspects of statically linking BTF-defined map
> > definitions. Legacy map definitions do not support extern resolution between
> > object files. Some of the aspects validated:
> >    - correct resolution of extern maps against concrete map definitions;
> >    - extern maps can currently only specify map type and key/value size and/or
> >      type information;
> >    - weak concrete map definitions are resolved properly.
> >
> > Static map definitions are not yet supported by libbpf, so they are not
> > explicitly tested, though manual testing showes that BPF linker handles them
> > properly.
> >
> > Acked-by: Yonghong Song <yhs@...com>
> > Signed-off-by: Andrii Nakryiko <andrii@...nel.org>
> [...]
> > +
> > +SEC("raw_tp/sys_exit")
> > +int BPF_PROG(handler_exit1)
> > +{
> > +     /* lookup values with key = 2, set in another file */
> > +     int key = 2, *val;
> > +     struct my_key key_struct = { .x = 2 };
> > +     struct my_value *value_struct;
> > +
> > +     value_struct = bpf_map_lookup_elem(&map1, &key_struct);
> > +     if (value_struct)
> > +             output_first1 = value_struct->x;
> > +
> > +     val = bpf_map_lookup_elem(&map2, &key);
> > +     if (val)
> > +             output_second1 = *val;
> > +
> > +     val = bpf_map_lookup_elem(&map_weak, &key);
> > +     if (val)
> > +             output_weak1 = *val;
> > +
>
> There is an extra tab in the above line. There is no need for new
> revision just for this. If no new revision is needed, maybe
> the maintainer can help fix it.

Sorry. I applied without it. Pls fold the fix in some of the future patches.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ