Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp3124788rdb; Fri, 22 Sep 2023 21:04:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJQOgLWNPZzqRZZqk/BKsPyuckg0Z6MuLsNmmaAV4iCy/BALvuhHsGooeCIuFgz/4S2uhy X-Received: by 2002:a05:6870:f105:b0:1d5:e15c:5dba with SMTP id k5-20020a056870f10500b001d5e15c5dbamr1567011oac.45.1695441859891; Fri, 22 Sep 2023 21:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695441859; cv=none; d=google.com; s=arc-20160816; b=dPw4Y6ziPQTNb6RS2Nf9txt+JCaS0LuFJG0H2LPHL/kHIbN2dVLsdr67pmoTufLR7S jHOwJYOFO5aPGLJRh9W5mE30wjaMZPz/PxX8SXISH8PDYmZBuuoBW78YTk6FHY3jATba cKz7POKJngvfv+1LQkVNX3dudFGuybMPfCMp2DHQQgkDVXXD3h3cqiQZUKxQmOXl4112 6yqPWBJUoPCQOsj9iddQj5FfIbFl+Hm5vIXM3v6q6el2+jbF9LsqMDwclJCNao6Ez95o gJaPjtWGNfu4ut48SCf3oC8RHrNYH8Yfl7DWmMvrf+VGH+kTLKvqNYSC078ld+788iHs 17Aw== 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=VgsTwjAhcmGfF4w2bLuCjQsCnbO+ua2mlKup05QwknA=; fh=fL6YrQScr2sAjpbePXWaFihNXCydQ1t7MWra9FmAfXo=; b=KK3HVuzYvMFQmwqVDp7AGQODid5LqyiG9ireKycSYgWgcA/B6aaJJxRLLH9dGa9PMX OJmDKydbOas3wcMxj/jNCH1yDoAaeQADV5PvPC20b4sZq0vTUMur/bXt8d4itqjQkltt LkouHYYKA8xDMiKhtkdI1tCMbmynG3PjY5yFz0yMb4NikMSxrUyG22tJ9BmwhmJUVQhb zApYYsGwUhyA3Ts6yuW4fndXf0e1Js6VqMROOAiLPmy15mawkyF9WhMGHVRnf96mnYNL AU4TJ1P/YN10wrDLj+OyJazyMCq3YvwqegEBwSDCJNJQiEOxjUzI0JpYk3cm1+QGG1iC e+Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=c3VAnxiJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id w4-20020a634744000000b00573e6013bc4si4992878pgk.851.2023.09.22.21.03.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 21:04:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=c3VAnxiJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1553082C1220; Fri, 22 Sep 2023 16:56:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230357AbjIVX4O (ORCPT + 99 others); Fri, 22 Sep 2023 19:56:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbjIVX4M (ORCPT ); Fri, 22 Sep 2023 19:56:12 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31E661A2 for ; Fri, 22 Sep 2023 16:56:06 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-503f39d3236so4894781e87.0 for ; Fri, 22 Sep 2023 16:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1695426964; x=1696031764; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VgsTwjAhcmGfF4w2bLuCjQsCnbO+ua2mlKup05QwknA=; b=c3VAnxiJi7m1qxRF9YunaTwNTLzBEnGWuAXFK96YylDEUT/6xY0Gh1jockPCnNncKo RHQkJT5uiGNz3LjqKKRU2QFKcYb+zHilSVSppFcHZS4ankEcz6qDpM4stjvFS6ONqsa6 VvsX4jBWj/iVTt3geX+6D/k8A0ueVV7aZETm8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695426964; x=1696031764; 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=VgsTwjAhcmGfF4w2bLuCjQsCnbO+ua2mlKup05QwknA=; b=D9SHXxF7FqZ15L+l2j3axu/n7wR99+1AXDrrrRM9r5zGA0qQMb8IECz4fyN8+anmKj M+exCs/K4jvJCwdiF05iCS1lz/ozMZI3S3veDjb5TFt7kToh9f8z8QbCG1ktLYY6AmBV LVYrwdmxe4OIpthlnr1He9ibljDAmwBzZvH9hi4xVQLdnOi0EFToxEQtG/N0DMmwhggp kQfhDaf7TipMr+svHbpx3/aO8QZpEmwxGvcoMjL6E0rObuFmgEckEqpVpzk1bC+3zZH6 iEV8gGCQSJ7WkXvCwSLujmPOEuJu7TS4bT+eUfYAjN5ZQovTzXxeRHkD57MJEfrd8gwT WXCQ== X-Gm-Message-State: AOJu0YxgZ65mw2obWlVwrB1yWZXL382H6GNSXJ4y6yO8MMSosNETbDwM kL0iTZ7kA7DRuqccWUHjDGYlyUC+/v0M8gXAGdYPMQDM X-Received: by 2002:a05:6512:210b:b0:502:d639:22ed with SMTP id q11-20020a056512210b00b00502d63922edmr625887lfr.48.1695426964199; Fri, 22 Sep 2023 16:56:04 -0700 (PDT) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com. [209.85.167.51]) by smtp.gmail.com with ESMTPSA id 8-20020ac24848000000b00500a467914esm882188lfy.38.2023.09.22.16.56.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Sep 2023 16:56:03 -0700 (PDT) Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-503f39d3236so4894753e87.0 for ; Fri, 22 Sep 2023 16:56:03 -0700 (PDT) X-Received: by 2002:a05:6512:250d:b0:4fb:90c6:c31a with SMTP id be13-20020a056512250d00b004fb90c6c31amr896714lfb.14.1695426963156; Fri, 22 Sep 2023 16:56:03 -0700 (PDT) MIME-Version: 1.0 References: <202309220957.927ADC0586@keescook> In-Reply-To: <202309220957.927ADC0586@keescook> From: Linus Torvalds Date: Fri, 22 Sep 2023 16:55:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] hardening fixes for v6.6-rc3 To: Kees Cook Cc: linux-kernel@vger.kernel.org, Alexey Dobriyan 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_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 22 Sep 2023 16:56:15 -0700 (PDT) On Fri, 22 Sept 2023 at 09:59, Kees Cook wrote: > > - Fix UAPI stddef.h to avoid C++-ism (Alexey Dobriyan) Ugh. Did we really have to make two different versions of that define? Ok, so C++ did something stupid wrt an empty struct. Fine. But I think we could have still shared the same definition by just using the same 'zero-sized array' trick, regardless of any 'empty struct has a size in C++'. IOW, wouldn't this just work universally, without any "two completely different versions" hack? #define __DECLARE_FLEX_ARRAY(TYPE, NAME) \ struct { \ char __empty_ ## NAME[0]; \ TYPE NAME[]; \ } I didn't test. I'm just hating on that '#ifdef __cplusplus'. Linus