[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2023121938-stargazer-purse-0dc1@gregkh>
Date: Tue, 19 Dec 2023 19:22:39 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Tanzir Hasan <tanzirh@...gle.com>
Cc: Kees Cook <keescook@...omium.org>, Nick DeSaulniers <nnn@...gle.com>,
Andy Shevchenko <andy@...nel.org>, linux-hardening@...r.kernel.org,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>, llvm@...ts.linux.dev,
Al Viro <viro@...iv.linux.org.uk>,
Andy Shevchenko <andy.shevchenko@...il.com>
Subject: Re: [PATCH v4 1/2] kernel.h: removed REPEAT_BYTE from kernel.h
On Tue, Dec 19, 2023 at 06:09:51PM +0000, Tanzir Hasan wrote:
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -39,13 +39,6 @@
>
> #define STACK_MAGIC 0xdeadbeef
>
> -/**
> - * REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value
> - * @x: value to repeat
> - *
> - * NOTE: @x is not checked for > 0xff; larger values produce odd results.
> - */
> -#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
>
> /* generic data direction definitions */
> #define READ 0
> diff --git a/include/linux/wordpart.h b/include/linux/wordpart.h
> new file mode 100644
> index 000000000000..6a5ed5d54ba2
> --- /dev/null
> +++ b/include/linux/wordpart.h
> @@ -0,0 +1,17 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Copyright (C) 2023 Google LLC <tanzirh@...gle.com>
> + */
> +
> +#ifndef _LINUX_WORDPART_H
> +#define _LINUX_WORDPART_H
> +/**
> + * REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value
> + * @x: value to repeat
> + *
> + * NOTE: @x is not checked for > 0xff; larger values produce odd results.
> + */
> +#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
Legal note, this file is NOT copyright Google as no Google employe
actually wrote the logcal contents of it.
Please be VERY careful when doing stuff like this, it has potentially
big repercussions, and you don't want to have to talk to lots of
lawyers a few years from now and explain how you messed it all up :(
Nick, odds are there's a Google copyright class that Tanzir should take
here, if not, I recommend the free LF one that anyone can take online
that explains the issues here:
https://training.linuxfoundation.org/training/open-source-licensing-basics-for-software-developers/
As-is, this change is STRONGLY Nacked by me.
thanks,
greg k-h
Powered by blists - more mailing lists