Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1359118pxb; Fri, 22 Jan 2021 13:45:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUBaxzjLeTUC+ApRTMSoDmaSVTVconEEdGDAqQcH8qOdEA4SFo+W4jdaPJrmTrE8wBvt2H X-Received: by 2002:aa7:d3c5:: with SMTP id o5mr886328edr.122.1611351959657; Fri, 22 Jan 2021 13:45:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611351959; cv=none; d=google.com; s=arc-20160816; b=V9U0odxiyUyfmfK1JgaY6vvBvxbB+fbP2AajdB4A0J4vgBW3iPRyo/waNEktdeyxAL RkmwZnBTP1nmstDlKEHUnqCiyMCvcOW/ghMkx9TPLdNDSJJ8Hhumb1DIIbCsdXioACDI 5Oj4ARMIqez2vCGqiDqULU80sSX5TzeY7AXAurdLUJakMW+YnASRIJr3uECPryr+Fvb1 lKfg1H+lfW/bpqY5cHwdR51ZKCyQpgosVLhkwqtSVkvQvqKpZYwMJ9T1flHSOF244rWU 6P0uy6HzUGy61ipWhMDpmM5gAf++59HFvJrhl9JQadpKT+ISCQw7EnBJAKap3gs/7+9j tYYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=PCtfekf5naUsN+Q5ZxvcSxpIezgCMAGzvtMuIP+n3eY=; b=WYEPsFl6XWq91P5gh5boKJ8A0xyn4ZiC3Sxk/4t5bdqS/NIsIsT/AP29ogdMKbjbo7 HC/rQ05B+kpvrHyLDJsfMxoZ6+OSpQVyhvP2kQbUSPsbYPkY7WSNlZO+PYt+QVJ64jjz xsfJyFEPothOt/y0ighhffKbpSqQqgdpRZzrB++6m6/Staaf/Z4RQOUDXOD5Z4zvq6d+ O7ysQQi0NxKobR4kS3vXMfXDFlM52VaQCbt9rzMRANq1/jcC6uAuwuOlc6QkEZxze9Td +m/z8VoINIBBjDs/LGkQq1lhBgUyXmscImOd9NJ75dM4GO1PDEM/+WBg63qXNoTHS3Id rktA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CXd4x7iE; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 20si4325783edw.131.2021.01.22.13.45.35; Fri, 22 Jan 2021 13:45:59 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=CXd4x7iE; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729468AbhAVVox (ORCPT + 99 others); Fri, 22 Jan 2021 16:44:53 -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-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.