Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1991313rdd; Thu, 11 Jan 2024 16:18:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8pNN1TObQqDANPimBxrH9smv7kwOTzV43Ry5qcgoXCCov0JHWr39Nop8M5EhCoixVAmCF X-Received: by 2002:a17:906:ca52:b0:a2c:aa85:cf3 with SMTP id jx18-20020a170906ca5200b00a2caa850cf3mr109195ejb.5.1705018735230; Thu, 11 Jan 2024 16:18:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705018735; cv=none; d=google.com; s=arc-20160816; b=DDBCcdrGDRteUv8S2ZLIIRDRqkVDUl0DlbxmyGShN8Fa2FaZJFcOHq0sjHvFDBd7Xd zPfeKmRRR8AUZNPOjKtoYOp6Xk0z8BPV77v6onpQxnrKGVpZYBbsBi4NBCvJPp8PEIIm SSTrIUqEP3XatZvz3d6T9iUY7djVKeAWpwhBa4lKz20NNx7mm/W8wNWDLmLTZLqL4jGA Xeam2pCV6wzi2/kBPEd46G3MsriTh7eC0vwslcLn7EXpqnU6MPXJh1BZWHLDiBRyKs6J WZUNYB65SSgfFyCN31p2OemqYPyILH3ptwe1LGYAJhpJ7HDU4YTZErk0LbZfpA0a+SVa FD2w== 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=7ckfdvUM867eVAU33Kckg9n+n5xC+joVeZXEKBZM060=; fh=pExMcL8GdB3Ry2BknVBFpeabUsI92Pgs8NkMzQCpMhA=; b=GX3dJRntGBk6ubBHPhUuM2KrntvNxic9RhiWMtodPiMrBJ7L7Jzgz16cBwqOAMVh6U CSJbpRUp4j19Wo6kifXkZSREUPKMpxCqj8D+mCvDduA+pLa12lIjgW934OhuNNUsmqsc 1e2jHLHgnXp1eoxG4YkbRBBfpobPk4t77TJ/LBcfwvksbk2BB0ytge/SDH/fOz0GOLEb MOAirTqMXr/u10aq2BGQ0FTg+3QZnDAxMYbcdhUGzYG8iBLQXozsjyNJ1J7+GRHrlmY5 ZY3vVNOsqWCpCa4in9xDc/4maF8uQl5EZVdsa8o7MwLoZisEwgWMTV8AZT0cMZj5hdtz RnNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RijKlkpv; spf=pass (google.com: domain of linux-kernel+bounces-24175-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24175-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id p18-20020a1709060dd200b00a280da89f8fsi962142eji.193.2024.01.11.16.18.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 16:18:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24175-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RijKlkpv; spf=pass (google.com: domain of linux-kernel+bounces-24175-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24175-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 am.mirrors.kernel.org (Postfix) with ESMTPS id F2EFA1F25351 for ; Fri, 12 Jan 2024 00:18:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BFFD0808; Fri, 12 Jan 2024 00:18:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="RijKlkpv" Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (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 A0640361 for ; Fri, 12 Jan 2024 00:18:38 +0000 (UTC) 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-pl1-f179.google.com with SMTP id d9443c01a7336-1d480c6342dso46270395ad.2 for ; Thu, 11 Jan 2024 16:18:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1705018718; x=1705623518; 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=7ckfdvUM867eVAU33Kckg9n+n5xC+joVeZXEKBZM060=; b=RijKlkpvw7ODd5O8Ssv7s5eRunAz8bwp3X8/wkHKPfUGeIjB5ff3SKlat/WrgUDFfs 3o43mAPemKNjUN9kx405TWpxN2cuk5rIJ6jyoWY+W+nlyqNcfTNSqAt9PRd5Z99b2b5a XMWQ4TBXMtDEOfaR7bDUDlSWsnirGiecXqVww= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705018718; x=1705623518; 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=7ckfdvUM867eVAU33Kckg9n+n5xC+joVeZXEKBZM060=; b=ZgjWmV+5uKe7JDqWUB2ZnA/aiHSosNIrtvXNLQ6kzus+we6uhddEjZhalWIeinb92E STm5zblGnK15snj8/91gaahQOBx6cv0xwSGPi5NhTHAKWEfVQXbRX+r22MeCN02ytxl1 tKIhOYMHvtwRfCRmF/sCoOFda52UCIFPLTehrlbK043dGOnDly2NViNbNOoNcqon4uR+ sHg94HgQieb6Ts/p/lTXjr6XinJ8OO6fs7kAyutdXH2ZSA0NyyZRofrxicY+VaEWxacG SG67fNtVvSCzZFBdo3oiCQVXyk6NxyPdBIh00U4tYw7vw6QD6YLSAoMf1BYsSQXxe7WJ NCvA== X-Gm-Message-State: AOJu0YwqTjHwBr8Ux5LoSsx3YDTBNuFbe6DkI3CG+C3vWKnDpYKztUBC hrKHzKnSwhG5shzkMuQQCHKRKJNQOQlU X-Received: by 2002:a17:903:25c3:b0:1d4:1f06:f4e0 with SMTP id jc3-20020a17090325c300b001d41f06f4e0mr121227plb.137.1705018718030; Thu, 11 Jan 2024 16:18:38 -0800 (PST) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id n11-20020a170902d2cb00b001d398889d4dsm1754222plc.127.2024.01.11.16.18.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 16:18:37 -0800 (PST) Date: Thu, 11 Jan 2024 16:18:37 -0800 From: Kees Cook To: Kent Overstreet Cc: Matthew Wilcox , Linus Torvalds , linux-bcachefs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [GIT PULL] bcachefs updates for 6.8 Message-ID: <202401111613.781DFC8@keescook> References: <202401101525.112E8234@keescook> <6pbl6vnzkwdznjqimowfssedtpawsz2j722dgiufi432aldjg4@6vn573zspwy3> <202401101625.3664EA5B@keescook> <202401111534.859084884C@keescook> 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: On Thu, Jan 11, 2024 at 07:05:06PM -0500, Kent Overstreet wrote: > On Thu, Jan 11, 2024 at 03:42:19PM -0800, Kees Cook wrote: > > On Thu, Jan 11, 2024 at 10:57:18PM +0000, Matthew Wilcox wrote: > > > On Wed, Jan 10, 2024 at 05:47:20PM -0800, Linus Torvalds wrote: > > > > No, because the whole idea of "let me mark something deprecated and > > > > then not just remove it" is GARBAGE. > > > > > > > > If somebody wants to deprecate something, it is up to *them* to finish > > > > the job. Not annoy thousands of other developers with idiotic > > > > warnings. > > > > > > What would be nice is something that warned about _new_ uses being > > > added. ie checkpatch. Let's at least not make the problem worse. > > > > For now, we've just kind of "dealt with it". For things that show up > > with new -W options we've enlisted sfr to do the -next builds with it > > explicitly added (but not to the tree) so he could generate nag emails > > when new warnings appeared. That could happen if we added it to W=1 > > builds, or some other flag like REPORT_DEPRECATED=1. > > > > Another ugly idea would be to do a treewide replacement of "func" to > > "func_deprecated", and make "func" just a wrapper for it that is marked > > with __deprecated. Then only new instances would show up (assuming people > > weren't trying to actively bypass the deprecation work by adding calls to > > "func_deprecated"). :P Then the refactoring to replace "func_deprecated" > > could happen a bit more easily. > > > > Most past deprecations have pretty narrow usage. This is not true with > > the string functions, which is why it's more noticeable here. :P > > Before doing the renaming - why not just leave a kdoc comment that marks > it as deprecated? Seems odd that checkpatch was patched, but I can't > find anything marking it as deprecated when I cscope to it. It doesn't explicitly say "deprecated", but this language has been in the kdoc for a while now (not that people go read this often): * Do not use this function. While FORTIFY_SOURCE tries to avoid * over-reads when calculating strlen(@q), it is still possible. * Prefer strscpy(), though note its different return values for * detecting truncation. But it's all fine -- we're about to wipe out strlcpy for v6.8. Once the drivers-core and drm-misc-next trees land, (and the bcachefs patch[1]) we'll be at 0 users. :) -Kees [1] https://lore.kernel.org/lkml/20240110235438.work.385-kees@kernel.org/ -- Kees Cook