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.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 17524C433E0 for ; Fri, 22 Jan 2021 21:45:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DCEDF23ACA for ; Fri, 22 Jan 2021 21:45:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728105AbhAVVpP (ORCPT ); Fri, 22 Jan 2021 16:45:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:60010 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729295AbhAVVoC (ORCPT ); Fri, 22 Jan 2021 16:44:02 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3120423B16; Fri, 22 Jan 2021 21:43:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611351801; bh=4zgFPmNOA6Z8GIxzLMjysWTP/oCdezevQw0xEahBAsA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CXd4x7iEHCVN5ZsizwrnzwJGYVucGmzALp3G+4rLBnPt1ANLZOrnOEjJszqBEYi9z COuY6KOzETtjM1kti6w1hsDxNeNzEjMMBmk1jiMFqh6AgMJiJtMVJa8x+1D2ttxGr3 aV/81atPpL3pMMoAkc65hISs9NJH7JqIL27o+aQ1HlU28sGm8/W08A9DpAOfDeSsY/ lHubXXzgz6Psrz1h/WkbJDMJc0ket6vqVgO1jlf9cssAyWvpDQs7B9UC+8C72A2IBd s5dyqdPotHBN1FIGezYKWrMIF//KGE1CpSyHYWA8+OA9ZmPcICtBtGC4Jgy6SnmfTZ 85V/qw7b5dZRw== Received: by mail-ot1-f51.google.com with SMTP id k8so6559756otr.8; Fri, 22 Jan 2021 13:43:21 -0800 (PST) X-Gm-Message-State: AOAM531/SXB6EYagnQhXgqqX2w9RBa+gLbE/7hsAm/9PTdPsMFiDKQ89 UDiefPdTstur01hyeZvDcQXM7grfcMD3U4QXd3k= X-Google-Smtp-Source: ABdhPJztJ/vx8ZiY499xWS74B0H/9rFD38jvmEZAZhqoA9zqNEi5OcM2eA9ev0koSTU4/tuvfE5IDLuU7GkGyU+SyWs= X-Received: by 2002:a05:6830:1614:: with SMTP id g20mr4782667otr.77.1611351800518; Fri, 22 Jan 2021 13:43:20 -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: From: Ard Biesheuvel Date: Fri, 22 Jan 2021 22:43:09 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 00/17] objtool: add base support for arm64 To: "Madhavan T. Venkataraman" Cc: Mark Brown , Josh Poimboeuf , Mark Rutland , Michal Marek , Julien Thierry , Peter Zijlstra , Catalin Marinas , Masahiro Yamada , Linux Kernel Mailing List , linux-efi , linux-hardening@vger.kernel.org, live-patching@vger.kernel.org, Will Deacon , Linux ARM , Kees Cook Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Jan 2021 at 22:15, Madhavan T. Venkataraman wrote: > > > > On 1/22/21 11:43 AM, 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. > > > > I am a new comer to this discussion and I am learning. Just have some > questions. Pardon me if they are obvious or if they have already been > asked and answered. > > Doesn't Clang already have support for a shadow stack implementation for ARM64? > We could take a look at how Clang does it. > > Will there not be a significant performance hit? May be, some of it can be > mitigated by using a parallel shadow stack rather than a compact one. > > Are there any longjmp style situations in the kernel where the stack is > unwound by several frames? In these cases, the shadow stack must be unwound > accordingly. > Hello Madhavan, Let's discuss the details of shadow call stacks on a separate thread, instead of further hijacking Julien's series. 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=-4.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,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 83355C433DB for ; Fri, 22 Jan 2021 21:44:38 +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 3FDEA23ACA for ; Fri, 22 Jan 2021 21:44:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3FDEA23ACA 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=Fg6dVxRwN9JoWzmL/sVRMLsHVnhoYsvjp0gXNkws0zE=; b=o1rZhMj2W0bLkIVvg/3L+Vr9T QuEQQGtmXqjjIt7ck+TJH4BtaT0MWgoGkpp9IYKaqoNo3TZEzGFIQxlBY8KHIllYLFos90vWSReSX WVY95c1b5E90A1N3UTbDpTafvBc5Aml+K+oQUeDp5x4vW/IoBgZcckw3BwkJp+og5paTOK00VfcIF fTtR5/Q5qtmA8yd/Kt7mKbx8kYgRAASO75ef5O4tRZU5/FgtTNmcWjF2tTaTIhjM+/vvquHm2SQat rbhR/0ZVzqaKZWLUkO+HBQEpELuvZXoX9aCdTPVv9+93Rk8DHeqJFYp9MgonLoJedap5IMSGbszbk o5cC+BOrA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l34DF-0005hT-FN; Fri, 22 Jan 2021 21:43:25 +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 1l34DC-0005gg-2A for linux-arm-kernel@lists.infradead.org; Fri, 22 Jan 2021 21:43:23 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3EB7923B1C for ; Fri, 22 Jan 2021 21:43:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611351801; bh=4zgFPmNOA6Z8GIxzLMjysWTP/oCdezevQw0xEahBAsA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CXd4x7iEHCVN5ZsizwrnzwJGYVucGmzALp3G+4rLBnPt1ANLZOrnOEjJszqBEYi9z COuY6KOzETtjM1kti6w1hsDxNeNzEjMMBmk1jiMFqh6AgMJiJtMVJa8x+1D2ttxGr3 aV/81atPpL3pMMoAkc65hISs9NJH7JqIL27o+aQ1HlU28sGm8/W08A9DpAOfDeSsY/ lHubXXzgz6Psrz1h/WkbJDMJc0ket6vqVgO1jlf9cssAyWvpDQs7B9UC+8C72A2IBd s5dyqdPotHBN1FIGezYKWrMIF//KGE1CpSyHYWA8+OA9ZmPcICtBtGC4Jgy6SnmfTZ 85V/qw7b5dZRw== Received: by mail-ot1-f49.google.com with SMTP id f6so6554049ots.9 for ; Fri, 22 Jan 2021 13:43:21 -0800 (PST) X-Gm-Message-State: AOAM531LL2A9FQPtkRht3l5JbJSiTqLVNn1rCtRv4H+pvsv8896ekxxx +Ks5vqqokA948ylCd8cy1LhfUqS6ehbuJMrf6rY= X-Google-Smtp-Source: ABdhPJztJ/vx8ZiY499xWS74B0H/9rFD38jvmEZAZhqoA9zqNEi5OcM2eA9ev0koSTU4/tuvfE5IDLuU7GkGyU+SyWs= X-Received: by 2002:a05:6830:1614:: with SMTP id g20mr4782667otr.77.1611351800518; Fri, 22 Jan 2021 13:43:20 -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: From: Ard Biesheuvel Date: Fri, 22 Jan 2021 22:43:09 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 00/17] objtool: add base support for arm64 To: "Madhavan T. Venkataraman" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210122_164322_341324_D59A9F3B X-CRM114-Status: GOOD ( 21.94 ) 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 , linux-efi , Michal Marek , Julien Thierry , Peter Zijlstra , Catalin Marinas , Masahiro Yamada , Linux Kernel Mailing List , Mark Brown , 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 22:15, Madhavan T. Venkataraman wrote: > > > > On 1/22/21 11:43 AM, 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. > > > > I am a new comer to this discussion and I am learning. Just have some > questions. Pardon me if they are obvious or if they have already been > asked and answered. > > Doesn't Clang already have support for a shadow stack implementation for ARM64? > We could take a look at how Clang does it. > > Will there not be a significant performance hit? May be, some of it can be > mitigated by using a parallel shadow stack rather than a compact one. > > Are there any longjmp style situations in the kernel where the stack is > unwound by several frames? In these cases, the shadow stack must be unwound > accordingly. > Hello Madhavan, Let's discuss the details of shadow call stacks on a separate thread, instead of further hijacking Julien's series. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel