Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1346581pxb; Fri, 22 Jan 2021 13:22:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFqESz+M8IYFydTsvxPrHC0ExeMyqFwEwKEJaUb9HPCqO1OmwnyIRRxGsoGm9bw2XlWDp3 X-Received: by 2002:a17:906:3ac8:: with SMTP id z8mr4211299ejd.273.1611350520837; Fri, 22 Jan 2021 13:22:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611350520; cv=none; d=google.com; s=arc-20160816; b=FyOrw3qufJYdmy++/DyK8D7fPHSe0GTZZQ0V1uzvb6eZPPL3/aMMCCwghGnKKQBxe4 NVgMiV2L2LTeAFeiQGIFkqOwy8Dw8OzIG3MqaQ8JXDFm5NIeyWuV3rnovDmJggDWQqkd V6i9z3dmw8mh9Va5NmH3Yr/mCLX8PYpz7iIpwDRoj48kBZ8sHUO2mWN3q4vLGYcc0Fur oRXHZOzin5AM9WMKgeUjEnNgb4xxEXNvTQ7qr4/eEQZoL1uW8zzhb3LiCzCRrRrDu5cz Qo4023A0jJyQcFpx1M6ASfcMcIk3CAj6xErBijLPOC4KAIG61doVBo48CMWdbjsR5fWu sjTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-filter; bh=LmVa0B7QKVLtgYQ+R0kakMd+3Q+60r35qr0JwnFm7VU=; b=l+SEC2tR41yEUadJ9YUIdtMbLWZ1mPhyWdJkNw1utYJJndGtQXwfI7OQeswprfC4nY wmqIiYfbkSfo4e/Tayo/wmU62ixYvLe5ufjiZaBtr2L0J8zMxMZF8ONkelQjQ46kbYlv HzcTTCzdywztpoIZe0vdmS5VTOJnJLVmVc2kWxxPoQnTPd34yIvKKs+1c8lgx834x++6 ORvoMVpj3e58gbDjxj7LMWvykWJgB/zG7m+an7hkJGLU3um47u9o7mL+oNBAxmfna3q1 DVx3CVZH/BrTNVsKe7LvxZPBTeVTy6hMbe/pRRhY93RWNX858oAwVDfhUwMAOefcdIIh kI6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=jkkEH3MP; 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=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s9si3347880ejc.752.2021.01.22.13.21.36; Fri, 22 Jan 2021 13:22:00 -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=@linux.microsoft.com header.s=default header.b=jkkEH3MP; 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=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729792AbhAVVUP (ORCPT + 99 others); Fri, 22 Jan 2021 16:20:15 -0500 Received: from linux.microsoft.com ([13.77.154.182]:39976 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730013AbhAVVQG (ORCPT ); Fri, 22 Jan 2021 16:16:06 -0500 Received: from [192.168.254.32] (unknown [47.187.219.45]) by linux.microsoft.com (Postfix) with ESMTPSA id 521CE20B7192; Fri, 22 Jan 2021 13:15:13 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 521CE20B7192 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1611350114; bh=LmVa0B7QKVLtgYQ+R0kakMd+3Q+60r35qr0JwnFm7VU=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=jkkEH3MPRrsvDvseero3sthB72ZWEg+KC707Ywto3Jy/Ep77Tj+qFhv1okjYDd/VE /Dx5oxMI4B/ZDYDhnywVkyDim4CKfsMrBcvwer389JXBAyaa0r9CpdSjUIZvG+IbEQ t5ca9vl/Myy4u6O+zq2+QpBXLlGr0Lom72t4ht7A= Subject: Re: [RFC PATCH 00/17] objtool: add base support for arm64 To: Mark Brown , Josh Poimboeuf Cc: 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 , Ard Biesheuvel , Linux ARM , Kees Cook References: <20210120173800.1660730-1-jthierry@redhat.com> <186bb660-6e70-6bbf-4e96-1894799c79ce@redhat.com> <20210121185452.fxoz4ehqfv75bdzq@treble> <20210122174342.GG6391@sirena.org.uk> From: "Madhavan T. Venkataraman" Message-ID: Date: Fri, 22 Jan 2021 15:15:12 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210122174342.GG6391@sirena.org.uk> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Madhavan > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >