From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC0B2C433EF for ; Fri, 19 Nov 2021 16:42:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 905BC61B43 for ; Fri, 19 Nov 2021 16:42:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236611AbhKSQpO (ORCPT ); Fri, 19 Nov 2021 11:45:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233036AbhKSQpN (ORCPT ); Fri, 19 Nov 2021 11:45:13 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F5E3C06173E for ; Fri, 19 Nov 2021 08:42:11 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id w33-20020a17090a6ba400b001a722a06212so9248913pjj.0 for ; Fri, 19 Nov 2021 08:42:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=6usG8MiQSxUWW8t4LIS6CwwnjV4gadMypuBMhJfOTXg=; b=SJ/5hd7oOStu335XYv6nQAV6FVZqLIf9hAnFjiCDZVNARjObPclqPpfkPEbcoEKEcw UL7tgGQ7+lX1lEDpzzXPu1KfbxDez6M63n1J7dtwKmWViDnGvVnQc++e3Ymsvm2kDgpJ Vk6m5PtLG9oteHM0/wRxT6/CxDWmhUxiO3Bjk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=6usG8MiQSxUWW8t4LIS6CwwnjV4gadMypuBMhJfOTXg=; b=Oc19fIcx1yuD2Hh4D4oWv9b4gpmb9x7rtGZAvk/0OTWyhuwAUZd9YwdX6CfSIPdQ5X e1R9UMz8tHkp9FYYg4ef0twJb7SCebIMNzY7oqQFFRTY/zhhfiREwHRFpjlnnMpkgQ/E lns7MyIpt9dQ+JtSaidOwLiOIBQx+TEXi/JkAF3GS4uznOGSrXIVbpJnHdQ0pPOQ1Kd4 G3e6SCMhlVTUTu/1/boNJOsO0D5BG0N3B4WV6MuLAVJejA2a897o2SZfvpH7sRy+M05o 19R8utedz/2Go4ZQddB1F2xY8Mvbt9Wa4MqTn+Q8wozQUlyrtE7OmxNE+Z8N9TjiBpNs nxrw== X-Gm-Message-State: AOAM5309Gahfd1mlOSgZKEmQ7nZEDibRgaNfkUh46SV8Hu2JI4rnVR/M FNzOmH7c8M2AGJy3D7HnGXq7Xw== X-Google-Smtp-Source: ABdhPJxJ0yfws7sNNKBoF+QxKvxIZXPDJEJBvkkmJPuM3LXNvCkaPrbM3z7R/EkI+PBoP+BKqrRXXA== X-Received: by 2002:a17:902:cb8a:b0:141:f601:d5f1 with SMTP id d10-20020a170902cb8a00b00141f601d5f1mr79797842ply.77.1637340131104; Fri, 19 Nov 2021 08:42:11 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id t12sm11083635pjo.44.2021.11.19.08.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 08:42:10 -0800 (PST) Date: Fri, 19 Nov 2021 08:42:08 -0800 From: Kees Cook To: Christophe Leroy Cc: Michael Ellerman , kernel test robot , Benjamin Herrenschmidt , Paul Mackerras , Sudeep Holla , Peter Zijlstra , Nicholas Piggin , "Aneesh Kumar K.V" , "Eric W. Biederman" , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-hardening@vger.kernel.org" Subject: Re: [PATCH] powerpc/signal32: Use struct_group() to zero spe regs Message-ID: <202111190839.B6EC699B1@keescook> References: <20211118203604.1288379-1-keescook@chromium.org> <1e312cbd-cd52-ddce-f839-db765173c526@csgroup.eu> <202111190824.AEBBE1328@keescook> <7f4e7d24-6eb0-5ecf-3497-61c3633046bd@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7f4e7d24-6eb0-5ecf-3497-61c3633046bd@csgroup.eu> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 19, 2021 at 05:35:00PM +0100, Christophe Leroy wrote: > Neither do I. I was just scared by what I saw while reviewing your patch. A > cleanup is probably required but it can be another patch. Heh, understood! For my end, my objective with the fortify work is to either split cross-member memcpy() calls (which is usually undesirable) or add a struct group so it can be seen as a "single member" memcpy again (and usually results in 0 differences in binary output). :) -- Kees Cook From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0542BC433F5 for ; Fri, 19 Nov 2021 16:42:59 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 50DE9611F0 for ; Fri, 19 Nov 2021 16:42:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 50DE9611F0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HwjC44r8jz3c8t for ; Sat, 20 Nov 2021 03:42:56 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=SJ/5hd7o; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=chromium.org (client-ip=2607:f8b0:4864:20::62b; helo=mail-pl1-x62b.google.com; envelope-from=keescook@chromium.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=SJ/5hd7o; dkim-atps=neutral Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HwjBH4xngz2yb3 for ; Sat, 20 Nov 2021 03:42:13 +1100 (AEDT) Received: by mail-pl1-x62b.google.com with SMTP id b11so8518086pld.12 for ; Fri, 19 Nov 2021 08:42:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=6usG8MiQSxUWW8t4LIS6CwwnjV4gadMypuBMhJfOTXg=; b=SJ/5hd7oOStu335XYv6nQAV6FVZqLIf9hAnFjiCDZVNARjObPclqPpfkPEbcoEKEcw UL7tgGQ7+lX1lEDpzzXPu1KfbxDez6M63n1J7dtwKmWViDnGvVnQc++e3Ymsvm2kDgpJ Vk6m5PtLG9oteHM0/wRxT6/CxDWmhUxiO3Bjk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=6usG8MiQSxUWW8t4LIS6CwwnjV4gadMypuBMhJfOTXg=; b=A0UVIZqRXLKoXBV42+sJDVdRoGnpEmdzbu1mVPuaG8wuZuhqPREhQh+JlFDpYbfDKS N/tjFbCFPkU/PlnZf+KIX0dUeif47EqAtvlgL8PS416acTflyC7Y9qZ0sMWkz49zE3OJ QGVBhm5EcEJ4kCjsHuBIwV5hfiUKNgKZGQQmZNg8PgJsrd718i93swTYqZu7TRs463mg lTNBe2oM+9dR1lFidtDN44aiKjZ5K4i2oqXPkzBuN0x1gMpQ6UxdsbPvNG+95mFC6gs0 k8f58O0oPyyilmNO2P02bF6MezX9SYk4MGIVzn5oFlvUBrA9Cq7DEHgVUD0VaJs/Yf4U tGBA== X-Gm-Message-State: AOAM533gloVRqyWMMe0PQnXY4R7XhLKvlnVxvIhXC12UX4rqnPjbxx96 71cOdMxJr3NrROBn1qL7rpjuyQ== X-Google-Smtp-Source: ABdhPJxJ0yfws7sNNKBoF+QxKvxIZXPDJEJBvkkmJPuM3LXNvCkaPrbM3z7R/EkI+PBoP+BKqrRXXA== X-Received: by 2002:a17:902:cb8a:b0:141:f601:d5f1 with SMTP id d10-20020a170902cb8a00b00141f601d5f1mr79797842ply.77.1637340131104; Fri, 19 Nov 2021 08:42:11 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id t12sm11083635pjo.44.2021.11.19.08.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 08:42:10 -0800 (PST) Date: Fri, 19 Nov 2021 08:42:08 -0800 From: Kees Cook To: Christophe Leroy Subject: Re: [PATCH] powerpc/signal32: Use struct_group() to zero spe regs Message-ID: <202111190839.B6EC699B1@keescook> References: <20211118203604.1288379-1-keescook@chromium.org> <1e312cbd-cd52-ddce-f839-db765173c526@csgroup.eu> <202111190824.AEBBE1328@keescook> <7f4e7d24-6eb0-5ecf-3497-61c3633046bd@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7f4e7d24-6eb0-5ecf-3497-61c3633046bd@csgroup.eu> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel test robot , Peter Zijlstra , "linux-kernel@vger.kernel.org" , Nicholas Piggin , "linux-hardening@vger.kernel.org" , Paul Mackerras , "Aneesh Kumar K.V" , Sudeep Holla , "linuxppc-dev@lists.ozlabs.org" , "Eric W. Biederman" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Nov 19, 2021 at 05:35:00PM +0100, Christophe Leroy wrote: > Neither do I. I was just scared by what I saw while reviewing your patch. A > cleanup is probably required but it can be another patch. Heh, understood! For my end, my objective with the fortify work is to either split cross-member memcpy() calls (which is usually undesirable) or add a struct group so it can be seen as a "single member" memcpy again (and usually results in 0 differences in binary output). :) -- Kees Cook