Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1292903rwd; Thu, 1 Jun 2023 13:19:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7f0vG8VBcgs9cIcFM3CGfPpTTkvqk4ZVP7sx8Z5KqimEW06ptBdXLYuIBS87WC4meM/TCx X-Received: by 2002:a05:6a20:7f94:b0:f2:ad27:f98a with SMTP id d20-20020a056a207f9400b000f2ad27f98amr8684153pzj.14.1685650794395; Thu, 01 Jun 2023 13:19:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685650794; cv=none; d=google.com; s=arc-20160816; b=m41F8XLzG36yUb6L2Q8PrUZX69Io4BVdmrCOgF620k74Ylfdg9JcpgBSMCXpTIb6JO eclyjO5WAYsyI2ba3lGcMQYMWyrta7TGUAUTo6EsNAff2sJWadnThZxITu8/stOGJ7nQ VbcTYf/gyqtFHWxt64pAQleG63UEJNa7QPhJx1g0ttnl3j7F8ciIgMlWWibcdfHRnAHk 3OAVu+432AJHygeVkA+mC0YHDzS5gLuntfGdfvb4jOrV6hmawn2vC6PG47lmEd7DWSJI KuGhW+Ss79aAzrblkZzMf1sXhUHLislqfaKWrywL2D2aIcL3XQoup0P9WeDRIaCgCa+2 l5Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=xjlZZ6nKS4GkUYpJEs75tROJCn6U9CxfxsCk2Sp4Rbc=; b=xnEvUBpyq3tN3AAiAGaKkS3zWKMYMXThaPPmrjLS/VcsN6L8N15nZ70CCkaZPgSMzD Rf4iBVOhZ5tjJJbMEbdYl8YRu45zsa8wg7SZRM5BwYQrMvVe2IfJABT4rEU/0OSq0jsd tzO/CNRyJPb3VMf+UA4GY+NExKYiVX+EX89+dtvmej2XVtd8Ll7KpVIuGC6FUpVEhFPq S3mmAXHSDyFkEtJX9tY19Yga+y5yP9e/xnmgRUb4FR4pp/jl6xYNSmd7cXMadpVPCQNQ Lckxu0CaGk2DT4zRVeynM1JkrEHPX/uHjSHiEuLWi3wk9AaTU7Ngw5gtCHNke7qiMnCe fWWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=aDdbymcr; 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 i70-20020a638749000000b0053fb2648d20si630567pge.220.2023.06.01.13.19.38; Thu, 01 Jun 2023 13:19:54 -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=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=aDdbymcr; 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 S231558AbjFAURL (ORCPT + 99 others); Thu, 1 Jun 2023 16:17:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231584AbjFAURI (ORCPT ); Thu, 1 Jun 2023 16:17:08 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94122189 for ; Thu, 1 Jun 2023 13:17:05 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1b01bd7093aso7869195ad.1 for ; Thu, 01 Jun 2023 13:17:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20221208.gappssmtp.com; s=20221208; t=1685650625; x=1688242625; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=xjlZZ6nKS4GkUYpJEs75tROJCn6U9CxfxsCk2Sp4Rbc=; b=aDdbymcrnaNTB9sTEUjXxYlQF+34yd3gmVLW6y8qN+ciqLDdoDsbstFhfyDrM/PY1n MW92kPQsCXs4+aBKxg7nAQiIZq+bW6/D7HMmgrWx9Tykz6gDlLL/Ga8Y4kqeD+TAlF01 Ii/8HV4B/epZ0php7mruuRMTndTIxxgGVyBoNPqVgf6I3dDyo3YlxqNAYnvPBVaga9mz FjyvLsYICnFuX3gVpaFiVzbZ5KfiTNcuUVgmamBCMLG7VgDqsWRLE2SVuhfOUJGs//p+ txUuP/BJrP8NczFjOq8sXTsFELlWkXEaXMzu2x3pTdHHBhYtT36wSR0Uzkh47WvYo71u r93g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685650625; x=1688242625; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xjlZZ6nKS4GkUYpJEs75tROJCn6U9CxfxsCk2Sp4Rbc=; b=WY/aDKXYUGPxVHMZAYhPt+QhpkE4rp7mPIptiwR7TY5B11akW5WVXI1h7dSY2EhEX6 vlSesP+KGFT1jc9S+0Ir67ambMhl6jStcLpb6ebrGNt89ZRU0hjEQkauYZdicIU49CwW bSUEEmRiYQSydbEraFaIHquhJa9kkzd8uqMXpqagxl55KrQJJKEhMK/Mpo04mcJblDgM oyKttI2lo+EzGD5WZ+lnJUy+qi0heVKPFQoKyknQ4QOmqlYuk04bSKcmbqL/hrz3go8L qfVYiHVE+2VN7oQryKqfhU+vPbunxW7+qLoZeiHOzyS4G5J3xgEg/z8YxappEzMCNMSN eWaA== X-Gm-Message-State: AC+VfDyEQX/EqEL66sovnuLnxTRvHIZF1Viu6s8ZNu+O0g94puobWwh2 rlEpJxo//vpIB4AMNKOWi1WxVQ== X-Received: by 2002:a17:902:f801:b0:1ae:8b4b:327d with SMTP id ix1-20020a170902f80100b001ae8b4b327dmr335375plb.42.1685650624848; Thu, 01 Jun 2023 13:17:04 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id im16-20020a170902bb1000b001a95c7742bbsm3979313plb.9.2023.06.01.13.17.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 13:17:03 -0700 (PDT) Date: Thu, 01 Jun 2023 13:17:03 -0700 (PDT) X-Google-Original-Date: Thu, 01 Jun 2023 13:16:34 PDT (-0700) Subject: Re: [PATCH v2] riscv/purgatory: Do not use fortified string functions In-Reply-To: <168564402237.2891605.1600418987887898293.b4-ty@chromium.org> CC: keescook@chromium.org, Paul Walmsley , ndesaulniers@google.com, linux-kernel@vger.kernel.org, gustavoars@kernel.org, linux@leemhuis.info, heiko.stuebner@vrull.eu, linux-hardening@vger.kernel.org, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, joanbrugueram@gmail.com, masahiroy@kernel.org, Conor Dooley , ajones@ventanamicro.com, hi@alyssa.is From: Palmer Dabbelt To: keescook@chromium.org Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Thu, 01 Jun 2023 11:27:03 PDT (-0700), keescook@chromium.org wrote: > On Thu, 1 Jun 2023 09:00:28 -0700, Kees Cook wrote: >> With the addition of -fstrict-flex-arrays=3, struct sha256_state's >> trailing array is no longer ignored by CONFIG_FORTIFY_SOURCE: >> >> struct sha256_state { >> u32 state[SHA256_DIGEST_SIZE / 4]; >> u64 count; >> u8 buf[SHA256_BLOCK_SIZE]; >> }; >> >> [...] > > Applied to for-next/hardening, thanks! > > [1/1] riscv/purgatory: Do not use fortified string functions > https://git.kernel.org/kees/c/ca2ca08f479d Sorry, I'd just applied this to riscv/fixes as well. I can drop it if you want? I was going to send a PR tomorrow, just LMK.