From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BA30C77B78 for ; Wed, 26 Apr 2023 17:34:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6D12C6B010B; Wed, 26 Apr 2023 13:34:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 680DF6B010C; Wed, 26 Apr 2023 13:34:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 548EC6B010D; Wed, 26 Apr 2023 13:34:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 4567F6B010B for ; Wed, 26 Apr 2023 13:34:43 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id F2EB31C68CD for ; Wed, 26 Apr 2023 17:34:42 +0000 (UTC) X-FDA: 80724242004.19.6E52D06 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by imf17.hostedemail.com (Postfix) with ESMTP id 3058E40009 for ; Wed, 26 Apr 2023 17:34:39 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=Fyjcy32w; spf=pass (imf17.hostedemail.com: domain of ndesaulniers@google.com designates 209.85.216.45 as permitted sender) smtp.mailfrom=ndesaulniers@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1682530480; a=rsa-sha256; cv=none; b=iXeMquPmDhhSl68tXxuYJq7ZYS9CNIhNrlx1KzrVFRdhVr3ic4aCCvTjWOpawpAo9/wvSM TEpBoZucKxqfHYrsKf/8Gvfynd4cL2HGzSvuBxySStPul2SecrXtum2K+ryayX4SM5KlUj Ed+XLzqQtJzP/hmFTmwXzcQqKw32yPw= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=Fyjcy32w; spf=pass (imf17.hostedemail.com: domain of ndesaulniers@google.com designates 209.85.216.45 as permitted sender) smtp.mailfrom=ndesaulniers@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1682530480; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=wnP+eYqDIqeo8coo+95vLR95RWSg/j9f2g7CwZiAsuk=; b=n1VP4OW9ikeAsfeklvyBrBj36E3k6FahNJ8QMipOIC4L6fFgrMveJpmXC99eJ+4+SOYYvL aeUCKm4sFuAqJc2NiSoFLTxK6to9ojfyW26tKDH8YFYMnVFpT9qMYCbBj2LGtb+maLHrHg icVUEOgbhkeXW8dg4tcKSYz2Kd3YLgI= Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-246eebbde1cso6227401a91.3 for ; Wed, 26 Apr 2023 10:34:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1682530479; x=1685122479; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=wnP+eYqDIqeo8coo+95vLR95RWSg/j9f2g7CwZiAsuk=; b=Fyjcy32wygKCr5y70MunVl9V2XGmo1U4DuwDAi607v9Ue3C97nr4LlUZi7qsUGpZls ImvvYnA1qdVf91ZJo94qSFXVBumEwweYQcl7BPptk5az7VEGNGJHpipdMG93RdOrZY5t e4KeI8MvLdhMuBCIs2CiGEvQTcrsc2mpPdU3tv9/XNsTxaNTvHb0g0nHPeEPRV3VAyy0 QbhIgET9Xed6qIOKqD/yigU3Bx2Uh2uxHjTKcVBQOxeGov1bcaD9hHb+jVia/CS1i2Cf Y2FRbRdwkpbBrbyvnjDKPkBUHOtdOLk2B5au8ovifGxma1TGCRiHAHnQWp5O9sebpsIz tnyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682530479; x=1685122479; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wnP+eYqDIqeo8coo+95vLR95RWSg/j9f2g7CwZiAsuk=; b=UP2Q6zFplcS0QGWTTT7au/USnjqvZ1zlBnw3vXK/4cyUNrNVglbRleXw+kopZaljxe yHyUki3Mvv9noh/Ttq+pMRrHqhNcPh+1jzEXQt63mtkQijzUAgzzhUIWft6b80heQCaG 9fcuvZ4l7HjMEG4usqi/JdDFVmHXt3AqVoFysUfWpbiTKUUUbFEiQUzFL5FVT4CfYHTp /W/JymtibMU6KW4/fi4CUq04z6clkbjGNuuJEEP+BMOH9oaczw4kvR19jp1aqym7Ftmb qIVNdzfGIiqgcpaD4lcUcZrj3QFe/gZqhZAtH3pBNXil66RLPBiswvtPBl5sffNI2ZFd 4h6w== X-Gm-Message-State: AAQBX9dppzFMnAQ4l2lrfnrRXohquZO5kJW799rVDwvImnUYmgrIuhrv uZ4YRZgngymOgHg9hekDDJ7RSbspztKzQX5IRbDXKw== X-Google-Smtp-Source: AKy350apifD2OfEFPqhuCMgz9gIY1LT3xl9XDOoAx73C6Vc4BsIQZEoD5WNsc/ODLfUz0nURi9u2HoT+e0XXD1q9hns= X-Received: by 2002:a17:90b:a0c:b0:246:5f9e:e4cd with SMTP id gg12-20020a17090b0a0c00b002465f9ee4cdmr21508551pjb.10.1682530478741; Wed, 26 Apr 2023 10:34:38 -0700 (PDT) MIME-Version: 1.0 References: <20230425041838.GA150312@mit.edu> In-Reply-To: From: Nick Desaulniers Date: Wed, 26 Apr 2023 10:34:27 -0700 Message-ID: Subject: Re: [GIT PULL] ext4 changes for the 6.4 merge window To: Linus Torvalds Cc: "Theodore Ts'o" , Nathan Chancellor , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Rspamd-Queue-Id: 3058E40009 X-Rspamd-Server: rspam01 X-Stat-Signature: tjbjopig8k1n8negaq5qeq7y6h99jnq6 X-HE-Tag: 1682530479-430728 X-HE-Meta: U2FsdGVkX18w49u8O2AbibJR5WdRzh2w8bhV86XhdxvCKhV8kK2hK5KZhpjEIuwOklbRY2jZTvpduvqi/ytSIpSHyQLeYFcgFlWFgstw9eqMGovxkh9sn0QEQdzM4JKGZ4FAKc7Te7WaZEzP7afY0D4tppAduyA3kmt4ZYAF+runxavEGmG56IGx2FLJ+3vLxxe8k5XvGAO4vZaU1SfQZ/7P5rOgZuF6y4/xGNnPr7ZbtYgqSTgcdg/5IsTzU35WSc6j9Yvov5BxvFdJoXk9smzihTPFb5J2tNfsvCGxND4tEaUP9KZ7ZBcgfA2NYEOHn96FM7EijCpSDyZRgg8AlSUV1oXPDg1oeOQ6krw3a6a/NZ6qPJmcfVh4IkouRbs8biWzUcFfGpErKr3RvdF97o/Vk9xEytiaKwnYejVQPjR4YFknBkyGu27cy9VMeVXkidIQ3oSd8j41Fyijchch5twmRgYAid5vFipfrreHWAQgCYbqBN5M/6HNCEHPtIAGLRksq6ZUhWPJMUKcEYciMofZ9kyuTUcrKJKCYhjigUSe0x5kAlx3s5G/gxefdJJKvJrIaAZTZ49lZXfHgy6kgx1TR5J44/G0CJJGsjgvx5sToWmc5OUyK9AlEYs6xL1YwopEZBrAHKV9lTG/QjbSfvdLd7vr14dI0hvveZ15hThXWKzg32UyTIapaRBmlwpfEonHO1e1f6b22ddMHxm62Qu3bT8YydqHryLl9cApei+O4X1JEIBA2LcsVwMI6gum4yRuw0sxEwuKpU7WWmXaXRNw8IJb5Til5DCLyWO2hddUtdvmhgRRGKGRR7gpRiktFFMqOHj58pUD2psFr+P6FAlKtvgdXU5j5QncOZF1rWUZadYKFmQEujdKgwD22777zTmg1lkJWBFisdESrZURrOOiAtDP4MCTxo2XzMSQRlSSu7aSjz2sFfXcSI5+YYYfq7xGxMTGbb6ewDOFQ0I nHOxiE2p ftEJO4He8ATiBCzZTZ4fhzm9hnDVQB35zV09u/KChEtLMjUbMsU1h8p5ywDm0GBrwQRceKnUeUrVWil2EkWpkfh5Cfu82lY7COGOXu19i1L8/JGlNtjrNet/zweiHb8VGz4QUIi4bnPYYdmEDozqeLh4giAI8oJTp+cSNx8nCt101VmrpmglWmp+X/AhrDQUcOQGx4FQDjTtOj1UhbcLfnAKQyeGDQ78UlYIzEQiGmWpb5Sok34QR8vS2Vwr1kqVMRdrZsRKSjL0t6mdihkdQVYgdiMAh+GoxoXI+qMn7Kjmnjy+SKFmoI3hRVuvpFm1r8dXGbGJV7Kng+uPgxCbUgGjybWcpfutTAcr7c3nDP0nDrOnXoYoH0gwxhp434597I4RvFbPXrh5qTxtvU5GUu1QbowPt+P2vs+TZ/fCAMwvu012ep/eOmsySaq9BI/gJ0xXG9Kt7mkfYEixE0/OraKiCS9PqHpylS8u3tCu23KJgfamS93cCTWW6PTU+608uYiOtflHV5CmB3w7uPfKLkS4Rlq7sq+/yov7GItSZQI+S3Wokck0dFTVtOzl5xpnVAhE5xsyAG8CcSmiVHusC3t3ha2U9Kwie6an/dO14kGu3bPJym0j8it27RA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Apr 26, 2023 at 10:03=E2=80=AFAM Linus Torvalds wrote: > > On Mon, Apr 24, 2023 at 9:18=E2=80=AFPM Theodore Ts'o wro= te: > > > > Please note that after merging the mm and ext4 trees you will need to > > apply the patch found here[1]. > > > > [1] https://lore.kernel.org/r/20230419120923.3152939-1-willy@infradead.= org > > > > This is due to a patch in the mm tree, "mm: return an ERR_PTR from > > __filemap_get_folio" changing that function to returning an ERR_PTR > > instead of returning NULL on an error. > > Side note, itr would be wonderful if we could mark the places that > return an error pointer as returning "nonnull", and catch things like > this automatically at build time where people compare an error pointer > to NULL. That's what clang's _Nonnull attribute does (with -Wnullability-extension). https://godbolt.org/z/6jo1zbMd9 But it's not toolchain portable, at the moment. Would require changes to clang to use the GNU C __attribute__ syntax, too (which I'm not against adding support for). > > Howeder, it sadly turns out that compilers have gotten this completely wr= ong. > > gcc apparently completely screwed things up, and "nonnull" is not a > warning aid, it's a "you can remove tests against NULL silently". > > And clang does seem to have taken the same approach with > "returns_nonnull", which is really really sad, considering that > apparently they got it right for "_Nonnull" for function arguments > (where it's documented to cause a warning if you pass in a NULL > argument, rather than cause the compiler to generate sh*t buggy code) Heh, I just had this conversation maybe within the past month with Bionic (Android's libc) developers. Yeah, the nonnull attributes !=3D _Nonnull "attributes." (Quotes because IIUC _Nonnull doesn't use the __attribute__ GNU C extension syntax). My understanding (which may be wrong) is that nonnull is implemented for compatibility with GCC, while _Nonnull was likely implemented by Apple (my guess; did not check) (so compatibility with GNU C __attribute__ syntax probably wasn't considered in code review). https://clang.llvm.org/docs/AttributeReference.html#nullability-attributes The Bionic developers are deploying _Nonnull throughout the codebase and intentionally not using nonnull which is dangerous (a teammate used the term "Developer Hostile Behavior"). nonnull has implications on codegen, _Nonnull only affects diagnostics. https://android-review.googlesource.com/q/owner:zijunzhao@google.com+Nullab= ility For examples. Works on return types, too. So _Nonnull can be used on return types rather than returns_nonnull. > > Compiler people who think that "undefined behavior is a good way to > implement optimizations" are a menace, and should be shunned. They are > paste-eaters of the worst kind. Thanks! :-* > > Is there any chance that somebody could hit compiler people with a big > clue-bat, and say "undefined behavior is not a feature, it's a bug", > and try to make them grow up? Good. I can feel your anger. Strike me down with all of your hatred, and your journey to the dark side will be complete. Your hate has made you powerful. Let the hate flow through you! > > Adding some clang people to the participants, since they at least seem > to have *almost* gotten it right. > > Linus --=20 Thanks, ~Nick Desaulniers