From: Song Liu <song@kernel.org>
To: <live-patching@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <jpoimboe@kernel.org>, <jikos@kernel.org>, <mbenes@suse.cz>,
<pmladek@suse.com>, <joe.lawrence@redhat.com>,
Song Liu <song@kernel.org>
Subject: [PATCH v3 0/2] add sysfs entry "patched" for each klp_object
Date: Fri, 2 Sep 2022 13:52:06 -0700 [thread overview]
Message-ID: <20220902205208.3117798-1-song@kernel.org> (raw)
I was debugging an issue that a livepatch appears to be attached, but
actually not. It turns out that there is a mismatch in module name
(abc-xyz vs. abc_xyz), klp_find_object_module failed to find the module.
Add a sysfs entry for each klp_object, so that it is easier to debug
such issues.
Changes v2 => v3:
1. Improve selftest. (Petr Mladek and Joe Lawrence)
Changes v1 => v2:
1. Add selftest. (Petr Mladek)
2. Update documentation. (Petr Mladek)
3. Use sysfs_emit. (Petr Mladek)
Song Liu (2):
livepatch: add sysfs entry "patched" for each klp_object
selftests/livepatch: add sysfs test
.../ABI/testing/sysfs-kernel-livepatch | 8 ++
kernel/livepatch/core.c | 18 ++++
tools/testing/selftests/livepatch/Makefile | 3 +-
.../testing/selftests/livepatch/functions.sh | 34 ++++++++
.../testing/selftests/livepatch/test-sysfs.sh | 86 +++++++++++++++++++
5 files changed, 148 insertions(+), 1 deletion(-)
create mode 100755 tools/testing/selftests/livepatch/test-sysfs.sh
--
2.30.2
next reply other threads:[~2022-09-02 20:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-02 20:52 Song Liu [this message]
2022-09-02 20:52 ` [PATCH v3 1/2] livepatch: add sysfs entry "patched" for each klp_object Song Liu
2022-09-23 14:59 ` Petr Mladek
2022-09-02 20:52 ` [PATCH v3 2/2] selftests/livepatch: add sysfs test Song Liu
2022-09-23 14:50 ` [PATCH v3 0/2] add sysfs entry "patched" for each klp_object 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=20220902205208.3117798-1-song@kernel.org \
--to=song@kernel.org \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=pmladek@suse.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).