[PATCH 2/2] samples/livepatch: Add README.rst disclaimer

From: Joe Lawrence
Date: Tue Jul 21 2020 - 12:14:23 EST


The livepatch samples aren't very careful with respect to compiler
IPA-optimization of target kernel functions.

Add a quick disclaimer and pointer to the compiler-considerations.rst
file to warn readers.

Suggested-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
Signed-off-by: Joe Lawrence <joe.lawrence@xxxxxxxxxx>
---
samples/livepatch/README.rst | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 samples/livepatch/README.rst

diff --git a/samples/livepatch/README.rst b/samples/livepatch/README.rst
new file mode 100644
index 000000000000..2f8ef945f2ac
--- /dev/null
+++ b/samples/livepatch/README.rst
@@ -0,0 +1,15 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+==========
+Disclaimer
+==========
+
+The livepatch sample programs were written with idealized compiler
+output in mind. That is to say that they do not consider ways in which
+optimization may transform target kernel functions.
+
+The samples present only a simple API demonstration and should not be
+considered completely safe.
+
+See the Documentation/livepatching/compiler-considerations.rst file for
+more details on compiler optimizations and how they affect livepatching.
--
2.21.3