Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2248329imm; Thu, 11 Oct 2018 07:25:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV60xNPLtN6U+jhWbuCSl6ZsH5LGn/vEFw8j2f/CpVjgQaBXsjNVSuIDr/pEgPuHfIdJ5nV4h X-Received: by 2002:a17:902:89:: with SMTP id a9-v6mr1725959pla.279.1539267927030; Thu, 11 Oct 2018 07:25:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539267927; cv=none; d=google.com; s=arc-20160816; b=w7JArNGCRpVTC0oKOC4q50hxerw431d6+YKLBQPnv/wAD15ZcRJCXysYj7ecN6Gmip DKR7ukrMud8IQy0bUi5iII3zt5j2Tx0A5iCP6qHy9eKRS32gYpmelsQc1Y5UPsSaksJ4 Q6/G1StlXHt6i6cdr2Ae0r8gRU+jUQHTfYeS9aPw+ATbre9Y3gUgOvcSSci/JzRVh6ga GFL0a10ilLgK2ARkeUTAhJzk8ZL9jJk+K2dXqm4jdcD1WugMmN+vkHWhqe0sK+HtLruk itkZiSCMW0SzuqUY6RkkSJixcUXgZjOufqhDKLCEFfMY2drGuz3O3EgtKyrE3Hj04Um8 vbZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=STBIIGKbgxIY6H83Y5ktH0aGvPGY20w730PnYMFoxeg=; b=j9LXatQ6EwnnztPSw5U9vqB2hsIQ/EvxJ6VkAGNkCjGWuMDQdGKJijO0q0yoKM44c3 x67xbg8s+t4sj+oZxrnGQoklJV7sFqjdGmqEg2dEN+HGsSUu5aR4B1BMsCSdi5GivlAj hWfK0thlJQcPv05jILCjAqhqvFxbpPjW1XuSWWtyMuXUwZKAkPNni1zk0mIUTa/oxNGD FNY2LUL1EeF9rty2rblUtolKj2aKav8riSS8jtb2ISJrni2dAegXIRjdVIr+0woNyBfW MWfu34rlsepMdP/GgaUo0txE4gzJMdyeEYDoTfvIML1Z0O21DeCF/wfoXxwpO9tQUs0V FvAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c89-v6si28849429pfe.60.2018.10.11.07.25.11; Thu, 11 Oct 2018 07:25:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728434AbeJKVue (ORCPT + 99 others); Thu, 11 Oct 2018 17:50:34 -0400 Received: from foss.arm.com ([217.140.101.70]:38318 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726537AbeJKVue (ORCPT ); Thu, 11 Oct 2018 17:50:34 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8BD94EBD; Thu, 11 Oct 2018 07:23:09 -0700 (PDT) Received: from [10.1.214.49] (unknown [10.1.214.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B41393F5B3; Thu, 11 Oct 2018 07:23:06 -0700 (PDT) Subject: Re: [RFC 17/17] arm64: compile the kernel with ptrauth -msign-return-address To: Kristina Martsenko , linux-arm-kernel@lists.infradead.org Cc: linux-arch@vger.kernel.org, Jacob Bramley , Arnd Bergmann , Ard Biesheuvel , Marc Zyngier , Catalin Marinas , Adam Wallis , Will Deacon , kvmarm@lists.cs.columbia.edu, Ramana Radhakrishnan , Amit Kachhap , Dave P Martin , linux-kernel@vger.kernel.org, Kees Cook References: <20181005084754.20950-1-kristina.martsenko@arm.com> <20181005084754.20950-18-kristina.martsenko@arm.com> From: Vladimir Murzin Message-ID: Date: Thu, 11 Oct 2018 15:23:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181005084754.20950-18-kristina.martsenko@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kristina, On 05/10/18 09:47, Kristina Martsenko wrote: > diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile > index 106039d25e2f..dbcd43ea99d8 100644 > --- a/arch/arm64/Makefile > +++ b/arch/arm64/Makefile > @@ -56,6 +56,10 @@ KBUILD_AFLAGS += $(lseinstr) $(brokengasinst) > KBUILD_CFLAGS += $(call cc-option,-mabi=lp64) > KBUILD_AFLAGS += $(call cc-option,-mabi=lp64) > > +ifeq ($(CONFIG_ARM64_PTR_AUTH),y) > +KBUILD_CFLAGS += -msign-return-address=all > +endif Should not it be done via cc-option so old toolchains keep working [1]? [1] $ aarch64-linux-gnu-gcc --version aarch64-linux-gnu-gcc (Linaro GCC 2014.11) 4.9.3 20141031 (prerelease) Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ aarch64-linux-gnu-gcc -msign-return-address=all aarch64-linux-gnu-gcc: error: unrecognized command line option '-msign-return-address=all' ... Cheers Vladimir