Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp342016rdh; Sat, 23 Sep 2023 12:56:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IED/jrkkTI9OxAd+sAiORXJmT96Ix78iqHC8kQVc+YGzH1T3OVycbj6pMkm1OZcKErSqaqD X-Received: by 2002:a05:6808:1450:b0:3a1:bfda:c6d2 with SMTP id x16-20020a056808145000b003a1bfdac6d2mr4182326oiv.11.1695498972751; Sat, 23 Sep 2023 12:56:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695498972; cv=none; d=google.com; s=arc-20160816; b=Fwz2rqj46MgT4w8NFZKhmt9j5ucRUmHj+h3c+cPQbmFt53MvN4gJoKE8rRNf21roqA cC3IEja6BMl+REcutmYSmvCGgyZ/egr2xSlAEz+CKv/IyFYlBj8DY5qa/bcxmOYC+rM6 BVaTS8IVvnBZJhjQ3x1NIRJi9adU/cKpxpyZqECMwBRK81PHeUEkwYyTP3dKBvjmRAgL wVIqT9J1AQRINseW8TG+h6O3h3e9cpRxd+CkSIjXd74b2GQOWNDdjnAQgsA8EhLV24Pr QkiaOVELnQ2uXxePyPGfV6WppnAi4RZ4zozzZSRlAKtEvOo7urWce8A9kE076BtywUyO wnjQ== 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=merlx8zyFVbSTOkQ7KtQ6LzM5SBv7ZrAIafExSV7TA4=; fh=ndloGh3sRtH+T5CAT5zTIWbKXxOnNCr7rmyNZSqbSuE=; b=yDN1j7fexudieZ8En7AAq832dv3CssNqZPgdr7pi4mvElN3k3v6sFVTiTfJIS+OlnQ +0+JMSlTKdIT8sPbmpYbA+oKHzw2P7qCNNgq6XPWJDRaYSisv6LwEBvCKcjOlEr93w0P DsPiq7g9/QyiIa87b32tgZp4/PErtwnza1/7TdQ9bF3x/uDlCxGTSYAk9x5mOfNRaPfx 4LgF4dyU3x6gt/a6o8MOCet9UaDFfZw/2uNaySrmfcsOjF2oIPkIR0Iags4wZ4p20ZHB BuSbaDUOI+5nYA2lZeXcl/Yt/SjBfdnVRRG3c3JVHQ9fYGntJeYEM+B32yvDRweXw7qC 8ueQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=M8a3v+u8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id y189-20020a6364c6000000b00569fd44093fsi6474660pgb.230.2023.09.23.12.56.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 12:56:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=M8a3v+u8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 5BC6C81F3792; Sat, 23 Sep 2023 11:02:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232160AbjIWSCt (ORCPT + 99 others); Sat, 23 Sep 2023 14:02:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232077AbjIWSCt (ORCPT ); Sat, 23 Sep 2023 14:02:49 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD6D8127 for ; Sat, 23 Sep 2023 11:02:42 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-9a9d82d73f9so484377566b.3 for ; Sat, 23 Sep 2023 11:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1695492161; x=1696096961; 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=merlx8zyFVbSTOkQ7KtQ6LzM5SBv7ZrAIafExSV7TA4=; b=M8a3v+u8pR+OVrs61fuvI8nFrqRlVyEAohGuCWsgT+vKVoqQXBBBFxl8MOqiFAv5rb kKq21+dJdNBgkGsKfDcghlw/CJvX464/M5Iq9FlQoppZiE0ol4xb5QDJHP0m4gZ7nyJt G3lrBM0anLByTZVJcuwjC791U5nvlNWbduSQI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695492161; x=1696096961; 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=merlx8zyFVbSTOkQ7KtQ6LzM5SBv7ZrAIafExSV7TA4=; b=LcL5kUbSwv7/8rbC8EcNh6+odPVuLAre07idoTT6U5fza8TuNYQaKk9gmXqcm6qV6k zn5WUgXX6BR6ee7WZwAzR0xYY39VQWVU+GU0aPYS3V7H9vWdjTOVooNa6MqX3n4HIibZ p+yaPON++vQnwbo4KbshOrT+xXF6x7ExqMQWyFND73FbcQibTLbPVV6pokhiw42oz37S nOJT0IuLV5SC8whB71ht4O1aAxp7SfKSou9kyM70k465HP2D1zOUHejr2v6Isre79LnQ yMHa8oLv7cIsBGEiNdShIJhBG40hDqSPfWESkZmFcAaWD0PEUHi+3Zfo3hRTCOnNWDZt BSwg== X-Gm-Message-State: AOJu0Yz62YmF3xjYzjLRYfNnnLNQAPmqAGTnrdxN5SSEywa2deU1rcUv LSw6Ra5S+zcGFqBFWqN8Oviq40AwimQCSDSyxnenjLLg X-Received: by 2002:a17:907:75f4:b0:9ae:40d1:999b with SMTP id jz20-20020a17090775f400b009ae40d1999bmr2154163ejc.16.1695492161069; Sat, 23 Sep 2023 11:02:41 -0700 (PDT) Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com. [209.85.208.52]) by smtp.gmail.com with ESMTPSA id z21-20020a1709063a1500b0099d0c0bb92bsm4155757eje.80.2023.09.23.11.02.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 23 Sep 2023 11:02:40 -0700 (PDT) Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-5230a22cfd1so4565517a12.1 for ; Sat, 23 Sep 2023 11:02:39 -0700 (PDT) X-Received: by 2002:aa7:d5c6:0:b0:533:6ef4:9f5b with SMTP id d6-20020aa7d5c6000000b005336ef49f5bmr1917272eds.6.1695492159622; Sat, 23 Sep 2023 11:02:39 -0700 (PDT) MIME-Version: 1.0 References: <202309220957.927ADC0586@keescook> <2983cda7-f084-4eb2-811d-158f43e99e47@p183> In-Reply-To: <2983cda7-f084-4eb2-811d-158f43e99e47@p183> From: Linus Torvalds Date: Sat, 23 Sep 2023 11:02:22 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] hardening fixes for v6.6-rc3 To: Alexey Dobriyan Cc: Kees Cook , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,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 pete.vger.email 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 (pete.vger.email [0.0.0.0]); Sat, 23 Sep 2023 11:02:49 -0700 (PDT) X-Spam-Level: ** On Sat, 23 Sept 2023 at 09:53, Alexey Dobriyan wrote: > > This doesn't work with g++ :-( Whee. So the compiler seems to literally test "is it at offset 0", and refuses to do flex arrays there. Oh well. So flex arrays are just not usable on C++, because the language tries to "protect" us from outselves. What else is new. I suspect it's the same broken reason that empty structs aren't zero-sized - stop the user from being clever. I had hoped that the C++ people had learnt from their mistakes, but no. Happily we don't have to deal with that crud for kernel code. I don't like the #ifdef, but if it's needed... Linus