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:   Mon, 12 Jul 2021 12:43:40 +0530
From:   Sumit Garg <sumit.garg@...aro.org>
To:     Doug Anderson <dianders@...omium.org>
Cc:     kgdb-bugreport@...ts.sourceforge.net,
        Daniel Thompson <daniel.thompson@...aro.org>,
        Jason Wessel <jason.wessel@...driver.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 1/4] kdb: Rename struct defcmd_set to struct kdb_macro_t

Hi Doug,

Thanks for your review.

On Sat, 10 Jul 2021 at 03:07, Doug Anderson <dianders@...omium.org> wrote:
>
> Hi,
>
> On Fri, Jul 9, 2021 at 3:43 AM Sumit Garg <sumit.garg@...aro.org> wrote:
> >
> > as that sounds more appropriate given its purpose.
>
> nit: Personally I prefer this to be a whole sentence that isn't just a
> continuation of the patch subject.
>

Okay I will use the whole sentence instead.

>
> > Signed-off-by: Sumit Garg <sumit.garg@...aro.org>
> > ---
> >  kernel/debug/kdb/kdb_main.c | 38 ++++++++++++++++++-------------------
> >  1 file changed, 19 insertions(+), 19 deletions(-)
> >
> > diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
> > index d8ee5647b732..d4897fbc9d2e 100644
> > --- a/kernel/debug/kdb/kdb_main.c
> > +++ b/kernel/debug/kdb/kdb_main.c
> > @@ -654,7 +654,7 @@ static void kdb_cmderror(int diag)
> >   * Returns:
> >   *     zero for success, a kdb diagnostic if error
> >   */
> > -struct defcmd_set {
> > +struct kdb_macro_t {
>
> Why the "_t" at the end? To me that implies that this is a typedef, so
> you'd declare a variable of this as:
>
> kdb_macro_t my_macro;
>
> ...instead of:
>
> struct kdb_macro_t my_macro;
>
> Not that I'm suggesting adding a typedef for this structure. It seems
> kernel convention is not to do typedefs for structures unless there's
> a strong reason to. Rather, I'm just suggesting removing the "_t" from
> the end.
>

Ack.

>
> > @@ -671,7 +671,7 @@ static int kdb_exec_defcmd(int argc, const char **argv);
> >
> >  static int kdb_defcmd2(const char *cmdstr, const char *argv0)
> >  {
> > -       struct defcmd_set *s = defcmd_set + defcmd_set_count - 1;
> > +       struct kdb_macro_t *s = kdb_macro + kdb_macro_count - 1;
>
> I guess the variable "s" was short for "set". Should it change to "m"
> ? Here and in other places below.
>

This variable is dropped in patch #3. Can we bear this variable name
until that patch?

>
> > @@ -727,13 +727,13 @@ static int kdb_defcmd(int argc, const char **argv)
> >                 kdb_printf("Command only available during kdb_init()\n");
> >                 return KDB_NOTIMP;
> >         }
> > -       defcmd_set = kmalloc_array(defcmd_set_count + 1, sizeof(*defcmd_set),
> > +       kdb_macro = kmalloc_array(kdb_macro_count + 1, sizeof(*kdb_macro),
> >                                    GFP_KDB);
>
> nit: the indentation is now off for the GFP_KDB since you changed the
> length of the previous line.

Okay, I will correct it.

>
> Sorry for not noticing those things in the previous version. I guess
> having this part of the change split out really did make it easier to
> review! ;-) Those are all pretty much just nits, so if they're fixed
> feel free to add my Reviewed-by tag.

Thanks.
-Sumit

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ