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] [day] [month] [year] [list]
Date:   Thu, 3 Aug 2023 15:46:10 +1000
From:   Benjamin Gray <bgray@...ux.ibm.com>
To:     Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
        Maninder Singh <maninder1.s@...sung.com>
Cc:     nathanl@...ux.ibm.com, bcain@...cinc.com, keescook@...omium.org,
        gary@...yguo.net, pmladek@...e.com, ustavoars@...nel.org,
        linux-kernel@...r.kernel.org, Onkarnath <onkarnath.1@...sung.com>,
        wedsonaf@...gle.com, npiggin@...il.com, alex.gaynor@...il.com,
        linux-hexagon@...r.kernel.org, ojeda@...nel.org,
        linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH 2/2] powerpc/xmon: use KSYM_NAME_LEN in array size

On 30/5/23 10:54 pm, Miguel Ojeda wrote:
> Side-note: in `get_function_bounds()`, I see `kallsyms_lookup()` being
> used, but the name seems discarded? Can
> `kallsyms_lookup_size_offset()` be used instead, thus avoiding the
> usage of the buffer there to begin with?

I'm not familiar with the kallsyms infrastructure, but looking over the 
implementations of kallsyms_lookup() and kallsyms_lookup_size_offset() 
it looks like the existing kallsyms_lookup()
  handles an extra case over kallsyms_lookup_size_offset()?

kallsyms_lookup_buildid() (the implementation of kallsyms_lookup()) has

   /* See if it's in a module or a BPF JITed image. */
   ret = module_address_lookup(addr, symbolsize, offset,
                               modname, modbuildid, namebuf);
   if (!ret)
           ret = bpf_address_lookup(addr, symbolsize,
                                    offset, modname, namebuf);

   if (!ret)
           ret = ftrace_mod_address_lookup(addr, symbolsize,
                                           offset, modname, namebuf);

while kallsyms_lookup_size_offset() is missing the ftrace case

   return !!module_address_lookup(addr, symbolsize, offset,
                                  NULL, NULL, namebuf) ||
          !!__bpf_address_lookup(addr, symbolsize, offset, namebuf);

Might this be a concern for xmon?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ