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: <CAKXUXMxyDaEnWeGNZpCmAFG-5OG0JVrHz0RPk18n_z+ZDKQ-cQ@mail.gmail.com>
Date:   Fri, 18 Jun 2021 14:03:04 +0200
From:   Lukas Bulwahn <lukas.bulwahn@...il.com>
To:     gumingtao <gumingtao1225@...il.com>
Cc:     cl@...ux.com, penberg@...nel.org, rientjes@...gle.com,
        iamjoonsoo.kim@....com, Andrew Morton <akpm@...ux-foundation.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Linux-MM <linux-mm@...ck.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>,
        gumingtao <gumingtao@...omi.com>
Subject: Re: [PATCH] slab: Use %s instead of function name

On Fri, Jun 18, 2021 at 12:59 PM gumingtao <gumingtao1225@...il.com> wrote:
>
> It is better to replace the function name with %s.
>
> Signed-off-by: gumingtao <gumingtao@...omi.com>
> ---
>  mm/slab_common.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/slab_common.c b/mm/slab_common.c
> index a4a5714..36127dc 100644
> --- a/mm/slab_common.c
> +++ b/mm/slab_common.c
> @@ -381,8 +381,8 @@ kmem_cache_create_usercopy(const char *name,
>                         panic("kmem_cache_create: Failed to create slab '%s'. Error %d\n",

I am just wondering:

Can you also make that refactoring change for the panic() call as well?

How about checking the whole file for such patterns and doing that
change for all occurrences?


>                                 name, err);
>                 else {
> -                       pr_warn("kmem_cache_create(%s) failed with error %d\n",
> -                               name, err);
> +                       pr_warn("%s(%s) failed with error %d\n",
> +                               __func__, name, err);
>                         dump_stack();
>                 }
>                 return NULL;
> --
> 2.7.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ