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: <c5f3bc99-1e1d-f8cf-2bbe-5e86c61c64b6@fb.com>
Date:   Sat, 14 Dec 2019 20:27:21 +0000
From:   Yonghong Song <yhs@...com>
To:     Toke Høiland-Jørgensen <toke@...hat.com>,
        "Andrii Nakryiko" <andriin@...com>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        "daniel@...earbox.net" <daniel@...earbox.net>
CC:     "andrii.nakryiko@...il.com" <andrii.nakryiko@...il.com>,
        Kernel Team <Kernel-team@...com>
Subject: Re: [PATCH v4 bpf-next 2/4] libbpf: support libbpf-provided extern
 variables



On 12/14/19 4:50 AM, Toke Høiland-Jørgensen wrote:
> [...]
> 
>> +static bool sym_is_extern(const GElf_Sym *sym)
>> +{
>> +	int bind = GELF_ST_BIND(sym->st_info);
>> +	/* externs are symbols w/ type=NOTYPE, bind=GLOBAL|WEAK, section=UND */
>> +	return sym->st_shndx == SHN_UNDEF &&
>> +	       (bind == STB_GLOBAL || bind == STB_WEAK) &&
>> +	       GELF_ST_TYPE(sym->st_info) == STT_NOTYPE;
>> +}
> 
> Will this also match function declarations marked as extern? I've

Yes. They are treated the same as other extern variables in symbol table.

> started looking into how to handle this for the static/dynamic linking
> use cases and am wondering whether it makes sense to pull in this series
> and build on that?
> 
> -Toke
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ