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]
Message-ID: <CAJfuBxwqO8xgenBHXiKS6MRfZ9t=TZx+TFPUgGA7hwYEoCSr0A@mail.gmail.com>
Date:   Tue, 28 Feb 2023 19:12:34 -0700
From:   jim.cromie@...il.com
To:     Luis Chamberlain <mcgrof@...nel.org>
Cc:     Jason Baron <jbaron@...mai.com>, gregkh@...uxfoundation.org,
        linux-kernel@...r.kernel.org, linux-modules@...r.kernel.org
Subject: Re: [PATCH v2 1/2] dyndbg: remove unused 'base' arg from __ddebug_add_module()

On Tue, Feb 28, 2023 at 1:38 PM Luis Chamberlain <mcgrof@...nel.org> wrote:
>
> On Tue, Feb 28, 2023 at 02:34:21PM -0500, Jason Baron wrote:
> > __ddebug_add_module() doesn't use the 'base' arg. Remove it.
>
> It would be good if the commit log explains why the base became unused.
> What commit removed its use? As of what kernel?
>
>   Luis

the base arg became obsolete with this.
I had the same patch on-deck, but Jason did it 1st.


commit b7b4eebdba7b6aea6b34dc29691b71c39d1dbd6a
Author: Jim Cromie <jim.cromie@...il.com>
Date:   Sun Sep 4 15:40:48 2022 -0600

    dyndbg: gather __dyndbg[] state into struct _ddebug_info

    This new struct composes the linker provided (vector,len) section,
    and provides a place to add other __dyndbg[] state-data later:

      descs - the vector of descriptors in __dyndbg section.
      num_descs - length of the data/section.

    Use it, in several different ways, as follows:

    In lib/dynamic_debug.c:

    ddebug_add_module(): Alter params-list, replacing 2 args (array,index)
    with a struct _ddebug_info * containing them both, with room for
    expansion.  This helps future-proof the function prototype against the
    looming addition of class-map info into the dyndbg-state, by providing
    a place to add more member fields later.

    NB: later add static struct _ddebug_info builtins_state declaration,
    not needed yet.

    ddebug_add_module() is called in 2 contexts:

    In dynamic_debug_init(), declare, init a struct _ddebug_info di
    auto-var to use as a cursor.  Then iterate over the prdbg blocks of
    the builtin modules, and update the di cursor before calling
    _add_module for each.

    Its called from kernel/module/main.c:load_info() for each loaded
    module:

    In internal.h, alter struct load_info, replacing the dyndbg array,len
    fields with an embedded _ddebug_info containing them both; and
    populate its members in find_module_sections().

    The 2 calling contexts differ in that _init deals with contiguous
    subranges of __dyndbgs[] section, packed together, while loadable
    modules are added one at a time.

    So rename ddebug_add_module() into outer/__inner fns, call __inner
    from _init, and provide the offset into the builtin __dyndbgs[] where
    the module's prdbgs reside.  The cursor provides start, len of the
    subrange for each.  The offset will be used later to pack the results
    of builtin __dyndbg_sites[] de-duplication, and is 0 and unneeded for
    loadable modules,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ