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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180418102210.5fbbb05e@cakuba.netronome.com>
Date:   Wed, 18 Apr 2018 10:22:10 -0700
From:   Jakub Kicinski <kubakici@...pl>
To:     Martin KaFai Lau <kafai@...com>
Cc:     <netdev@...r.kernel.org>, Alexei Starovoitov <ast@...com>,
        Daniel Borkmann <daniel@...earbox.net>, <kernel-team@...com>
Subject: Re: [PATCH bpf-next v4 03/10] bpf: btf: Check members of
 struct/union

On Tue, 17 Apr 2018 13:42:36 -0700, Martin KaFai Lau wrote:
> This patch checks a few things of struct's members:
> 
> 1) It has a valid size (e.g. a "const void" is invalid)
> 2) A member's size (+ its member's offset) does not exceed
>    the containing struct's size.
> 3) The member's offset satisfies the alignment requirement

Could we also introduce a requirement for members to have different
names?  Maybe it's there but I missed it.  Would BTF with duplicated
member names be considered valid?

> The above can only be done after the needs_resolve member's type
> is resolved.  Hence, the above is done together in
> btf_struct_resolve().
> 
> Each possible member's type (e.g. int, enum, modifier...) implements
> the check_member() ops which will be called from btf_struct_resolve().
> 
> Signed-off-by: Martin KaFai Lau <kafai@...com>
> Acked-by: Alexei Starovoitov <ast@...com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ