Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp963676ybm; Wed, 27 May 2020 12:18:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLAnm1Lc9Zi9PW3Bf4ZLqpmCMLiZlmlty6E4nHl65oyOxB8FdIJwKpYyVz8LV5ZcbWIVXA X-Received: by 2002:a05:6402:1d10:: with SMTP id dg16mr4747589edb.309.1590607133096; Wed, 27 May 2020 12:18:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590607133; cv=none; d=google.com; s=arc-20160816; b=u5pOFRSl6eGvvX3XoWYD4BBDb7vXv/Lxk+3Y6g1dtBYT/rAxnyqPVgN9NMZkd4KeBb SC1PzAMfDWA20sj/c7AX06FUGwjEfxLEZHh2AIOta14EsUUalUL7Fqdbe6sds2vht4Ry 3NO8Ldw4JGTTZD19pwKZGM+cLj3qkBl7nPqvaeybjlntYkGEYII3brc0Grmyu8HSOUkk CSbPyNI0euy7OLETkZU9aAGWTg7loJLoqSbbmOPuEmXVcf9XeaUOy/lDPG/IDb94pkxi /pj5OCuh/co4UGhFIBms54Xz0saHEHca3HR6BbEPfoMcVZbafGlhfAiu/Oofm2Dzkg39 BgQA== 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:dkim-signature; bh=tFnj+ie2MtneCS/evX/ZluPtSFLWtigbTQzNUbxK00k=; b=O6Ro7uJBQH5jjt2CbjbeXvCRIBVs3tHlyG2s7SeoM+ey2bzFOxmSczSDJOwCPaoHs2 71dNyM4FlJewDwbV5BBKMHzZdgS3LEfamc22sv7nevTxr0PRDKXcnpsz/YxKxnrA+fi8 KHqW2EbcQ2+XQiIHDIvyfLHabplK6LzJi0Qg+cuFvFxgH2LzSCysRlX39Qm6wQUBtOpR exg2rhBw/z7ce2PKHE1k9ROyfdJLxZWxjWTEi6j4YhtDhDETBpKuaAM348tv5ZbInlwP vt2uncnK7jT3WuD2PchQUIO25zv6s1aDFFllVMk4iBY4XbYF4GxqMdQdqtK5OIyJs6Lb gCQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ky1qqSC8; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du12si2663385ejc.398.2020.05.27.12.18.30; Wed, 27 May 2020 12:18:53 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=Ky1qqSC8; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728033AbgE0R24 (ORCPT + 98 others); Wed, 27 May 2020 13:28:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726487AbgE0R2z (ORCPT ); Wed, 27 May 2020 13:28:55 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67BF5C03E97D for ; Wed, 27 May 2020 10:28:55 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id x18so9250168pll.6 for ; Wed, 27 May 2020 10:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tFnj+ie2MtneCS/evX/ZluPtSFLWtigbTQzNUbxK00k=; b=Ky1qqSC8sGjlOrTziUzHIbiwNaWHHocAD08wV/tv2onL6WH5zm+e02G048rm7MMDep DCc1AI9EcQ+QnrbGR5KrnxLwKNM8tnRw+IQTNxvdCkUTBviaQLLW2m8YmCcFyyI9nmeQ hmG25wC1Z1LTBuydrWYvavtiWigaVh9LjMoYnv302ZSNsc8JVNS/GSVvnG2Gkhl9HvVn Ei2FrQI0A0JTmtost4lPh/OyPKn1TqlObwU9P+xNmIbD2InZ/QwvWwRKFTQWal+8Cc4D CDE4XLn+lSOb4c56lAmoujD3F9OTjDlTqcqB9m9CmYPGCYqomUOjAKXMSfpQVVW6ATY1 iTSw== 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=tFnj+ie2MtneCS/evX/ZluPtSFLWtigbTQzNUbxK00k=; b=FLEz//NqiNHd3WHFgc4sXQyGKgFraudTDrbXaAfapI3cu3Y3yMEpPufLtyG7BTGLCg 00Jng9s+/QwQ2REV3AXoJEymiJcDJE30G8Nhy/yFdDmuEQruArBHlpaW2N+XE8lbilZt YDZsy5ytwBS9aKPzIN96s5D+GKPeqUdDzvA+A0PevV0dkGbKP0s2Bj40IOJ/AFmxrbiA 1TbBf3zuazOce2tSn1I76kgvHAnK/vCAg1H1fhzkhmt+unfuJwl2J7FUAJPKVm/IeOdF r6cJugpglksdjr9hzICIjq1A0FUo6DYjfs7z4G3hTyilEcF/RrMB2pLH+NAAVtS6+jKj Dxrg== X-Gm-Message-State: AOAM531nrxZGCM7t0kN16Q07pD6fukGKP3UBN5dkcHC4qIVkUq307iwD iglUbitVV/Y0FEMzgjQTQ6PjXsD05R3/wswyeDXvOA== X-Received: by 2002:a17:902:82c9:: with SMTP id u9mr6827669plz.179.1590600534489; Wed, 27 May 2020 10:28:54 -0700 (PDT) MIME-Version: 1.0 References: <20200527134016.753354-1-arnd@arndb.de> <20200527152406.GD59947@C02TD0UTHF1T.local> In-Reply-To: <20200527152406.GD59947@C02TD0UTHF1T.local> From: Nick Desaulniers Date: Wed, 27 May 2020 10:28:43 -0700 Message-ID: Subject: Re: [PATCH] arm64: disable -fsanitize=shadow-call-stack for big-endian To: Mark Rutland Cc: Arnd Bergmann , Fangrui Song , Catalin Marinas , Will Deacon , Sami Tolvanen , Kees Cook , clang-built-linux , 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 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! It seems it's easy in the codebase to check the specific ABI, which isn't explicitly LE, rather than use a method that checks the ISA regardless of endianness. -- Thanks, ~Nick Desaulniers