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]
Date:   Tue, 30 Jul 2019 19:44:49 +0300
From:   Denis Efremov <efremov@...ux.com>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:     Stephen Rothwell <sfr@...b.auug.org.au>,
        Michal Marek <michal.lkml@...kovi.net>,
        Emil Velikov <emil.l.velikov@...il.com>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] modpost: check for static EXPORT_SYMBOL* functions

On 30.07.2019 19:29, Masahiro Yamada wrote:
> I prefer this, but why do you need to check type?
> 
> Doesn't this work?
> 
> for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
>          unsigned char bind = ELF_ST_BIND(sym->st_info);
> 
>          struct symbol *s = find_symbol(remove_dot(info.strtab +
>                                                    sym->st_name));
> 
>          if (s && (bind == STB_GLOBAL || bind == STB_WEAK))
>                  s->is_static = 0;
> }

This works. However, I thought it will be too costly to call find_symbol 
on each symbol. Hence, 'type == STT_OBJECT || type == STT_FUNC || type 
== STT_NOTYPE' is a small performance optimization because we need to 
check only variables and functions. Is it worth to remove it in v4?

Denis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ