From: Petr Mladek <pmladek@suse.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Chris Down <chris@chrisdown.name>
Cc: linux-kernel@vger.kernel.org, Jessica Yu <jeyu@kernel.org>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
John Ogness <john.ogness@linutronix.de>,
Steven Rostedt <rostedt@goodmis.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Kees Cook <keescook@chromium.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
kernel-team@fb.com
Subject: Re: [PATCH v7 0/5] printk: Userspace format indexing support
Date: Mon, 21 Jun 2021 10:54:06 +0200 [thread overview]
Message-ID: <YNBTrhErZsp0jKYG@alley> (raw)
In-Reply-To: <YMsfo3/b1LvOoiM0@alley>
On Thu 2021-06-17 12:10:43, Petr Mladek wrote:
> On Tue 2021-06-15 17:52:20, Chris Down wrote:
> > We have a number of systems industry-wide that have a subset of their
> > functionality that works as follows:
> >
> > 1. Receive a message from local kmsg, serial console, or netconsole;
> > 2. Apply a set of rules to classify the message;
> > 3. Do something based on this classification (like scheduling a
> > remediation for the machine), rinse, and repeat.
> >
> > This provides a solution to the issue of silently changed or deleted
> > printks: we record pointers to all printk format strings known at
> > compile time into a new .printk_index section, both in vmlinux and
> > modules. At runtime, this can then be iterated by looking at
> > <debugfs>/printk/index/<module>, which emits the following format, both
> > readable by humans and able to be parsed by machines:
> >
> > $ head -1 vmlinux; shuf -n 5 vmlinux
> > # <level[,flags]> filename:line function "format"
> > <5> block/blk-settings.c:661 disk_stack_limits "%s: Warning: Device %s is misaligned\n"
> > <4> kernel/trace/trace.c:8296 trace_create_file "Could not create tracefs '%s' entry\n"
> > <6> arch/x86/kernel/hpet.c:144 _hpet_print_config "hpet: %s(%d):\n"
> > <6> init/do_mounts.c:605 prepare_namespace "Waiting for root device %s...\n"
> > <6> drivers/acpi/osl.c:1410 acpi_no_auto_serialize_setup "ACPI: auto-serialization disabled\n"
> >
> > This mitigates the majority of cases where we have a highly-specific
> > printk which we want to match on, as we can now enumerate and check
> > whether the format changed or the printk callsite disappeared entirely
> > in userspace. This allows us to catch changes to printks we monitor
> > earlier and decide what to do about it before it becomes problematic.
> >
> > There is no additional runtime cost for printk callers or printk itself,
> > and the assembly generated is exactly the same.
> >
> > Chris Down (5):
> > string_helpers: Escape double quotes in escape_special
> > printk: Straighten out log_flags into printk_info_flags
> > printk: Rework parse_prefix into printk_parse_prefix
> > printk: Userspace format indexing support
> > printk: index: Add indexing support to dev_printk
>
> The patchset looks ready for linux-next from my POV. I could fixup the
> messages as suggested by Andy when pushing.
>
> Well, I would still like to get acks from:
>
> + Andy for the 1st patch
> + Jessica for the changes in the module loader code in 4th patch.
They provided the Acks, so that we could push it.
Andrew, this patchset depends on seq_file and string_helpers changes
that are in -mm tree:
lib-string_helpers-switch-to-use-bit-macro.patch
lib-string_helpers-move-escape_np-check-inside-else-branch-in-a-loop.patch
lib-string_helpers-drop-indentation-level-in-string_escape_mem.patch
lib-string_helpers-introduce-escape_na-for-escaping-non-ascii.patch
lib-string_helpers-introduce-escape_nap-to-escape-non-ascii-and-non-printable.patch
lib-string_helpers-allow-to-append-additional-characters-to-be-escaped.patch
lib-test-string_helpers-print-flags-in-hexadecimal-format.patch
lib-test-string_helpers-get-rid-of-trailing-comma-in-terminators.patch
lib-test-string_helpers-add-test-cases-for-new-features.patch
maintainers-add-myself-as-designated-reviewer-for-generic-string-library.patch
seq_file-introduce-seq_escape_mem.patch
seq_file-add-seq_escape_str-as-replica-of-string_escape_str.patch
seq_file-convert-seq_escape-to-use-seq_escape_str.patch
nfsd-avoid-non-flexible-api-in-seq_quote_mem.patch
seq_file-drop-unused-_escape_mem_ascii.patch
Would you mind to take this patchset via -mm tree as well, please?
You were not in CC. Should Chris send v8 with all the Acks and
you in CC?
Best Regards,
Petr
next prev parent reply other threads:[~2021-06-21 8:54 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 16:52 [PATCH v7 0/5] printk: Userspace format indexing support Chris Down
2021-06-15 16:52 ` [PATCH v7 1/5] string_helpers: Escape double quotes in escape_special Chris Down
2021-06-15 21:42 ` Andy Shevchenko
2021-06-16 0:00 ` Chris Down
2021-06-16 2:05 ` Randy Dunlap
2021-06-16 8:08 ` Andy Shevchenko
2021-06-16 13:30 ` Steven Rostedt
2021-06-15 16:52 ` [PATCH v7 2/5] printk: Straighten out log_flags into printk_info_flags Chris Down
2021-06-15 16:52 ` [PATCH v7 3/5] printk: Rework parse_prefix into printk_parse_prefix Chris Down
2021-06-17 8:02 ` Petr Mladek
2021-06-15 16:52 ` [PATCH v7 4/5] printk: Userspace format indexing support Chris Down
2021-06-17 7:36 ` kernel test robot
2021-06-17 8:38 ` Andy Shevchenko
2021-06-17 9:39 ` Petr Mladek
2021-06-17 11:57 ` Chris Down
2021-06-17 9:43 ` Petr Mladek
2021-06-18 11:48 ` kernel test robot
2021-06-18 12:19 ` Chris Down
2021-06-18 15:00 ` Petr Mladek
2021-06-15 16:52 ` [PATCH v7 5/5] printk: index: Add indexing support to dev_printk Chris Down
2021-06-17 10:02 ` Petr Mladek
2021-06-17 10:10 ` [PATCH v7 0/5] printk: Userspace format indexing support Petr Mladek
2021-06-17 12:33 ` Andy Shevchenko
2021-06-17 14:50 ` Chris Down
2021-06-17 14:52 ` Chris Down
2021-06-17 12:36 ` Jessica Yu
2021-06-21 8:54 ` Petr Mladek [this message]
2021-06-23 21:08 ` Andrew Morton
2021-06-25 9:35 ` Petr Mladek
2021-07-19 13:06 ` Petr Mladek
2021-07-19 13:08 ` Petr Mladek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YNBTrhErZsp0jKYG@alley \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=chris@chrisdown.name \
--cc=gregkh@linuxfoundation.org \
--cc=hannes@cmpxchg.org \
--cc=jeyu@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=keescook@chromium.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox