Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1542357lqp; Mon, 15 Apr 2024 09:18:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU8Zh+hA8qMJgH4OETd8WiNYo+qrO3kAyu9akN+UKa2FdkEkcK026U9pL579Azl9zQXbsODE3bNL4+XHddCc6O99h6Xm1b5DGFW+Hn32w== X-Google-Smtp-Source: AGHT+IEOdkh2vL/T7IxxFmVMCMVBMhwZBe9LH3Son2VhjTNEi7u+k9HEwP7TVk3KE+4KKo1jgiMn X-Received: by 2002:a05:6122:7c9:b0:4d4:3ec6:421e with SMTP id l9-20020a05612207c900b004d43ec6421emr8122529vkr.4.1713197879914; Mon, 15 Apr 2024 09:17:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713197879; cv=pass; d=google.com; s=arc-20160816; b=UAXIC4JQX2x+4giZGtpgz/x1NsTpgTBwlQKI4XxUivcxg6OWxtkp+Xtkq8J+ObQsG7 /ZKtkzM3mmBjOX2zYfETTviNLbfCf366JsCKxVirG+nRTfTryL9cRUY4/xl5OWtEQ1hR 4mtLuxN5MlWHiomSfjXHbJknocFBn79DcLZDaw70ye8iMSTsmSjW4uoskP+K+fL1Tweg tQ4HBT/lHAnSJ9yt1403Ae0FDJn9avQeoDvuMcchIkjkLIVzoo1nqPebNotgQsxmUPMy 7NU/Q4gJsRIAggzHyze3zgUMnQLkHNFceZkD53G2LeX+ZqhpJmfEF4oOcHm2w3M4dReG AqWQ== ARC-Message-Signature: i=2; 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=1Wuy1kFscarp11LSwiP+LELXc8a3c+7S4sus+rZZCwg=; fh=DZ2xfmGbTufUO53BiVEbl5Ay142hQKRXNDxK5ddF9G0=; b=j3kxxXDcXNlyb1cTikyRIaZaVGjzqoNpKSFLc/keu50dOsSk6y1HAp5cRq/egnU+HV HIHW2lEgsf1O8fdf6OKTVyH7IIy1wBhOFVT9Q3t6kpRX7FtDsZLjFEdtRhQS9Dq3Kmme MlErrkLvat4om3aqLeTODjWgpRmHVpTVKlgodPjT/wh/PdkZ2BkJ/OL2q5VVMecV5XC0 5ZlHWhrmmgcBeOBUXy0hnGtrovcSHIXsTgLg9WCUGSYQsWo8MKbU92z/IeeZk5OkrI65 0UBNAJLgWgGTwaKSJF9sidfOBgl3toyq9HZZ6t+jpGmm3Vf03kFT5Qu6oSbtzvdayBvW UBGw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=L9dJsEwQ; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-145535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145535-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d30-20020ac5c55e000000b004da9f2e4df6si1417272vkl.188.2024.04.15.09.17.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 09:17:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=L9dJsEwQ; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-145535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145535-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id CD3FC1C22DEC for ; Mon, 15 Apr 2024 16:17:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F85C3E48F; Mon, 15 Apr 2024 16:17:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="L9dJsEwQ" Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4B4D80BF0 for ; Mon, 15 Apr 2024 16:16:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713197819; cv=none; b=jOk2eUmyOfm0cZzROuI7fcb9y8eYkqvsk8TfNeQR4dEGorhk0VX9gngzabj8D+ssufWT3oq+UWqSSFFAu84RfaSzZdY9TJFltidh9UMxLIFr7ubJtAy0vOgr2a+il2x2XA8alBI7tGbV3PL95AkTslw2/OsUPvqi0+ofSsXh2Qo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713197819; c=relaxed/simple; bh=Lh5jHfeqmoxBPj80NPylZDokwvnjtT1xO7DB/e/QTl0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NSMuO9TuMSYpVMMn5aq2RS12qi4J0ZuYBVrOswDuggjOfWFGMlfVYGPjy/mA74Fsa/FqyTW1CM5YHXzBcUCY3OU57q5EYhUJI0dQ8qlzl1d5Izs+kF4W3JnLEJxIzLMJ5vTWLCY9sOz6hzSM2cK4M8RNjbBIhMEB2qfXxtS5T9k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=L9dJsEwQ; arc=none smtp.client-ip=209.85.210.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-6ead4093f85so2675973b3a.3 for ; Mon, 15 Apr 2024 09:16:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713197816; x=1713802616; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=1Wuy1kFscarp11LSwiP+LELXc8a3c+7S4sus+rZZCwg=; b=L9dJsEwQZUV7UF5qrsYmxyjgq4bd65AnkhOcLxH/X3VD9C4Pn2pH+6HJ8amWZ8MxeP ekAfUfaoHLLKytMXPdsLlxN0jdlh+QZRaDgPSp+gQlTxlCzFikPgXUun49QJZZ9tbawH AY84nyuhPjNrglxxRweBq5O9lMb/h694Lmk8k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713197816; x=1713802616; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1Wuy1kFscarp11LSwiP+LELXc8a3c+7S4sus+rZZCwg=; b=h/T5mYuRHzftJ9JW3VsReAwRad6vfXPFNQNAB5WLBVlsGqOJ9ua0r30eZZjnNph2x+ nXv4qrKEjoEA8GWply5ZubFvNK388Dxfs9y37bM/9CM+RRLH68AQETorZ0Db7zRg3aji 6y4KAjWYO8ujZeA8R9Xcr+qtAu9ZFNP37dn/nJ/1cK+wlXtapjarXN6TtzjymNMkVGig N1vJ98MH6i+cC1vgb4rOd5V/iNQ7ddWIzqC8d36VeBJ/dpHpP0F8+63NbQ7kHd971hse L8FP4/+k2WW0Oyx1OuovzB6GKRDZMYtIigf4ooI6kAYSyWLylHPhwd/mtQtOa6B+gS1S fFOQ== X-Forwarded-Encrypted: i=1; AJvYcCUerjqLQcM2AevQIJhaU+Yq8Ym8OkR5VHUl0f8TsxcG/Fe+v63WNd19KcqIMWq3d7KCmw+Af0Uwkb1jabebbKkyE5YR+bLz8y05hSSc X-Gm-Message-State: AOJu0YyBI2eQigsCOfzSTR7f22PSG7BxqmirwQX0ucU/7TVSqdYxofYq cpxq9a1Z8D6KuLp9PQCEmHbMJD8l4CRmFmXOUK9lpuX772qYv+vTaT4MmjBnBQ== X-Received: by 2002:a17:902:b906:b0:1e3:e256:44e0 with SMTP id bf6-20020a170902b90600b001e3e25644e0mr8045502plb.31.1713197816058; Mon, 15 Apr 2024 09:16:56 -0700 (PDT) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id p16-20020a170902e75000b001e223b9eb25sm8109561plf.153.2024.04.15.09.16.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 09:16:55 -0700 (PDT) Date: Mon, 15 Apr 2024 09:16:55 -0700 From: Kees Cook To: Arnd Bergmann Cc: Andrew Morton , Arnd Bergmann , Masahiro Yamada , Nathan Chancellor , Nicolas Schier , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/6] [v3] kbuild: turn on -Wextra by default Message-ID: <202404150916.7FD484FD4@keescook> References: <20240415122037.1983124-1-arnd@kernel.org> <20240415122037.1983124-2-arnd@kernel.org> 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: <20240415122037.1983124-2-arnd@kernel.org> On Mon, Apr 15, 2024 at 02:20:32PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > The -Wextra option controls a number of different warnings that differ > slightly by compiler version. Some are useful in general, others are > better left at W=1 or higher. Based on earlier work, the ones that > should be disabled by default are left for the higher warning levels > already, and a lot of the useful ones have no remaining output when > enabled. > > Move the -Wextra option up into the set of default-enabled warnings > and just rely on the individual ones getting disabled as needed. > > The -Wunused warning was always grouped with this, so turn it on > by default as well, except for the -Wunused-parameter warning that > really has no value at all for the kernel since many interfaces > have intentionally unused arguments. > > Acked-by: Nathan Chancellor > Signed-off-by: Arnd Bergmann Reviewed-by: Kees Cook -- Kees Cook