Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22566334rwd; Fri, 30 Jun 2023 09:32:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7GL51bc57WAdsbRjrAmaLMQ/AU3ysve51acq5BjUWeeGAnAnTYWKN/Bcsa507PeS97NUZB X-Received: by 2002:a05:6a20:13d8:b0:127:b4d:551e with SMTP id ho24-20020a056a2013d800b001270b4d551emr2420409pzc.13.1688142751724; Fri, 30 Jun 2023 09:32:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688142751; cv=none; d=google.com; s=arc-20160816; b=gxKYWBaFgFk6JnNa12CZkhzcmMssRv818vEFf2gCCLPwXTPoFuI8ZjdDLXuTtU1Cdz WT4LzriYOio82Py8mWn8Anfn1mzwIPW+pKnPVCUgs5xbD/qVZNzIgstix7YHdXOm/G71 GwUENhmwWYdVJOT0itcdmBnkz2zUvI7gJ6XQJd0TNkSno4C+2vFBlnrjkNKfBAf8ZjzO nOlzp1Qwc4GelKQ6Z1L/6r1ZsZYHE8UNy3b093JnHzJoSJV++OYHET/UKiM/xvpSei3s omcI2rpRs9GpjgjPDqpTSYVv97TMEbX8XqPuuU7VsP7gg2qSKpNlzYahAPMA4cFMY+QX hweg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Sg13xGYv8z3aKMTOSuPSBHhxLlyyz33hg4HsG7ryfAA=; fh=mAOG52EycoZNsSwcF98rj0oe1D0koKen67sTejs0qUg=; b=ikLC8G5jBDUMlSDl3qCHQP7LTe6OtpewAltZC6uSZ9+4EgUUJtjfnKhu3pjLnirQS0 K5fR4BR+zBdNb81DtWRXuzcTI3GBY6e8PxD0u+5tXWBQApa2ucBHiYbesHhPftagxce8 m7ZVqlatF0sSxiQK1PMPr91vo85pec/3alBGT75G/jwcLJOH8YmvQlVHlqcj5QfjbZ9E EPQP/6Us9ZeqoFTRlJ4MRPJ6zuU6uczrPojorZd+gg1js0fDzelvuH6pvyi6A528RxSU WWPKpPt7HI58J9hze+2Fwu4ei0UiJC7qnEdAPHgTuX9Vt1ZutmsTerdwFeJYgm/oP9Ju mN7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=CALM6SuT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o15-20020a656a4f000000b0053424040bb7si14351714pgu.298.2023.06.30.09.32.19; Fri, 30 Jun 2023 09:32:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=CALM6SuT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232837AbjF3QCS (ORCPT + 99 others); Fri, 30 Jun 2023 12:02:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232586AbjF3QCP (ORCPT ); Fri, 30 Jun 2023 12:02:15 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12D7ECA for ; Fri, 30 Jun 2023 09:02:14 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2b6985de215so33697171fa.2 for ; Fri, 30 Jun 2023 09:02:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1688140932; x=1690732932; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Sg13xGYv8z3aKMTOSuPSBHhxLlyyz33hg4HsG7ryfAA=; b=CALM6SuT/8o6doWToXXNL7LTLDWuUzc3TV0ANV9KXZmE4Zrtm0U9KjldAe4oSOtSty da6c9HQvgo5dKqW+zDiR+pWtgO9nd5cPQvoCsKZmI3rNcZX8NbKwpl3R2CmJ4DwlDrn7 41VCViTnagM3DwE3QXrslgeMo/jhUfpbcps8A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688140932; x=1690732932; h=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=Sg13xGYv8z3aKMTOSuPSBHhxLlyyz33hg4HsG7ryfAA=; b=SiX4p2vxA+p1HniGGv5rBX/gfMx8xHXuI7z8xT4EYNCVfK3Ya0WgGeTYLW68ZP6H3v VAcoIArOcffKC4TzqKJcja6iGM/2SvjpZYJU+zv4yavEj2o67YqbuOkcusxz1K8dpcRC pz/u87pKZo8f7DLfzkp7wu3PR64MrsSh35jiXXJicPworm2g9NbI9lidgM8kA5jF0Fx9 Oj9FSLyGQjfeCN9UM7x3HcbqVF4AAfs/EtkDhsVZM1Ei2+1ACL1/3rUYwYMCJ/e33+11 CbgWI7NnhlD1n2tTltMWuha7z0+m/eTDZC+QIWeSqafd5tZ7RmRVV4eguneQjgelb5zN dnkg== X-Gm-Message-State: ABy/qLZoHGj9lgxbeYIfpypJ137/sLlmpQHROs2VyUwaQyWenbf6hUoU lJ4xDXYc1RM2PVWqhq0nOrbi/JU92gp4sXMJR0Kq0sfh X-Received: by 2002:a2e:878f:0:b0:2b5:84fb:5939 with SMTP id n15-20020a2e878f000000b002b584fb5939mr2654417lji.30.1688140931823; Fri, 30 Jun 2023 09:02:11 -0700 (PDT) Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com. [209.85.208.54]) by smtp.gmail.com with ESMTPSA id a2-20020a1709065f8200b009827b97c89csm8173920eju.102.2023.06.30.09.02.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Jun 2023 09:02:11 -0700 (PDT) Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-51da8a744c4so2208004a12.0 for ; Fri, 30 Jun 2023 09:02:11 -0700 (PDT) X-Received: by 2002:a05:6402:321f:b0:51d:9231:b9fa with SMTP id g31-20020a056402321f00b0051d9231b9famr1860110eda.39.1688140931050; Fri, 30 Jun 2023 09:02:11 -0700 (PDT) MIME-Version: 1.0 References: <20230628-pokal-puzzeln-5199c679b051@brauner> <20230630-testphasen-orangen-0e54486a267d@brauner> <20230630-stiefel-rotor-7f2d13fc084f@brauner> <8b73a39a359b4523a053efd614cd7dd7@AcuMS.aculab.com> In-Reply-To: <8b73a39a359b4523a053efd614cd7dd7@AcuMS.aculab.com> From: Linus Torvalds Date: Fri, 30 Jun 2023 09:01:54 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] pid: use flex array To: David Laight Cc: Christian Brauner , Kees Cook , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 30 Jun 2023 at 04:21, David Laight wrote: > > The bit pattern used for a NULL pointer is implementation defined. Oh, pretty much everything we do in the kernel is implementation defined. And yes, we do indeed basically rely on the bit pattern for NULL being all zeroes, and that example I gave with PCI_IOBASE is just one of many. And yes, compilers will sometimes complain about the things we do. On s390, for example, the low memory range is special (and the kernel mapping is special), so s390 uses all these pointers that are *literally* small constants, and we've had to turn off some compiler warnings because gcc would think that we're doing small offsets off NULL. But "implementation defined" is actually the good case. The problem case is "undefined", when we sometimes want to do exactly those kinds of things. We try to generally avoid it, but we sometimes end up using compiler switches to say "turn off that part of your logic" (strict overflow comes to mind). Linus