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=-9.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,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 2713DC433E0 for ; Fri, 22 Jan 2021 17:56:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 C04FC23A7D for ; Fri, 22 Jan 2021 17:56:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C04FC23A7D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.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=h6bCWsxM4PXfYpw24onrFP+16C+Eix+GUcJkStO2ERk=; b=NRIrqP9Zcve0jyCEyyYf+x5Kn Vg6CSft39lOSgDFF3Al3TNXjzP5dY+bAFqF77KV8bFCyaCGD/ThgYHATx6iKA2IY6KgkBvFAWv0PI QWK55hw0ARuXZyb40wF2rAVYMEcIeQywbojUg4lsPTivWJzouj8ajsusrl5GxALFawQGU1lmmMvKE IKdM5gzFggE+tv/7wXCEpb9fYxe5bAfTifqpVdFooFP7kQqamjOGzFaJ3OY7r1CEZYfA+2dYCKPeH ieGVcQhqljjncB7Daj6tiUNFTOkahE9DrqfUciEsmv6Cqu1No+M8B2jyZRmjgPfDVJkyYER7enqs8 jLdAD5aVg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l30eB-0006v6-OK; Fri, 22 Jan 2021 17:54:59 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l30e9-0006uO-6W for linux-arm-kernel@lists.infradead.org; Fri, 22 Jan 2021 17:54:58 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0ECE323AFC for ; Fri, 22 Jan 2021 17:54:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611338096; bh=AYFiX4zVoFw1zc21BTNTrpcrcdxIXokJIpPNH+bgg4o=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=M/RdoYta0yYvxyxrVm1MwF9jMowYeci9nw51o8xr81Rrjxay9o6aIN0uHyLNYLz23 jqVK5Evzma3qJfNbOgcyeEqy3QqtoqYYOl9GXHIc/IkjzjRhOZpljDFyAcV24iAJq5 o8wT+0ox1CBYBIFCBppwxMBmQgNoLdzN28/VcW5lBj7pyNbCaKeN0B2kvFGGuxdim1 OQiNbQVwuLvpEP37uUJFjsXM0U/ZGtjvEwVRGsHoYeFJe03N4tQbb1kh3Rd+uo0OTD M5fQ+embtPzr1N7lS4XBBkAsM1fcBJ/5SYH77ZFIo/HArEQSlVq3yBgZc/6u12BBxl Ft29gIcXrW0Fg== Received: by mail-ot1-f46.google.com with SMTP id v21so5902192otj.3 for ; Fri, 22 Jan 2021 09:54:56 -0800 (PST) X-Gm-Message-State: AOAM532LYeq6R1uxktZxTUlEnuXBh2bpKpLiPiNjgryqUS8BWST+TIYV npefoDFIYN4fbIzN4XO9czTT3cAcTL5RAa16e7c= X-Google-Smtp-Source: ABdhPJx0hc/N3OuLdXaocPstvcNOS7WFFfWzpNbqXVjBFk/Ywwb2F+cfkQeYh8iEnYVpre/A5EJl/hugMJ1hMmEibHA= X-Received: by 2002:a05:6830:1158:: with SMTP id x24mr4118875otq.108.1611338095288; Fri, 22 Jan 2021 09:54:55 -0800 (PST) MIME-Version: 1.0 References: <20210120173800.1660730-1-jthierry@redhat.com> <186bb660-6e70-6bbf-4e96-1894799c79ce@redhat.com> <20210121185452.fxoz4ehqfv75bdzq@treble> <20210122174342.GG6391@sirena.org.uk> In-Reply-To: <20210122174342.GG6391@sirena.org.uk> From: Ard Biesheuvel Date: Fri, 22 Jan 2021 18:54:44 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 00/17] objtool: add base support for arm64 To: Mark Brown X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210122_125457_334922_68F710EF X-CRM114-Status: GOOD ( 17.02 ) 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 , Michal Marek , Julien Thierry , Peter Zijlstra , Catalin Marinas , Masahiro Yamada , Linux Kernel Mailing List , linux-efi , linux-hardening@vger.kernel.org, Josh Poimboeuf , live-patching@vger.kernel.org, Will Deacon , Linux ARM , Kees Cook Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 22 Jan 2021 at 18:44, Mark Brown wrote: > > On Thu, Jan 21, 2021 at 12:54:52PM -0600, Josh Poimboeuf wrote: > > > 2) The shadow stack idea sounds promising -- how hard would it be to > > make a prototype reliable unwinder? > > In theory it doesn't look too hard and I can't see a particular reason > not to try doing this - there's going to be edge cases but hopefully for > reliable stack trace they're all in areas where we would be happy to > just decide the stack isn't reliable anyway, things like nesting which > allocates separate shadow stacks for each nested level for example. > I'll take a look. This reminds me - a while ago, I had a stab at writing a rudimentary GCC plugin that pushes/pops return addresses to a shadow call stack pointed to by x18 [0] I am by no means suggesting that we should rely on a GCC plugin for this, only that it does seem rather straight-forward for the compiler to manage a stack with return addresses like that (although the devil is probably in the details, as usual) [0] https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=arm64-scs-gcc _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel