Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp103439rdb; Tue, 19 Dec 2023 10:30:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IFilN95KnuxFCnKDAQaVrGX1N52jvgH7svD/4gtxeqgxtmoOl1SywfBWbnHTQCxOKdiurlN X-Received: by 2002:a17:90b:1113:b0:286:8dd6:db65 with SMTP id gi19-20020a17090b111300b002868dd6db65mr6896444pjb.91.1703010653395; Tue, 19 Dec 2023 10:30:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703010653; cv=none; d=google.com; s=arc-20160816; b=jNi5KzLw8Vvg9Gk3Wr6oNChT+mqZnzbixTUTpM2ss7k2KDlltBuLYJNUlO64gGWkco Z2srqDGiEgxfvQJZxzjogZTNAR27m7+6gRVhlqo/SXeBd0XwMFIqUHyeJcYHqW+JZbjG Y5qfXkin/Dwb1FXNWiDX/Y3aV25tFivK1BXdNtcnoh0msOeGGggUrHv9sTWoWyLnZMtc 7qniosCIiBLA/5J4XcYsAgZC4xJcjXkWGORvx083GrTAGr4zHjsuvb+fU9aXnj5PPT6r NW6CZBpzS3XPgGZ3oJlNNt3W2K4VEI08y/gVxvFZKKeOySx+14/ZDp4ysB5EATTaUAKa dsKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pmSpd6LA0prhuVo7OarxPEkGr0OnTgpuuDG4ZiGBWrg=; fh=j3e/3i9U8Rcspv9rw+m/gvnUCGzyR+t2dBeV1dfkRmM=; b=NPfUX57isPxdS7ogUGKL3I1SgPsUWU543+X9ag+nd7oejN0eaHxvESTBAomcVoOixn 1mPZJ+SHuDUmrT0kXB9wo2kZD0TVmFgI0EzM32ga8hrDraQ1R7WiQJ5nJHw4tx94xHK4 RuGLK29ud1bmEhEWGHTlU+u9/O3Yk2uFW7vwf0I3dKUa5jZG8M2P15ikuC28OD6f+Upm ZOs5qOZd/vun+YEd8zkepc/NDXtvru9X0KlCvn8BKbVV5qHXQT8sToTAiwEkrcu0rWS5 3lRaTcJYjSSJv8g1bQX+xIgk8SdunvCWBbzDkmgP1UwtYaPlGiKGFTR9FPGVOvKR6vrV qKfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sjSIBeIJ; spf=pass (google.com: domain of linux-kernel+bounces-5806-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5806-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z11-20020a170903018b00b001d331f3e1e8si14106532plg.261.2023.12.19.10.30.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 10:30:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5806-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sjSIBeIJ; spf=pass (google.com: domain of linux-kernel+bounces-5806-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5806-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4F89F28ACA0 for ; Tue, 19 Dec 2023 18:22:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F1A2C37D2B; Tue, 19 Dec 2023 18:22:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sjSIBeIJ" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20F7539844; Tue, 19 Dec 2023 18:22:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06FFBC433C8; Tue, 19 Dec 2023 18:22:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1703010162; bh=wSkiNjun2WCZD0RxVXQmuAD/N273lzHSG6FvzoIS+ks=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sjSIBeIJAPebdHDxXCC1d7uqA9GkNF23p1NHcKoyn30cPzw/xCTjaxvq3+TrTXwUv fsiw5vrzcaO1Y80EfN89YXyAZK9OLCTY/ip86xesQodMfPLkZjzidg5Aem01zlR6HO zc/A0JQt8csDafBQBDpk4xZ6Prf7wJQruSRaD/S0= Date: Tue, 19 Dec 2023 19:22:39 +0100 From: Greg KH To: Tanzir Hasan Cc: Kees Cook , Nick DeSaulniers , Andy Shevchenko , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Morton , llvm@lists.linux.dev, Al Viro , Andy Shevchenko Subject: Re: [PATCH v4 1/2] kernel.h: removed REPEAT_BYTE from kernel.h Message-ID: <2023121938-stargazer-purse-0dc1@gregkh> References: <20231219-libstringheader-v4-0-aaeb26495d2f@google.com> <20231219-libstringheader-v4-1-aaeb26495d2f@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231219-libstringheader-v4-1-aaeb26495d2f@google.com> 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 > + */ > + > +#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