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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A23E7CA9EB5 for ; Mon, 21 Oct 2019 06:12:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6C0BB2084B for ; Mon, 21 Oct 2019 06:12:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qTUTQ4ZT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726190AbfJUGMk (ORCPT ); Mon, 21 Oct 2019 02:12:40 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:44265 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbfJUGMj (ORCPT ); Mon, 21 Oct 2019 02:12:39 -0400 Received: by mail-wr1-f68.google.com with SMTP id z9so12353753wrl.11 for ; Sun, 20 Oct 2019 23:12:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=azBxEHDWCdsU7wz/faY/PPe9l3d9cjGBlYkkkxlsXNw=; b=qTUTQ4ZTdm9DHInhDE6X3VmBqT/KyH/eg44Ie2ZyppNJ+Mq7Gzf0scMCqvZQU3nPkq 9RuuuXt9ohJ5GGZ8h2flwhyvHo+h+mwCU3HJf+NkGF1ALj5/Q88VB5OWwPcY/IliqH+l L56F8Nihrbg51/Fsns1XWsTOeLYFw3fUNOlGzbLGBm3uO+epkCWsGR+NC1kxNQYUTroR SzEk6Ha++yb8a85i+5pTuUxz2bAL3RQbU/K5HeDKEBB8dlhFE55Qgv18UJrCUJZZh8vr uJ/G08ebShEM/n6IRWP8xr4T4msq/l2sffgnnJdXZSAWT/ipDYKo74mYhYFdnpTIOzIk VfLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=azBxEHDWCdsU7wz/faY/PPe9l3d9cjGBlYkkkxlsXNw=; b=Mbj1qhwesKYNxUs8PbjZqZptqVM1mqCiFvtv9GJquQri9LKesEHucNw4Ny5180XusH Eg5O7rCLh/tsJcQkP/5UrLdWZ/kYSThxorKKV88tJ/N2E0MAb7dCvvzlubDSjb81Gp7F /vCa6gabhC4r3Zk+f4A/vrfPXOngbTizOCXabJ42+DJeeSKRslD+eTEBzC4aH5KkHIO5 XB8/B/ZXGvxgdb5fPktNqFoLnILIfU+Vjxv17Wgf3tXHNQEzIZl8At0H1QJ9zYWq4T4f jcX7ldgN/bB7IntPsPHvA1xIe0MgcG/EVts6TIirLvWvvXyc7evSvP40HDme6h/ohjB5 kFMQ== X-Gm-Message-State: APjAAAVyr4cjTmOOHrIP4kRQ3N6dEh24uto04cxT2jCeY6aNCq7p2Zk/ IBVjFrWFHMjoMh4xdwiAz65Va++Jv1B95pAFBrje50tQ7qs= X-Google-Smtp-Source: APXvYqxnJb93TF5nD3jcoXnbupalitg5Dj+VYy2V93E3Z3QMw/jysu5nCOppGEaOWgZsmIzV8081S3I2H2bbczBjiHs= X-Received: by 2002:a5d:6b0a:: with SMTP id v10mr17063430wrw.32.1571638357257; Sun, 20 Oct 2019 23:12:37 -0700 (PDT) MIME-Version: 1.0 References: <20191018161033.261971-1-samitolvanen@google.com> <20191018161033.261971-6-samitolvanen@google.com> In-Reply-To: From: Ard Biesheuvel Date: Mon, 21 Oct 2019 08:12:26 +0200 Message-ID: Subject: Re: [PATCH 05/18] arm64: kbuild: reserve reg x18 from general allocation by the compiler To: Sami Tolvanen Cc: Nick Desaulniers , Will Deacon , Catalin Marinas , Steven Rostedt , Dave Martin , Kees Cook , Laura Abbott , Mark Rutland , clang-built-linux , Kernel Hardening , Linux ARM , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 18 Oct 2019 at 21:00, Sami Tolvanen wrote: > > On Fri, Oct 18, 2019 at 10:32 AM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > and remove the mention from > > > the LL/SC compiler flag override. > > > > was that cut/dropped from this patch? > > > > > > > > Link: https://patchwork.kernel.org/patch/9836881/ > > > > ^ Looks like it. Maybe it doesn't matter, but if sending a V2, maybe > > the commit message to be updated? > > True. The original patch is from 2017 and the relevant part of > arm64/lib/Makefile no longer exists. I'll update this accordingly. > > > I like how this does not conditionally reserve it based on the CONFIG > > for SCS. Hopefully later patches don't wrap it, but I haven't looked > > through all of them yet. > > In a later patch x18 is only reserved with SCS. I'm fine with dropping > that patch and reserving it always, but wouldn't mind hearing thoughts > from the maintainers about this first. > Why would you reserve x18 if SCS is disabled? Given that this is a choice that is made at code generation time, there is no justification for always reserving it, since it will never be used for anything. (Of course, this applies to generated code only - .S files should simply be updated to avoid x18 altogether) Also, please combine this patch with the one that reserves it conditionally, no point in having both in the same series. 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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A96C0CA9EB5 for ; Mon, 21 Oct 2019 06:12:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 78CEB2084B for ; Mon, 21 Oct 2019 06:12:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="s7Zx+AMg"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qTUTQ4ZT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78CEB2084B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Zs86Birioh6JFxp1KioZyQzM+ApU/Slb+/ErJ3LTRQc=; b=s7Zx+AMgapl6lG 4Lc6LlMHMdBPe8iLZ5UutLDrlg5/T+MRZ+YiAiqeCpQ7mN1iY2krOjMMf6f1ZCiMcTjsVeyGq26AV ZkYDhLdNBNPj5A01erhWPYjnpU0Vm4emPhIGWPbsSEPIvGBhtGJd9ZxWOiqXSf5Rqh6WSKwDKEFR1 KzoW9+LqHB/1HiG5nt4PsjcMDe4VRWwDwZ74sPwarUJ8UnybtySXFUe5s2AjW6GAqMmuACMQe0IHu WATtdTWaiGJkbKKuFP11N26rzKDurTvbwL/5sA8QBXd8PolxjK71dFG+gzipXTdFV++qzBkJ6oNmJ gSNldNUjkkU/0TXTWqAg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iMQvu-0007NL-39; Mon, 21 Oct 2019 06:12:46 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iMQvq-0007MS-CR for linux-arm-kernel@lists.infradead.org; Mon, 21 Oct 2019 06:12:43 +0000 Received: by mail-wr1-x443.google.com with SMTP id r1so2548182wrs.9 for ; Sun, 20 Oct 2019 23:12:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=azBxEHDWCdsU7wz/faY/PPe9l3d9cjGBlYkkkxlsXNw=; b=qTUTQ4ZTdm9DHInhDE6X3VmBqT/KyH/eg44Ie2ZyppNJ+Mq7Gzf0scMCqvZQU3nPkq 9RuuuXt9ohJ5GGZ8h2flwhyvHo+h+mwCU3HJf+NkGF1ALj5/Q88VB5OWwPcY/IliqH+l L56F8Nihrbg51/Fsns1XWsTOeLYFw3fUNOlGzbLGBm3uO+epkCWsGR+NC1kxNQYUTroR SzEk6Ha++yb8a85i+5pTuUxz2bAL3RQbU/K5HeDKEBB8dlhFE55Qgv18UJrCUJZZh8vr uJ/G08ebShEM/n6IRWP8xr4T4msq/l2sffgnnJdXZSAWT/ipDYKo74mYhYFdnpTIOzIk VfLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=azBxEHDWCdsU7wz/faY/PPe9l3d9cjGBlYkkkxlsXNw=; b=dwpOFV2J1uYuL/1enl4O7QPU/5BjuvAq4g/e+FfVkMFVVMLeqK8CaYc+x+OBL3fWEy aY5+cLuVpH3A4BRTi0L6Xp6mzKVUO6imGQaYNLxKjqUMKmiAjiUJAYR1ksh3fzVxAudQ L8uH23lu9Ah/TNaHH1fuZRhgxZ7BwRYvtQtIshFba6uAbTzPUr5Twgcs9a9XBQxlWBW5 Bly8MRXgUdZq4cHUW3qdV66PuoWwZ6MNr3S8OvY5RpCR30H6cyD/qTSffKjGM0mDznDo KSPPf5MF52yVJ3dRoUDoPZfWUxJ44x4is16EvxNjPvX1/ksmqijsvr2S0y82PF5Erxea msFg== X-Gm-Message-State: APjAAAWjPtt9+CzChZXDiueHfQa4LqMvRof1POkQbt6yftTDRmI5XkSP p3buFvu518NZoenHv53UTQQgRrdCtAIuSjsTKbckVQ== X-Google-Smtp-Source: APXvYqxnJb93TF5nD3jcoXnbupalitg5Dj+VYy2V93E3Z3QMw/jysu5nCOppGEaOWgZsmIzV8081S3I2H2bbczBjiHs= X-Received: by 2002:a5d:6b0a:: with SMTP id v10mr17063430wrw.32.1571638357257; Sun, 20 Oct 2019 23:12:37 -0700 (PDT) MIME-Version: 1.0 References: <20191018161033.261971-1-samitolvanen@google.com> <20191018161033.261971-6-samitolvanen@google.com> In-Reply-To: From: Ard Biesheuvel Date: Mon, 21 Oct 2019 08:12:26 +0200 Message-ID: Subject: Re: [PATCH 05/18] arm64: kbuild: reserve reg x18 from general allocation by the compiler To: Sami Tolvanen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191020_231242_454867_839EC8C3 X-CRM114-Status: GOOD ( 17.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Kees Cook , Kernel Hardening , Catalin Marinas , Nick Desaulniers , LKML , Steven Rostedt , clang-built-linux , Laura Abbott , Will Deacon , Dave Martin , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 18 Oct 2019 at 21:00, Sami Tolvanen wrote: > > On Fri, Oct 18, 2019 at 10:32 AM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > and remove the mention from > > > the LL/SC compiler flag override. > > > > was that cut/dropped from this patch? > > > > > > > > Link: https://patchwork.kernel.org/patch/9836881/ > > > > ^ Looks like it. Maybe it doesn't matter, but if sending a V2, maybe > > the commit message to be updated? > > True. The original patch is from 2017 and the relevant part of > arm64/lib/Makefile no longer exists. I'll update this accordingly. > > > I like how this does not conditionally reserve it based on the CONFIG > > for SCS. Hopefully later patches don't wrap it, but I haven't looked > > through all of them yet. > > In a later patch x18 is only reserved with SCS. I'm fine with dropping > that patch and reserving it always, but wouldn't mind hearing thoughts > from the maintainers about this first. > Why would you reserve x18 if SCS is disabled? Given that this is a choice that is made at code generation time, there is no justification for always reserving it, since it will never be used for anything. (Of course, this applies to generated code only - .S files should simply be updated to avoid x18 altogether) Also, please combine this patch with the one that reserves it conditionally, no point in having both in the same series. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06B6ACA9EB5 for ; Mon, 21 Oct 2019 06:12:58 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id 49BDB2084B for ; Mon, 21 Oct 2019 06:12:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qTUTQ4ZT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 49BDB2084B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-17068-kernel-hardening=archiver.kernel.org@lists.openwall.com Received: (qmail 25752 invoked by uid 550); 21 Oct 2019 06:12:49 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Received: (qmail 25734 invoked from network); 21 Oct 2019 06:12:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=azBxEHDWCdsU7wz/faY/PPe9l3d9cjGBlYkkkxlsXNw=; b=qTUTQ4ZTdm9DHInhDE6X3VmBqT/KyH/eg44Ie2ZyppNJ+Mq7Gzf0scMCqvZQU3nPkq 9RuuuXt9ohJ5GGZ8h2flwhyvHo+h+mwCU3HJf+NkGF1ALj5/Q88VB5OWwPcY/IliqH+l L56F8Nihrbg51/Fsns1XWsTOeLYFw3fUNOlGzbLGBm3uO+epkCWsGR+NC1kxNQYUTroR SzEk6Ha++yb8a85i+5pTuUxz2bAL3RQbU/K5HeDKEBB8dlhFE55Qgv18UJrCUJZZh8vr uJ/G08ebShEM/n6IRWP8xr4T4msq/l2sffgnnJdXZSAWT/ipDYKo74mYhYFdnpTIOzIk VfLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=azBxEHDWCdsU7wz/faY/PPe9l3d9cjGBlYkkkxlsXNw=; b=Wkyq4nKrPixTMTiX8y1LLE9pYuQmjXTsNX/9ahqpfgbbsGgKBJsyu3OsEB9VZeC4pz /7dt1BU1VQToLx7ndHS8cbqh32JHEyPHh72kymFq0b7pUTNUCtVDXN11ZnD+y9JTlvAC waWgtYfSvzfmnVJx1LlyaB59PKcNefZHd198beXDCGZmRKsNlkJ584oAx4rWtJkWwqaQ MLRZB1JH1LytQ1W0c7EYAWIeR83TKOyI7Kg47C/Zkt5DUwUtFhl/5wOdri6Lna1SEnZB sXl5wXN5hzsHprxM77Mh8VoVFDwhkJFME5JmvyswygVAd8Puf61haS4HBGYZgDLYGUE/ MTmw== X-Gm-Message-State: APjAAAW5KAWpS1YDcPkET9bcGSCgoU2vSwHwKFq4ymcHSFZE5cPmVzhL ohnOykNVewFAQ4s3Tg3JBsTTPzBuCu2XEpdQeBso/Q== X-Google-Smtp-Source: APXvYqxnJb93TF5nD3jcoXnbupalitg5Dj+VYy2V93E3Z3QMw/jysu5nCOppGEaOWgZsmIzV8081S3I2H2bbczBjiHs= X-Received: by 2002:a5d:6b0a:: with SMTP id v10mr17063430wrw.32.1571638357257; Sun, 20 Oct 2019 23:12:37 -0700 (PDT) MIME-Version: 1.0 References: <20191018161033.261971-1-samitolvanen@google.com> <20191018161033.261971-6-samitolvanen@google.com> In-Reply-To: From: Ard Biesheuvel Date: Mon, 21 Oct 2019 08:12:26 +0200 Message-ID: Subject: Re: [PATCH 05/18] arm64: kbuild: reserve reg x18 from general allocation by the compiler To: Sami Tolvanen Cc: Nick Desaulniers , Will Deacon , Catalin Marinas , Steven Rostedt , Dave Martin , Kees Cook , Laura Abbott , Mark Rutland , clang-built-linux , Kernel Hardening , Linux ARM , LKML Content-Type: text/plain; charset="UTF-8" On Fri, 18 Oct 2019 at 21:00, Sami Tolvanen wrote: > > On Fri, Oct 18, 2019 at 10:32 AM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > and remove the mention from > > > the LL/SC compiler flag override. > > > > was that cut/dropped from this patch? > > > > > > > > Link: https://patchwork.kernel.org/patch/9836881/ > > > > ^ Looks like it. Maybe it doesn't matter, but if sending a V2, maybe > > the commit message to be updated? > > True. The original patch is from 2017 and the relevant part of > arm64/lib/Makefile no longer exists. I'll update this accordingly. > > > I like how this does not conditionally reserve it based on the CONFIG > > for SCS. Hopefully later patches don't wrap it, but I haven't looked > > through all of them yet. > > In a later patch x18 is only reserved with SCS. I'm fine with dropping > that patch and reserving it always, but wouldn't mind hearing thoughts > from the maintainers about this first. > Why would you reserve x18 if SCS is disabled? Given that this is a choice that is made at code generation time, there is no justification for always reserving it, since it will never be used for anything. (Of course, this applies to generated code only - .S files should simply be updated to avoid x18 altogether) Also, please combine this patch with the one that reserves it conditionally, no point in having both in the same series.