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: <20201106031914.dugp23xaiwnjbv7g@ast-mbp>
Date:   Thu, 5 Nov 2020 19:19:14 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Andrii Nakryiko <andrii@...nel.org>
Cc:     bpf@...r.kernel.org, netdev@...r.kernel.org, ast@...com,
        daniel@...earbox.net, kernel-team@...com,
        Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [RFC PATCH bpf-next 2/5] bpf: assign ID to vmlinux BTF and
 return extra info for BTF in GET_OBJ_INFO

On Wed, Nov 04, 2020 at 08:51:37PM -0800, Andrii Nakryiko wrote:
> @@ -215,6 +215,8 @@ struct btf {
>  	struct btf *base_btf;
>  	u32 start_id; /* first type ID in this BTF (0 for base BTF) */
>  	u32 start_str_off; /* first string offset (0 for base BTF) */
> +	char name[MODULE_NAME_LEN];
> +	bool kernel_btf;
>  };
>  
>  enum verifier_phase {
> @@ -4441,6 +4443,7 @@ struct btf *btf_parse_vmlinux(void)
>  
>  	btf->data = __start_BTF;
>  	btf->data_size = __stop_BTF - __start_BTF;
> +	btf->kernel_btf = true;

imo it's a bit weird for vmlinux's BTF to be flagged as 'kernel_btf'
and empty name, but kernel module's BTFs will not be marked as kernel,
but will have a name.
I think it's more natural to make vmlinux and module's BTF with kernel_btf=true flag
and give "vmlinux" name to base kernel BTF.
If somebody creates a kernel module with "vmlinux" name we will have a conflict,
but that name is for human pretty printing only anyway, so I think it's fine.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ