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: <CAK8ByeL=A6xC=q8Ah4im4JQGUcN_NZNg10pSezBPCeKW9J_DeQ@mail.gmail.com>
Date:   Fri, 10 Nov 2023 15:51:37 +0100
From:   Łukasz Bartosik <lb@...ihalf.com>
To:     jim.cromie@...il.com
Cc:     Jason Baron <jbaron@...mai.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Kees Cook <keescook@...omium.org>,
        Douglas Anderson <dianders@...omium.org>,
        Guenter Roeck <groeck@...gle.com>,
        Yaniv Tzoreff <yanivt@...gle.com>,
        Benson Leung <bleung@...gle.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Vincent Whitchurch <vincent.whitchurch@...s.com>,
        Pekka Paalanen <ppaalanen@...il.com>,
        Sean Paul <seanpaul@...omium.org>,
        Daniel Vetter <daniel@...ll.ch>, linux-kernel@...r.kernel.org,
        upstream@...ihalf.com
Subject: Re: [PATCH v1 07/12] dyndbg: repack struct _ddebug

sob., 4 lis 2023 o 02:49 <jim.cromie@...il.com> napisał(a):
>
> On Fri, Nov 3, 2023 at 7:10 AM Łukasz Bartosik <lb@...ihalf.com> wrote:
> >
> > From: Jim Cromie <jim.cromie@...il.com>
> >
> > Move the JUMP_LABEL to the top of the struct, since theyre both
> > align(8) and this closes a pahole (unfortunately trading for padding,
> > but still).
> >
> > Signed-off-by: Jim Cromie <jim.cromie@...il.com>
>
> let me add, I havent really tested this, nevermind thorough.
> specifically, I didnt look for any offset dependence on the static-key
> inside their container.
> Conversely, maybe theres a free default or something in there.
>

Any idea how to properly test the relocation of the key ?



> > ---
> >  include/linux/dynamic_debug.h | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
> > index 497130816e9c..b9237e4ecd1b 100644
> > --- a/include/linux/dynamic_debug.h
> > +++ b/include/linux/dynamic_debug.h
> > @@ -14,6 +14,12 @@
> >   * the special section is treated as an array of these.
> >   */
> >  struct _ddebug {
> > +#ifdef CONFIG_JUMP_LABEL
> > +       union {
> > +               struct static_key_true dd_key_true;
> > +               struct static_key_false dd_key_false;
> > +       } key;
> > +#endif
> >         /*
> >          * These fields are used to drive the user interface
> >          * for selecting and displaying debug callsites.
> > @@ -53,12 +59,6 @@ struct _ddebug {
> >  #define _DPRINTK_FLAGS_DEFAULT 0
> >  #endif
> >         unsigned int flags:8;
> > -#ifdef CONFIG_JUMP_LABEL
> > -       union {
> > -               struct static_key_true dd_key_true;
> > -               struct static_key_false dd_key_false;
> > -       } key;
> > -#endif
> >  } __attribute__((aligned(8)));
> >
> >  enum class_map_type {
> > --
> > 2.42.0.869.gea05f2083d-goog
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ