Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp885855rdh; Sun, 24 Sep 2023 17:00:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFWQh1v3avRJFOBgzIQ4VCiT+hbCQBVSV71WJD6BrzfS+bwv4KjTaa+jvL4SUoxlPuaV0xX X-Received: by 2002:a17:902:e84d:b0:1c4:50fd:7cd1 with SMTP id t13-20020a170902e84d00b001c450fd7cd1mr3517525plg.11.1695600058517; Sun, 24 Sep 2023 17:00:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695600058; cv=none; d=google.com; s=arc-20160816; b=ix4h25PN0VwqH93tm3brLPJDRE5zVQb6312hJ3EGnKKmBJwW9PWbU3nlm4JUm07jxr KmWLkm/E2HKNmiVdNXjWi0/FzQRuCg5mCUmmCFbDoNcKlMby4+EycVzWSc4gWWoT/gl5 6x9pItmmQfHpESAU4QdcLvK5Ru0/vsh9kGp02oQl+HD/5NjvHgrwGRhoY2i1oNl7F4yA XuYcm7VNIY3cYR3BgctwXlLcovWB/xbLvsYvOw+sEl99z/ebm7kh5IJ3vcCmk92TL5iG zRz69PGm2c8srHk3QndR4sZYgbC9ud41x0S7UBotE4BBcnVq6D0wgFXx63DQWf6QvitB V9Ew== 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=wcipxSNQY08wl7UPw3CDMFJCTeN6Z65jpzmRv2y1p7Y=; fh=jgJ0S1khhn/CnjTWTKTWCz/jPjKeSATEEn1nOWISz7k=; b=XX2Pdbig5VRC5FMUNtWlQJVbu85rysJ2C1J/hEtkGW2zyvaauy2LPBiEfcjyvNWP0h OxIVN89/X2E5PuQvNy/BYINMurl4T5h7oXirK6jmx4eSlu4r5xeXvn85LlNqS/cnkqKC MA57F8MlwVvIPvtXxUBYmhj9ght5MWbrKO5ZkbdLcEDYhSZTEeAEkrx7B4gfgqG+zoi1 tbLufzEZNA3DR+F2MfxXYzBoafj5pv2WxRhIJofEaMlOJmF+8yy+8eo9i5/Txwi1pytr snUaD++A0jDU7OoUZDQOeqB4XTvoR2+j/rvLbSZHFVGMX9zVuQe+cLf5F/j83fLd8Wmo Cvzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Yb0m3ZNu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id v190-20020a6389c7000000b00578e6f108c6si9095808pgd.173.2023.09.24.17.00.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 17:00:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Yb0m3ZNu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 989B4827D0F9; Sat, 23 Sep 2023 11:05:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232211AbjIWSF0 (ORCPT + 99 others); Sat, 23 Sep 2023 14:05:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232177AbjIWSFZ (ORCPT ); Sat, 23 Sep 2023 14:05:25 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ADE9136 for ; Sat, 23 Sep 2023 11:05:19 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-50435a9f800so4628949e87.2 for ; Sat, 23 Sep 2023 11:05:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1695492317; x=1696097117; 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=wcipxSNQY08wl7UPw3CDMFJCTeN6Z65jpzmRv2y1p7Y=; b=Yb0m3ZNueVYWCDBBP0RdYirqLddPCZX0l+BK8D2hQljNkocxGFmwA5TZD5QEAtk9Sh IjAirY78b/pd7KK46EDlhMN+IkuHASg55baBzueEdCvgzIFPaO294zkE8vZs3yi1wxY7 lfRwopxyMQG4s01cBPk1gTSnv59H8AnLB0k48= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695492317; x=1696097117; 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=wcipxSNQY08wl7UPw3CDMFJCTeN6Z65jpzmRv2y1p7Y=; b=eiim2bavbwUVtvXLtHYAXmlcLEtUMxhu97nct0lGEm4KAFn/UQg20fGNZsOClLXkqJ PKC6zIy8UvtjwtaedM2etVxNa7UzGiLnWzsBpn/e97OxJJuq9X5qNWNuoVVYo7D60O50 Dg248AujcgH1bLz5MUTYR4lI3nrG19ZBysFGhs2tUz7apL5pGIh6yagsZDiBh8wYPpsy kYqPRAr17BNnqvxJzJO6KaXtBH9picX2TrToMj17QWQq7gJUW/kaUK2N8/1+VZwYnC8v oo7LRxR2XANt7427V1pWnFIo0hjKlmT+8UyCLPUrRqobK3IcIArSoIAvgXuc2ee8z4o8 RnaA== X-Gm-Message-State: AOJu0YxYFLQsJtSLQdNWo4YfzJTiizyQECdRrW0jXovyJsKYpBNKvTD4 g3KIRnQzeUSNG2nVk3rhY39+2NS5r4gS85nC+Whq0rd8 X-Received: by 2002:a19:2d56:0:b0:500:9ab8:b790 with SMTP id t22-20020a192d56000000b005009ab8b790mr1863626lft.60.1695492317272; Sat, 23 Sep 2023 11:05:17 -0700 (PDT) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com. [209.85.167.54]) by smtp.gmail.com with ESMTPSA id v25-20020a197419000000b004fb9c625b4asm1160064lfe.210.2023.09.23.11.05.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 23 Sep 2023 11:05:16 -0700 (PDT) Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-50435a9f800so4628868e87.2 for ; Sat, 23 Sep 2023 11:05:15 -0700 (PDT) X-Received: by 2002:ac2:4bcd:0:b0:504:4165:54c1 with SMTP id o13-20020ac24bcd000000b00504416554c1mr2774098lfq.7.1695492315346; Sat, 23 Sep 2023 11:05:15 -0700 (PDT) MIME-Version: 1.0 References: <202309220957.927ADC0586@keescook> <202309222034.F2B777F55@keescook> In-Reply-To: <202309222034.F2B777F55@keescook> From: Linus Torvalds Date: Sat, 23 Sep 2023 11:04:57 -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 , linux-hardening@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 morse.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 (morse.vger.email [0.0.0.0]); Sat, 23 Sep 2023 11:05:24 -0700 (PDT) X-Spam-Level: ** On Fri, 22 Sept 2023 at 20:49, Kees Cook wrote: > > 2) __cplusplus is relatively common in UAPI headers already: > $ git grep __cplusplus -- include/uapi | wc -l > 58 Look a bit closer. Most of those - by far - is for the usual #if defined(__cplusplus) extern "C" { #endif pattern. IOW, it's explicitly not different code, but telling the C++ compiler that "this is C code". So this new #ifdef is an ugly new pattern of "do totally different things for C++". Apparently required, but very ugly nonetheless. Linus