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]
Date:   Fri, 8 Sep 2017 22:23:54 +0000
From:   "Yu, Fenghua" <fenghua.yu@...el.com>
To:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Helge Deller <deller@....de>,
        "Luck, Tony" <tony.luck@...el.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Sergey Senozhatsky" <sergey.senozhatsky@...il.com>,
        Petr Mladek <pmladek@...e.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        "Michael Ellerman" <mpe@...erman.id.au>
Subject: RE: [PATCH 00/14] Fix wrong %pF and %pS printk format specifier
 usages

> From: Sergey Senozhatsky [mailto:sergey.senozhatsky.work@...il.com]
> On (09/07/17 16:05), Luck, Tony wrote:
> +static inline bool __mod_text_address(struct module *mod,
> +                                     unsigned long addr) {
> +       /* Make sure it's within the text section. */
> +       if (!within(addr, mod->init_layout.base, mod->init_layout.text_size)
> +           && !within(addr, mod->core_layout.base, mod-
> >core_layout.text_size))
> +               return false;
> +       return true;
> +}

The __mod_text_address() may be defined only  on IA64, PPC64 and PARISC since it's only called in those cases.

> +
>  #ifdef CONFIG_KALLSYMS
>  /*
>   * This ignores the intensely annoying "mapping symbols" found @@ -3942,6
> +3952,14 @@ const char *module_address_lookup(unsigned long addr,
>         preempt_disable();
>         mod = __module_address(addr);
>         if (mod) {
> +#if defined(CONFIG_IA64) || defined(CONFIG_PPC64) ||
> defined(CONFIG_PARISC)
> +               unsigned long deref_addr;
> +
> +               if (!__mod_text_address(mod, addr))
> +                       deref_addr = dereference_function_descriptor(addr);
> +               if (__mod_text_address(mod, deref_addr))
> +                       addr = deref_addr; #endif

Thanks.

-Fenghua

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ