Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1049383ybm; Wed, 27 May 2020 14:55:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV6w/yTbUjiMDnznPPFKdrNQvyjLaAqB1R3bL8ZsBoOhI/3R1eWf2LG4fYgQ+7wZUmHg/6 X-Received: by 2002:a17:907:4066:: with SMTP id nl6mr332988ejb.129.1590616414178; Wed, 27 May 2020 14:53:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590616414; cv=none; d=google.com; s=arc-20160816; b=l43Icrs2KLWLXh6jUK4at3JkcJohDOuPD4PYW+yt/JhoK623qdH0ECvMNaWZoF2uq8 iAP/Z7Cmp1cN2Tezp3A3OGLC8c5iEsC8wy49OYGk0bkNCpg/80tkC+YztLB6vTFwPDF4 eOMjfdn9LCBsdr3DkN/FjPe2fSiDwrsnmiwULaoKSoqCUqIPnq+jDQed4NHA9NZEskvZ Hmg5ZRHVN6CAh4GObcYGcgdcJYiLprVbuX36r1GzSQqtmlT4A8M6kZgcprwKQ/oGek1W psZTXBVFm4GG51YdpXKiZ5dLm8ipgXfpkpXVXg2QARbxvtA7Mnm3gZPzRgoS3Y90CIR+ RPBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=Ul/IRuhqnS4yNj2874KNgstOdXPZeIcYF8xozicibeA=; b=kch6He9Iw2vzxxFIjdIbza1XUr58YvHsUA78tch9424Q+CNJ5pxxWwvxFoPlDbzejo ewSMRSXoGSPGwoUbEFhpkq8azrEhb7XNoIvQc+g4gci4hz47DwxgbdDVNO4C0oxOsP8f U46UynRp6mjCtDJrwj7hO0F4zb7N6hztf/SFRuttrFXocCJDmtb6ACded63XvDUXq9TY Z5SxZovUEaeYVHgUHzvQP8iAWi3U2ZIiHV0Wy1Si5cGFWbQ9elD9s7Ho8yvTdHxciz3/ ugtH3MUfMYiCbwXSlVi86Sb3ocK6b2h24WWuxmVhoCvwKUy0m1GnZH49KkEPYr6tpJrg +kSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z24si2713322ejf.584.2020.05.27.14.53.11; Wed, 27 May 2020 14:53:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728215AbgE0SwQ (ORCPT + 99 others); Wed, 27 May 2020 14:52:16 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:44705 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727950AbgE0SwO (ORCPT ); Wed, 27 May 2020 14:52:14 -0400 Received: from mail-qt1-f172.google.com ([209.85.160.172]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPSA (Nemesis) id 1MybX9-1ioW4D3EiL-00z0ao for ; Wed, 27 May 2020 20:28:24 +0200 Received: by mail-qt1-f172.google.com with SMTP id a23so20059216qto.1 for ; Wed, 27 May 2020 11:28:24 -0700 (PDT) X-Gm-Message-State: AOAM532ElrXGMnOvToqFtg9QDFRhp2IH/Aw90UwD4neOfiZUnVOUunr/ kqKPP4ucMvjN+dP/ZcvUxfcw5WS8c1Zj2PPw5yY= X-Received: by 2002:ac8:1844:: with SMTP id n4mr5557996qtk.142.1590604103622; Wed, 27 May 2020 11:28:23 -0700 (PDT) MIME-Version: 1.0 References: <20200527134016.753354-1-arnd@arndb.de> <20200527152406.GD59947@C02TD0UTHF1T.local> In-Reply-To: From: Arnd Bergmann Date: Wed, 27 May 2020 20:28:07 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] arm64: disable -fsanitize=shadow-call-stack for big-endian To: Nick Desaulniers Cc: Mark Rutland , Fangrui Song , Catalin Marinas , Will Deacon , Sami Tolvanen , Kees Cook , clang-built-linux , Linux ARM , LKML Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:AAs3BLls+YSdR1xFKiw97CMcig+gAVZJsoMLAefqQ52Ob22UL43 eaCJPpfSOF5SgItYD9FnjFxFAFSl1z8E9cd1dEycQpOp9sg3q5RzJkkAxc4Ba+OqM35074d ri6aRCYL6QuOAn/k/OiD+oiXYiKX/X2rblFDd3kVLokcoT+OKb8B7nw7fpCo4gGHYHI5pB4 1mDlOW9JpWe2RhY6mrDPQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:UIrWExRtcrs=:YjImiCCLj5aKp9nTRIA67t gHFr2K0bfKkUKvieZpHMM55dGkl4spbMf4FqzIgp5kyh/CPwbUUXla0ppGBPoPZ0VUiQsZrOG /FDM4fHS81ySOsMXDZYo8UEdHKMKAcrR0yQFOizCf59ycplXnCbcp5xgV7xUMjMm0hsPhRlLI B7ReEn30Q7+1J13bKCHXikqZFUPUyvBODVecRBl3bmSwAZMz7BewjuORC8/jQcN4BaqAQLi7U xVMlHDVzG2hIFVGoi1/VgBUhU7lpIKFv23RerAakJUYFVUbvlCYzquSdnJt1+l900gwgRqg/E 4YxbvBxwacEMODIvMc94fl9KsoBo9Aiw93wuPotIckaTVPX1XeTgrQXh7QGqzlNLMMvveBLBi Dew3JJsYKPjt9cQ1tr/2L7evFCcpuJvZPjuP6zNaGwt+qSuguDqIoBPifG4XIk/Uv29fDbHYj 4I1Q1ZyZqa+q1o1HiupJSjmIKy+3SQ2etd9zSsQU9BZaO+0NMZx+MiKNxtkPumObRapeg2yKL XS1u30n6kLgizzCdE5bCCNNiHa0bErKYcvLW7OiqL9dshw/AmpmLjsUKnIv8OJuO3Y9wP44bp kAhKp0aK2VdJRKWTsqQe94gfnaFes6mxgj/0UE6MeU2NVUop/O0M5dG3aAYKX0GWClN16MwVn beSKfj35pYqI8UQW6XCujhJ/yAaAIdAzaDn1VD6w5PLxZ6+cqX0I1POf20wDaNbWpRPeyy0Om RfbbXFE27cUxoL3s/1YDR30PgoJrAAxXYtx/Ua/0VKjI1WqZLgC6Yu6zIkNEwHVHayMHcFzkn wU8q1hMvMtjZNsEOkNpzar+uYLsLirexG2MQtV4W9bKbRSLuYM= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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