diff mbox series

[1/1] tst_taint.h Add taint for randstruct

Message ID 20200528111504.12638-1-pvorel@suse.cz
State Accepted
Headers show
Series [1/1] tst_taint.h Add taint for randstruct | expand

Commit Message

Petr Vorel May 28, 2020, 11:15 a.m. UTC
Added in kernel 4.17.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 include/tst_taint.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jan Stancek May 29, 2020, 10:28 a.m. UTC | #1
----- Original Message -----
> Added in kernel 4.17.
> 
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  include/tst_taint.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/tst_taint.h b/include/tst_taint.h
> index 0acc1140c..cfa84dded 100644
> --- a/include/tst_taint.h
> +++ b/include/tst_taint.h
> @@ -60,7 +60,8 @@
>  #define TST_TAINT_E     (1 << 13) /* unsigned module was loaded */
>  #define TST_TAINT_L     (1 << 14) /* A soft lock-up has previously occurred
>  */
>  #define TST_TAINT_K     (1 << 15) /* kernel has been live-patched */
> -#define TST_TAINT_X	(1 << 16) /* auxiliary taint, for distro's use */
> +#define TST_TAINT_X     (1 << 16) /* auxiliary taint, for distro's use */
> +#define TST_TAINT_T     (1 << 17) /* kernel was built with the struct
> randomization plugin */

ack, this is trivial enough to push directly
Petr Vorel June 1, 2020, 6:44 a.m. UTC | #2
Hi Jan,

> ack, this is trivial enough to push directly

Right, I'm sometimes too careful.
Thanks for your review, Jan, pushed.

Kind regards,
Petr
Petr Vorel June 5, 2020, 9:37 a.m. UTC | #3
Hi,

> +++ b/include/tst_taint.h
> @@ -60,7 +60,8 @@
#define TST_TAINT_G     (1 <<  0) /* a module with non-GPL license loaded */

one more note. I'd rename TST_TAINT_G to TST_TAINT_P, it's misleading, we use it
to use it for 'P' (proprietary module loaded).

Also we use taint_flag.c_true, not taint_flag.c_false:
[ TAINT_PROPRIETARY_MODULE ]    = { 'P', 'G', true },

But this flag hasn't been used, it might be always as placeholder (never
actually needed).

Kind regards,
Petr
diff mbox series

Patch

diff --git a/include/tst_taint.h b/include/tst_taint.h
index 0acc1140c..cfa84dded 100644
--- a/include/tst_taint.h
+++ b/include/tst_taint.h
@@ -60,7 +60,8 @@ 
 #define TST_TAINT_E     (1 << 13) /* unsigned module was loaded */
 #define TST_TAINT_L     (1 << 14) /* A soft lock-up has previously occurred */
 #define TST_TAINT_K     (1 << 15) /* kernel has been live-patched */
-#define TST_TAINT_X	(1 << 16) /* auxiliary taint, for distro's use */
+#define TST_TAINT_X     (1 << 16) /* auxiliary taint, for distro's use */
+#define TST_TAINT_T     (1 << 17) /* kernel was built with the struct randomization plugin */
 
 /*
  * Initialize and prepare support for checking tainted kernel.