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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D2671C433F5 for ; Mon, 11 Apr 2022 17:28:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=u7Pmw7+Z1y2vj5ERcZB3R1qlNuEaq6SnTvUUrKjLgSM=; b=mPhUyQFt1PRFX/ WGygtMRdUc6EjkonJE+F8qVZojxyvx4RLPQDOfKyDP49bu8YzyEdEf0HkKlHOTP9RNd8L14CtK+sb jxnrkw9IkPGFDGVJo9izb2vRIFFnLmp05jZxDVscTFs7NHvkxzwqqlSz7X5Rn0mHZ4mup9446IevB cHq24QTy16nD2EkLhOhpZ4cosqrRTnnxRf4e1jN0yMjicydFoJQJVZ5/c2MJKkSmdVlEtNR/U1pYx Q01lY5E5pVBSkNF8Wsj0H6+ARxnG1LRXM3G4eyjTvaERjSe7ogKj5NmYhjFgTSug2swWVXbeQQrrG E8azTS3aMdfv7Q+GRZKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndxoe-009sb5-LK; Mon, 11 Apr 2022 17:27:04 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndxoa-009sZU-Kv for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2022 17:27:02 +0000 Received: from [192.168.254.32] (unknown [47.189.24.195]) by linux.microsoft.com (Postfix) with ESMTPSA id CD55E205657E; Mon, 11 Apr 2022 10:26:58 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CD55E205657E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1649698019; bh=Mei3s3yDUS+9zxe+0qZt8C43Ggn9lmrQW4qcJGZZlwA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=JMYBm4uzf6bjPUV0Wi4hm+EKCJrhuhaL5dyYD/N6YhK6MOEYtBosuhVNagbXZ+BZM AS70BGPNl1j5OgkYdtvWPte0hjC9ISqXL1i8iM+kg1KgRGurJYzCuhYUZKmLUIKFzF s9i6QyH0SlNLKjUIW3nSLlnaOysfCboCKLHO8FQM= Message-ID: Date: Mon, 11 Apr 2022 12:26:58 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [RFC PATCH v1 0/9] arm64: livepatch: Use DWARF Call Frame Information for frame pointer validation Content-Language: en-US To: Peter Zijlstra , Josh Poimboeuf Cc: mark.rutland@arm.com, broonie@kernel.org, ardb@kernel.org, nobuta.keiya@fujitsu.com, sjitindarsingh@gmail.com, catalin.marinas@arm.com, will@kernel.org, jmorris@namei.org, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, chenzhongjin@huawei.com References: <95691cae4f4504f33d0fc9075541b1e7deefe96f> <20220407202518.19780-1-madvenka@linux.microsoft.com> <20220408002147.pk7clzruj6sawj7z@treble> <20220408114133.GP2731@worktop.programming.kicks-ass.net> From: "Madhavan T. Venkataraman" In-Reply-To: <20220408114133.GP2731@worktop.programming.kicks-ass.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220411_102700_798020_D9475183 X-CRM114-Status: GOOD ( 26.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 4/8/22 06:41, Peter Zijlstra wrote: > > Right; so not having seen the patches due to Madhaven's email being > broken, I can perhaps less appreciated the crazy involved. > Crazy like a fox. > On Thu, Apr 07, 2022 at 05:21:51PM -0700, Josh Poimboeuf wrote: >> 2) >> >> If I understand correctly, objtool is converting parts of DWARF to a new >> format which can then be read by the kernel. In that case, please don't >> call it DWARF as that will cause a lot of confusion. >> >> There are actually several similarities between your new format and ORC, >> which is also an objtool-created DWARF alternative. It would be >> interesting to see if they could be combined somehow. > > What Josh said; please use/extend ORC. > Yes. I am looking into it. > I really don't understand where all this crazy is coming from; why does > objtool need to do something radically weird for ARM64? > > There are existing ARM64 patches for objtool; in fact they have recently > been re-posted: > > https://lkml.kernel.org/r/20220407120141.43801-1-chenzhongjin@huawei.com > > The only tricky bit seems to be the whole jump-table issue. Using DWARF > as input to deal with jump-tables should be possible -- exceedingly > overkill, but possible I suppose. Mandating DWARF sucks though, compile > times are so much worse with DWARVES on :/ > > Once objtool can properly follow/validate ARM64 code, it should be > fairly straight forward to have it generate ORC data just like it does > on x86_64. > My reasons for attempting the DWARF based implementation: - My implementation is largely architecture independent. There are a couple of minor pieces that are architecture-specific, but they are minor in nature. So, if an architecture wanted to support the livepatch feature but did not want to do a heavy weight objtool implementation, then it has an option. There has been some debate about whether static analysis should be mandated for livepatch. My patch series is an attempt to provide an option. - To get an objtool static analysis implementation working for an architecture as reliably as X64 and getting it reviewed and upstreamed can take years. It took years for X64, am I right? I mean, it has been quite a while since the original patch series for arm64 was posted. There have been only one or two minor comments so far. I am sure arm64 linux users would very much want to have livepatch available ASAP to be able to install security fixes without downtime. This is an immediate need. - No software is bug free. So, even if static analysis is implemented for an architecture, it would be good to have another method of verifying the unwind rules generated from the static analysis. DWARF can provide that additional verification. Madhavan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel