lkml.org 
[lkml]   [2021]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] lib/vsprintf: reduce space taken by no_hash_pointers warning
On Mon, Mar 8, 2021 at 4:51 AM Marco Elver <elver@google.com> wrote:
> If we do __initconst change we need to manually remove the duplicate
> lines because we're asking the compiler to create a large array (and
> there's no more auto-dedup). If we do not remove the duplicate lines,
> the __initconst-only approach would create a larger image and result
> in subtly increased memory consumption during init. The additional
> code together with manual dedup should offset that. (I can split this
> patch as Andy suggests, but first need confirmation what people
> actually want.)
>
> I have no idea what the right trade-off is, and appeal to Geert to
> suggest what would be acceptable to him.

Maybe we can have only the message itself wrapped in an #ifdef CONFIG_
of some kind. For example:

+#ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE
pr_warn("**********************************************************\n");
pr_warn("** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **\n");
pr_warn("** **\n");
pr_warn("** This system shows unhashed kernel memory addresses **\n");
...
+#endif

return 0;
}

In other words, if space is really constrained, then don't include the
message. Or maybe just include part of the message.

\
 
 \ /
  Last update: 2021-03-12 04:49    [W:3.335 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site