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 C946CC433EF for ; Thu, 5 May 2022 10:58:09 +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:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=V2lp7/otAl3Muov3BFM9VOPX+wFW1b578PEGK7VHYuw=; b=y9vzY2NdDQcvpo 4bh3NRB7SuImzmQFM74ZHdl/gLMLqWU2UeOHwCElblTO7drnWiR0EiGzAKs12HUaoNdOm9XGhzLwC UDZuBWadLQJZfWQLzLocu4V6+SHAx5TpKEv45y+N1kYl76MErH6dPbZ8C76nJqySLV34sS/WFJI4D g0p5ylxBdb4tP2GD6HGpBpE+gnzJAQ9Qe6izSjQvGfdv7lPl5XOHviIFC77aRcT5BfEtApAuXzQkz NBpYSm34Gnz+Dmaoj3kNJG+5hBoKyZ7QCWvJyzdLNaENn/K5Lfo1A2UcXPFZX31pR1MM86r88/BxP 3/Eb33XTqdN9pqgYOarQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmZAJ-00FLwS-BF; Thu, 05 May 2022 10:56:59 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmZAF-00FLuP-Ma for linux-arm-kernel@lists.infradead.org; Thu, 05 May 2022 10:56:57 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5544A106F; Thu, 5 May 2022 03:56:54 -0700 (PDT) Received: from FVFF77S0Q05N.cambridge.arm.com (FVFF77S0Q05N.cambridge.arm.com [10.1.29.132]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1F9233FA27; Thu, 5 May 2022 03:56:52 -0700 (PDT) Date: Thu, 5 May 2022 11:56:45 +0100 From: Mark Rutland To: Peter Zijlstra Cc: Chen Zhongjin , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, jthierry@redhat.com, catalin.marinas@arm.com, will@kernel.org, masahiroy@kernel.org, jpoimboe@redhat.com, ycote@redhat.com, herbert@gondor.apana.org.au, davem@davemloft.net, ardb@kernel.org, maz@kernel.org, tglx@linutronix.de, luc.vanoostenryck@gmail.com Subject: Re: [RFC PATCH v4 22/37] arm64: kernel: Skip validation of kuser32.o Message-ID: References: <20220429094355.122389-1-chenzhongjin@huawei.com> <20220429094355.122389-23-chenzhongjin@huawei.com> <20220505092448.GE2501@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220505092448.GE2501@worktop.programming.kicks-ass.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220505_035655_821753_192EDA62 X-CRM114-Status: GOOD ( 20.97 ) 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 Thu, May 05, 2022 at 11:24:48AM +0200, Peter Zijlstra wrote: > On Thu, May 05, 2022 at 11:36:12AM +0800, Chen Zhongjin wrote: > > Hi Peter, > > > > IIRC now the blacklist mechanisms all run on check stage, which after > > decoding, but the problem of kuser32.S happens in decoding stage. Other > > than that the assembly symbols in kuser32 is STT_NOTYPE and > > STACK_FRAME_NON_STANDARD will throw an error for this. > > > > OBJECT_FILES_NON_STANDARD works for the single file but as you said > > after LTO it's invalid. However STACK_FRAME_NON_STANDARD doesn't work > > for kuser32 case at all. > > > > Now my strategy for undecodable instructions is: show an error message > > and mark insn->ignore = true, but do not stop anything so decoding work > > can going on. > > > > To totally solve this my idea is that applying blacklist before decode. > > However for this part objtool doesn't have any insn or func info, so we > > should add a new blacklist just for this case... > > OK, so Mark explained that this is 32bit userspace (VDSO) code. > > And as such there's really no point in running objtool on it. Does all > that live in it's own section? Should it? It's placed in .rodata by a linker script: * The 32-bit vdso + kuser code is placed in .rodata, between the `vdso32_start` and `vdso32_end` symbols, as raw bytes (via .incbin). See arch/arm64/kernel/vdso32-wrap.S. * The 64-bit vdso code is placed in .rodata, between the `vdso_start` and `vdso32` symbols, as raw bytes (via .incbin). See arch/arm64/kernel/vdso-wrap.S. The objects under arch/arm64/kernel/{vdso,vdso32}/ are all userspace objects, and from userspace's PoV the existing secrtions within those objects are correct, so I don't think those should change. How does x86 deal with its vdso objects? Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel