live-patching.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] livepatch/samples/selftest: Clean up show variables handling
@ 2020-01-16 15:31 Petr Mladek
  2020-01-16 15:31 ` [PATCH 1/4] livepatch/sample: Use the right type for the leaking data pointer Petr Mladek
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Petr Mladek @ 2020-01-16 15:31 UTC (permalink / raw)
  To: Jiri Kosina, Josh Poimboeuf, Miroslav Benes
  Cc: Joe Lawrence, Kamalesh Babulal, Nicolai Stange, Dan Carpenter,
	live-patching, linux-kernel, Petr Mladek

Dan Carpenter reported suspicious allocations of shadow variables
in the sample module, see
https://lkml.kernel.org/r/20200107132929.ficffmrm5ntpzcqa@kili.mountain

The code did not cause a real problem. But it was indeed misleading
and semantically wrong. I got confused several times when cleaning it.
So I decided to split the change into few steps. I hope that
it will help reviewers and future readers.

The changes of the sample module are basically the same as in the RFC.
In addition, there is a clean up of the module used by the selftest.


Petr Mladek (4):
  livepatch/sample: Use the right type for the leaking data pointer
  livepatch/selftest: Clean up shadow variable names and type
  livepatch/samples/selftest: Use klp_shadow_alloc() API correctly
  livepatch: Handle allocation failure in the sample of shadow variable
    API

 lib/livepatch/test_klp_shadow_vars.c      | 119 +++++++++++++++++-------------
 samples/livepatch/livepatch-shadow-fix1.c |  39 ++++++----
 samples/livepatch/livepatch-shadow-fix2.c |   4 +-
 samples/livepatch/livepatch-shadow-mod.c  |   4 +-
 4 files changed, 99 insertions(+), 67 deletions(-)

-- 
2.16.4


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-01-17 10:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16 15:31 [PATCH 0/4] livepatch/samples/selftest: Clean up show variables handling Petr Mladek
2020-01-16 15:31 ` [PATCH 1/4] livepatch/sample: Use the right type for the leaking data pointer Petr Mladek
2020-01-16 15:31 ` [PATCH 2/4] livepatch/selftest: Clean up shadow variable names and type Petr Mladek
2020-01-16 15:31 ` [PATCH 3/4] livepatch/samples/selftest: Use klp_shadow_alloc() API correctly Petr Mladek
2020-01-16 15:31 ` [PATCH 4/4] livepatch: Handle allocation failure in the sample of shadow variable API Petr Mladek
2020-01-16 19:29 ` [PATCH 0/4] livepatch/samples/selftest: Clean up show variables handling Joe Lawrence
2020-01-17  8:26 ` Miroslav Benes
2020-01-17  9:41 ` Kamalesh Babulal
2020-01-17 10:13 ` Jiri Kosina

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 NNTP newsgroup(s).