Add "replace" sysfs attribute to show whether a livepatch supports atomic replace or not. A minor cleanup is also included in this patchset. v1->v2: - Refine the subject (Miroslav) - Use sysfs_emit() instead and replace other snprintf() as well (Miroslav) - Add selftests (Marcos) v1: https://lore.kernel.org/live-patching/20240607070157.33828-1-laoar.shao@xxxxxxxxx/ Yafang Shao (3): livepatch: Add "replace" sysfs attribute selftests/livepatch: Add selftests for "replace" sysfs attribute livepatch: Replace snprintf() with sysfs_emit() .../ABI/testing/sysfs-kernel-livepatch | 8 ++++ kernel/livepatch/core.c | 17 +++++-- .../testing/selftests/livepatch/test-sysfs.sh | 48 +++++++++++++++++++ 3 files changed, 70 insertions(+), 3 deletions(-) -- 2.39.1