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 D6365C433F5 for ; Mon, 29 Nov 2021 17:39:19 +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=vu86Uii6xGwmyZ7/ucT2/jRdd9JvKw48w5BUNMMn5I0=; b=LdD6iLewxqXzuA vNK2+rs0d3fkIWB+v0Rg+KTZrARCVA77Ar8oP6qEF55wLH8qP+4u6UoSXje9Jpc67Qn4j1ZDhX2/t hlp9OXeUPy403pUlwGhde2/+uz0L0ofKnxI3J7GQFnxcl7CiWUZd3uW2ONlCNpwVWceoKBHN1RbzH hswcoHW5hHTwGVvhLfwchfsTSBVfLG6wkOyNmIEzmP8xqCWr44zA5e6Fj5HR7XbjQtt4kxSySp+nx Fq4KIUeUzB/LcdZIoSF7lp2MDaqBhJXNyCpwhd9TUinOr5uEKr2BdFIIwboU/nd6GDWO2rDUySshq 0XYCCPD1p8wWNeGppQtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrkbJ-001bWZ-8l; Mon, 29 Nov 2021 17:38:01 +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 1mrkbF-001bVU-Vq for linux-arm-kernel@lists.infradead.org; Mon, 29 Nov 2021 17:37:59 +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 A14DA1063; Mon, 29 Nov 2021 09:37:55 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.66.56]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C3D213F5A1; Mon, 29 Nov 2021 09:37:54 -0800 (PST) Date: Mon, 29 Nov 2021 17:37:51 +0000 From: Mark Rutland To: Mark Brown Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org Subject: Re: [PATCH] arm64: ftrace: add missing BTIs Message-ID: References: <20211129135709.2274019-1-mark.rutland@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211129_093758_098755_C15C46B7 X-CRM114-Status: GOOD ( 15.22 ) 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 Mon, Nov 29, 2021 at 04:50:39PM +0000, Mark Brown wrote: > On Mon, Nov 29, 2021 at 01:57:09PM +0000, Mark Rutland wrote: > > > When branch target identifiers are in use, code reachable via an > > indirect branch requires a BTI landing pad at the branch target site. > > Reviewed-by: Mark Brown Cheers! > > In future we may wish to consider adding a new SYM_CODE_START_*() > > variant which has an implicit BTI. > > > +#ifdef BTI_C > > + BTI_C > > +#endif > > The ifdefs here feel ugly enough that it might be worth doing that right > now TBH. I'm trying to think of any cases where we might also need a > BTI J but nothing springs to mind right now. Agreed on the ugliness -- I'd like to revisit that with some related cleanup/improvement to our existing SYM_*() macros. I just didn't want to do that as a prerequisite for the fix as it'd make backports painful, e.g. by creating a dependency on commit: 1cbdf60bd1b74e39 ("kasan: arm64: support specialized outlined tag mismatch checks") ... which uses the ifdef pattern above. I'm also not sure what naming/structure we'd like, or whether it's simpler to unconditionally define BTI_C. Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel