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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 E6FE4CA9EB7 for ; Mon, 21 Oct 2019 06:15:34 +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 BAFD82089C for ; Mon, 21 Oct 2019 06:15:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nxds2g9j"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="NLXY6TdH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BAFD82089C 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=2GtBWxgDVhVCDavan2NqgPtGlw4Src0dTtAL238XaRs=; b=nxds2g9jwkh+Vr xYMOxJaquQp3lNWDtrUhscgKkTUZxNACdT19LCUfdcxv6fF0e0zTWDDdBjrvjHmix574j+BqOgDpR J74QAfVBvUsYUQAxhj0Chgk2GnowyF2xaLVCHvkJz381wZI9H0+ju7F3qMLkEv0akjUBYb8iIVAmM /teVaPRX2eiOW2j75LQlTCZN2eCYgR8DxR0SSBIgo8qZZPBqSEBh4mjFBlHUOG0M4KzmVJk2JTMwe cIskPtDv7fLf1ugw2JrBC7ZoZNYVv9xn+8QUzDpiKM+fb4Mzn8eShyqieG0b+lJnYrf8dumJaHd8V Ji+orTlg3Dq6J0VvLuzg==; 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 1iMQyc-0000Yu-AA; Mon, 21 Oct 2019 06:15:34 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iMQyZ-0000YY-8f for linux-arm-kernel@lists.infradead.org; Mon, 21 Oct 2019 06:15:32 +0000 Received: by mail-wm1-x344.google.com with SMTP id c22so2307362wmd.1 for ; Sun, 20 Oct 2019 23:15:30 -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=wyeF1rMaUaHqm01fq+szlG0Q/Q/37dlLkcs/fhKj+JU=; b=NLXY6TdHG8Tz04qn7XKMcvdLN/OzoqTYvrB+JSqGhbSGr3rCzaBbRYQdR4no1EY5NL Nh9rCiOB9Og08f19wRWClJFDu0/sS1HKtgYeD23z9WavaGd4NE1QQCGW8pgaYugjj5k8 2ETtuu2xsV6k3V2UW5rEbo/g5/Ro5F6Dfiu6pP5pMD+QaVJORHRrHwe8sIvzyRQ7nyDP jeq1vxJ7pypdSO3Ec2jWIw0zBRJyOT5DrUa7sOW2tzW0AmKLRJNb5sdKiVl76Mfb6VFf 1fntrhgs76bfmwfvZZGpT+tBafmH1AcMK2MVAeBXgJj+RUvSklAClZI5m15AK4a0NKmO Z0bg== 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=wyeF1rMaUaHqm01fq+szlG0Q/Q/37dlLkcs/fhKj+JU=; b=AtlhIkCoZdMlw8KnYBRYZEbJJMI/Cy1MF52crc6GGUatC9a1Vglt8H8q81y02Cvi2l z3K6Ozbm47qoKy6si8lAaJE6r87+uzna0blEjsOlNY+ae+h1t0JDdjcX5zlAv7WPV3sn a+qK7oye80byaE3XRAqAor183FUqX4rW7mIvqE3HeJGh22gpjcZL5IjO+5ZhZ4qSCpXi smBPhGtVCjWlZ2U5NjNzpdc9sJV/MhSUrJfHbKGKH/qJwKRIKiBJ+ta7lh22yCYDUn15 VvL6BxMF7aM3h0oNRTaeTfbwqeWEgnTOQewkEVrO/yWsRd4uzDdj8Fd64KCFDzUb4Nmd aP3A== X-Gm-Message-State: APjAAAXVZfHCFzyaK8vnFjlkEiBeIqAWdQMz0osoMjC3IqHJix+8X95T oJ1e0L+1xF0QcKzV08XiPSz8gC095+i+tUfTQtr7tA== X-Google-Smtp-Source: APXvYqwy6S1XLT1tP+FIkDZSJy0h8vZRZeJmoRt5dOcKFryQnLOFQp/4bIpH+FqX5564F137wX49Gmx6/y/bSuaFgAQ= X-Received: by 2002:a7b:c925:: with SMTP id h5mr1828158wml.61.1571638529717; Sun, 20 Oct 2019 23:15:29 -0700 (PDT) MIME-Version: 1.0 References: <20191018161033.261971-1-samitolvanen@google.com> <20191018161033.261971-10-samitolvanen@google.com> In-Reply-To: <20191018161033.261971-10-samitolvanen@google.com> From: Ard Biesheuvel Date: Mon, 21 Oct 2019 08:15:18 +0200 Message-ID: Subject: Re: [PATCH 09/18] trace: disable function graph tracing with SCS To: Sami Tolvanen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191020_231531_308553_666132E7 X-CRM114-Status: GOOD ( 18.47 ) 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 , Linux Kernel Mailing List , Steven Rostedt , clang-built-linux , Laura Abbott , Will Deacon , Dave Martin , linux-arm-kernel 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 Archived-At: List-Archive: On Fri, 18 Oct 2019 at 18:11, Sami Tolvanen wrote: > > With CONFIG_FUNCTION_GRAPH_TRACER, function return addresses are > modified in ftrace_graph_caller and prepare_ftrace_return to redirect > control flow to ftrace_return_to_handler. This is incompatible with > return address protection. > > Signed-off-by: Sami Tolvanen How difficult would it be to update the return address on the shadow call stack along with the normal one? Not having to disable infrastructure that is widely used by the distros would make this a lot more palatable in the general case (even if it is Clang only at the moment) > --- > kernel/trace/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig > index e08527f50d2a..b7e5e3bfa0f4 100644 > --- a/kernel/trace/Kconfig > +++ b/kernel/trace/Kconfig > @@ -161,6 +161,7 @@ config FUNCTION_GRAPH_TRACER > depends on HAVE_FUNCTION_GRAPH_TRACER > depends on FUNCTION_TRACER > depends on !X86_32 || !CC_OPTIMIZE_FOR_SIZE > + depends on ROP_PROTECTION_NONE > default y > help > Enable the kernel to trace a function at both its return > -- > 2.23.0.866.gb869b98d4c-goog > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel