[PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function

Michael Vetter posted 3 patches 2 months, 1 week ago
There is a newer version of this series
tools/testing/selftests/livepatch/Makefile    |  3 +-
.../testing/selftests/livepatch/functions.sh  | 13 +++-
.../selftests/livepatch/test-kprobe.sh        | 62 +++++++++++++++++++
.../selftests/livepatch/test_modules/Makefile |  3 +-
.../livepatch/test_modules/test_klp_kprobe.c  | 38 ++++++++++++
5 files changed, 114 insertions(+), 5 deletions(-)
create mode 100755 tools/testing/selftests/livepatch/test-kprobe.sh
create mode 100644 tools/testing/selftests/livepatch/test_modules/test_klp_kprobe.c
[PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function
Posted by Michael Vetter 2 months, 1 week ago
This patchset adds a test for livepatching a kprobed function.

Thanks to Petr and Marcos for the reviews!

V3:
Save and restore kprobe state also when test fails, by integrating it
into setup_config() and cleanup().
Rename SYSFS variables in a more logical way.
Sort test modules in alphabetical order.
Rename module description.

V2:
Save and restore kprobe state.

Michael Vetter (3):
  selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR
  selftests: livepatch: save and restore kprobe state
  selftests: livepatch: test livepatching a kprobed function

 tools/testing/selftests/livepatch/Makefile    |  3 +-
 .../testing/selftests/livepatch/functions.sh  | 13 +++-
 .../selftests/livepatch/test-kprobe.sh        | 62 +++++++++++++++++++
 .../selftests/livepatch/test_modules/Makefile |  3 +-
 .../livepatch/test_modules/test_klp_kprobe.c  | 38 ++++++++++++
 5 files changed, 114 insertions(+), 5 deletions(-)
 create mode 100755 tools/testing/selftests/livepatch/test-kprobe.sh
 create mode 100644 tools/testing/selftests/livepatch/test_modules/test_klp_kprobe.c

-- 
2.46.0
Re: [PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function
Posted by Petr Mladek 2 months ago
On Fri 2024-09-20 13:56:28, Michael Vetter wrote:
> This patchset adds a test for livepatching a kprobed function.
> 
> Michael Vetter (3):
>   selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR
>   selftests: livepatch: save and restore kprobe state
>   selftests: livepatch: test livepatching a kprobed function

Looks good. For the entire patchset:

Reviewed-by: Petr Mladek <pmladek@suse.com>
Tested-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr
Re: [PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function
Posted by Marcos Paulo de Souza 2 months ago
On Fri, 2024-09-20 at 13:56 +0200, Michael Vetter wrote:
> This patchset adds a test for livepatching a kprobed function.
> 
> Thanks to Petr and Marcos for the reviews!
> 
> V3:
> Save and restore kprobe state also when test fails, by integrating it
> into setup_config() and cleanup().
> Rename SYSFS variables in a more logical way.
> Sort test modules in alphabetical order.
> Rename module description.
> 
> V2:
> Save and restore kprobe state.
> 
> Michael Vetter (3):
>   selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR
>   selftests: livepatch: save and restore kprobe state
>   selftests: livepatch: test livepatching a kprobed function
> 

Thanks for the new version! LGTM, so the series is

Reviewed-by: Marcos Paulo de Souza <mpdesouza@suse.com>

>  tools/testing/selftests/livepatch/Makefile    |  3 +-
>  .../testing/selftests/livepatch/functions.sh  | 13 +++-
>  .../selftests/livepatch/test-kprobe.sh        | 62
> +++++++++++++++++++
>  .../selftests/livepatch/test_modules/Makefile |  3 +-
>  .../livepatch/test_modules/test_klp_kprobe.c  | 38 ++++++++++++
>  5 files changed, 114 insertions(+), 5 deletions(-)
>  create mode 100755 tools/testing/selftests/livepatch/test-kprobe.sh
>  create mode 100644
> tools/testing/selftests/livepatch/test_modules/test_klp_kprobe.c
> 
Re: [PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function
Posted by Shuah Khan 2 months ago
On 9/23/24 08:45, Marcos Paulo de Souza wrote:
> On Fri, 2024-09-20 at 13:56 +0200, Michael Vetter wrote:
>> This patchset adds a test for livepatching a kprobed function.
>>
>> Thanks to Petr and Marcos for the reviews!
>>
>> V3:
>> Save and restore kprobe state also when test fails, by integrating it
>> into setup_config() and cleanup().
>> Rename SYSFS variables in a more logical way.
>> Sort test modules in alphabetical order.
>> Rename module description.
>>
>> V2:
>> Save and restore kprobe state.
>>
>> Michael Vetter (3):
>>    selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR
>>    selftests: livepatch: save and restore kprobe state
>>    selftests: livepatch: test livepatching a kprobed function
>>
> 
> Thanks for the new version! LGTM, so the series is
> 
> Reviewed-by: Marcos Paulo de Souza <mpdesouza@suse.com>
> 
>>   tools/testing/selftests/livepatch/Makefile    |  3 +-
>>   .../testing/selftests/livepatch/functions.sh  | 13 +++-
>>   .../selftests/livepatch/test-kprobe.sh        | 62
>> +++++++++++++++++++
>>   .../selftests/livepatch/test_modules/Makefile |  3 +-
>>   .../livepatch/test_modules/test_klp_kprobe.c  | 38 ++++++++++++
>>   5 files changed, 114 insertions(+), 5 deletions(-)
>>   create mode 100755 tools/testing/selftests/livepatch/test-kprobe.sh
>>   create mode 100644
>> tools/testing/selftests/livepatch/test_modules/test_klp_kprobe.c
>>
> 

Assuming this is going through livepatch tree:

Acked-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah

Re: [PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function
Posted by Petr Mladek 2 months ago
On Mon 2024-09-23 10:16:29, Shuah Khan wrote:
> On 9/23/24 08:45, Marcos Paulo de Souza wrote:
> > On Fri, 2024-09-20 at 13:56 +0200, Michael Vetter wrote:
> > > This patchset adds a test for livepatching a kprobed function.
> > > 
> > > Michael Vetter (3):
> > >    selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR
> > >    selftests: livepatch: save and restore kprobe state
> > >    selftests: livepatch: test livepatching a kprobed function
> > > 
> > 
> 
> Assuming this is going through livepatch tree:

Yup, I am going to take it via the livepatch tree.
Though I am going to wait for more potential feedback a week or so.

> Acked-by: Shuah Khan <skhan@linuxfoundation.org>

Thanks for the review.

Best Regards,
Petr