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: <CAOZdJXXXweZG0Mgcf4LLt2SV3mONESunLwgx2c4rDaKrWevrYQ@mail.gmail.com>
Date:   Sat, 6 Mar 2021 14:27:58 -0600
From:   Timur Tabi <timur@...nel.org>
To:     Marco Elver <elver@...gle.com>
Cc:     lkml <linux-kernel@...r.kernel.org>, vbabka@...e.cz,
        timur@...nel.org, Petr Mladek <pmladek@...e.com>,
        rostedt@...dmis.org,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        andriy.shevchenko@...ux.intel.com,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: Re: [PATCH 2/2] lib/vsprintf: reduce space taken by no_hash_pointers warning

On Fri, Mar 5, 2021 at 1:46 PM Marco Elver <elver@...gle.com> wrote:
> +static const char no_hash_pointers_warning[8][55] __initconst = {
> +       "******************************************************",
> +       "   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE   ",
> +       " This system shows unhashed kernel memory addresses   ",
> +       " via the console, logs, and other interfaces. This    ",
> +       " might reduce the security of your system.            ",
> +       " If you see this message and you are not debugging    ",
> +       " the kernel, report this immediately to your system   ",
> +       " administrator!                                       ",
> +};
> +
>  static int __init no_hash_pointers_enable(char *str)
>  {
> +       /* Indices into no_hash_pointers_warning; -1 is an empty line. */
> +       const int lines[] = { 0, 1, -1, 2, 3, 4, -1, 5, 6, 7, -1, 1, 0 };

You can save a few more bytes by making this an array of s8.

I agree with the __initconst.  The rest seems overkill to me, but I
won't reject it.

Acked-by: Timur Tabi <timur@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ