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=-3.7 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,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 6FD63C433DF for ; Wed, 27 May 2020 18:35:27 +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 3C20920835 for ; Wed, 27 May 2020 18:35:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TytH7yeW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="ntJ5XnpR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C20920835 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com 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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0rhDwTBGtQ/5CQhmg2C/IEsm0jxcBbHXbnI28ottmO4=; b=TytH7yeWCVkC3RXumGmhl3BbU Z8degzhBtFB0aSYOuL23pglOntLAsGEXmm0Bzc+UwBy/W7OIypKymqgoPO3Zh2WUNyFe2H/OaS3Yb RN4xxHPAtb3YUIQ90VXW/GwqpFUHiWqeTWZAuQF+/h1iygwJg8SBGSHnqVh+0R1J6r9lFl3oUe6Qh 2jrcSx0mS0lnaoDWvXf3xMaj5jaDL8s6b8gOkSLyasE1o22MpsxggFTe+Pf2mwsyhPPdJWt1EpRQe 2bF4utvktUbapD+6S+xqZe0qKpzxsLfcesXaDcclajRtLfuRF6fPIR3vSGdOwin66Yx7w+xFRgbNz E+ZIabEhQ==; 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 1je0ti-0001Ty-N6; Wed, 27 May 2020 18:35:26 +0000 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1je0tf-0001Tb-As for linux-arm-kernel@lists.infradead.org; Wed, 27 May 2020 18:35:24 +0000 Received: by mail-pj1-x1044.google.com with SMTP id ci21so1980962pjb.3 for ; Wed, 27 May 2020 11:35:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Ac0TzlNqiL+rdZbCAWc33T2M+dlFeVr61CWdwcJ9jPo=; b=ntJ5XnpRsas3+IMRMkXV9mcg+6CdbP5T94nDFftj+4ije7j9kUpq40mpLekWlH7lmr v0pHPz+h4ZJ7MURzp29LzyPdWpK5hvGFFrBNYkiLR2zpYFkIujD8VfGPfd9EJGJ2RiAH eiao4XAVqkbAGxBNqSzZR1BCJagtyVTbzHtnr0RV4y7OVFWJldtsbvj7jS7UOzmirJZn 8e7c+7y5Dhl9SfuiIxQ+P8quG5KWv6kvHbdpOAf0VGiFlJ1LRg7eUEoXw1khaFbWaOe9 8mScLq9mra70QUndy0nnxLX5YfwM0TLoSw3U+yyrLPCguSLnac8d3Q4jnxB/MV1JBzS1 LPkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Ac0TzlNqiL+rdZbCAWc33T2M+dlFeVr61CWdwcJ9jPo=; b=p4fG8oqUmWCufxxOE6IP8sjSbWmYj6NP2XpI+YR9bJthWMlfFv1nusuwBtcj/xnaFs hfjRNdhqgaOJOm4ugHObsKCHyJVtXGjDC9UaUVr9JMkF837H1EaLkVjTzkYV3rCiYXSq pm/IDYx72asLHvqY2JKg//pFBuG/VpcCO3VPetXRgJ3eVcyy96Y1R4Tr+s0KTpw/CkJy Yy0JfkA/g2lSaIftixtqfaXyvH2/ZIT/lij2hspqDi43C2gPb7QNtn39LA19V3GRQ8ul 4wEKr3MzWJmge5fb+jGNX26+tDKZ/CKhnt4nMGo3tO75cYUTQBfRvqqmg2wuyWkdo3Ca ju/A== X-Gm-Message-State: AOAM530E4KfHr88lIVTP4Ja1WXZecQ2MFROi2Jerh6KhXKXDZUydV+9p jDvC+XYzpTDkDdBKoU64qPw3iQ== X-Google-Smtp-Source: ABdhPJyhIbb+P3aEI+nNHtP5EaxJ5+1NfeT9he/b7PSyOrzjqPRnOl5zjZoroTF+LzRVkxyswCPIDg== X-Received: by 2002:a17:902:c006:: with SMTP id v6mr6787936plx.53.1590604522433; Wed, 27 May 2020 11:35:22 -0700 (PDT) Received: from google.com ([2620:15c:2ce:0:9efe:9f1:9267:2b27]) by smtp.gmail.com with ESMTPSA id k7sm2497552pga.87.2020.05.27.11.35.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 11:35:21 -0700 (PDT) Date: Wed, 27 May 2020 11:35:17 -0700 From: Fangrui Song To: Arnd Bergmann Subject: Re: [PATCH] arm64: disable -fsanitize=shadow-call-stack for big-endian Message-ID: <20200527183517.uhph2pvnkyf6c5p7@google.com> References: <20200527134016.753354-1-arnd@arndb.de> <20200527152406.GD59947@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200527_113523_391706_38BDD460 X-CRM114-Status: GOOD ( 20.29 ) 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 , Tom Stellard , Catalin Marinas , Nick Desaulniers , LKML , clang-built-linux , Sami Tolvanen , Will Deacon , Linux ARM Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-05-27, Arnd Bergmann wrote: >On Wed, May 27, 2020 at 7:28 PM 'Nick Desaulniers' via Clang Built >Linux wrote: >> >> On Wed, May 27, 2020 at 8:24 AM Mark Rutland wrote: >> > >> > On Wed, May 27, 2020 at 03:39:46PM +0200, Arnd Bergmann wrote: >> > > clang-11 and earlier do not support -fsanitize=shadow-call-stack >> > > in combination with -mbig-endian, but the Kconfig check does not >> > > pass the endianess flag, so building a big-endian kernel with >> > > this fails at build time: >> > > >> > > clang: error: unsupported option '-fsanitize=shadow-call-stack' for target 'aarch64_be-unknown-linux' >> > > >> > > Change the Kconfig check to let Kconfig figure this out earlier >> > > and prevent the broken configuration. I assume this is a bug >> > > in clang that needs to be fixed, but we also have to work >> > > around existing releases. >> > > >> > > Fixes: 5287569a790d ("arm64: Implement Shadow Call Stack") >> > > Link: https://bugs.llvm.org/show_bug.cgi?id=46076 >> > > Signed-off-by: Arnd Bergmann >> > >> > I suspect this is similar to the patchable-function-entry issue, and >> > this is an oversight that we'd rather fix toolchain side. >> > >> > Nick, Fangrui, thoughts? >> >> Exactly, Fangrui already has a fix: https://reviews.llvm.org/D80647. >> Thanks Fangrui! > >Ok, great! I had opened the bug first so I could reference it in the >commit changelog, it seems the fix came fast than I managed to >send out the kernel workaround. > >Do we still want the kernel workaround anyway to make it work >with older clang versions, or do we expect to fall back to not >use the integrated assembler for the moment? > > Arnd We can condition it on `CLANG_VERSION >= 100001` (assuming Tom (CCed) is happy (and there is still time) cherrying pick the two commits https://bugs.llvm.org/show_bug.cgi?id=46076 to clang 10.0.1) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel