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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7011C433FE for ; Tue, 18 Oct 2022 15:01:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230235AbiJRPA6 (ORCPT ); Tue, 18 Oct 2022 11:00:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230187AbiJRPAu (ORCPT ); Tue, 18 Oct 2022 11:00:50 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A368B8C29 for ; Tue, 18 Oct 2022 08:00:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=d1DPVHkTn4Pqqx1MLW607HRc8S0dQBAmdHgZ0c3/CNM=; b=P8CW7Cd/plk67zCr9b68PDFgRx +6vsS3zvvmlKhhvfNk84UgxsLHZtuPKsmWbW+5iHI8hJg1fq0WpWjmzvVRqm8BSCmwMrRTlsxJtpI D3wuappA63vya2JCuQTGfQMZvl/zpwwPeGQfpT5wl7xO2qfxgZgCf3Lv5TFyzPAzYaYnj2Fdb2e3W HLf7g9g703YQW/cY0ZvDjUVMDJwd+p0oQhE31dP1eVcZy3ic09FqPQrlRlft6O9FIxLZiqKxe2/gB SwzrKSVMacGyxzkpwpyCWJEGU+6ZZULkwvMbJ+bDlSL6jF827nGZWAD+SVGX2OoydCpD/T3Lk/Rq6 4FkWybKA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oko54-004Vou-8n; Tue, 18 Oct 2022 15:00:34 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 2E866300431; Tue, 18 Oct 2022 17:00:33 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 15930299DA318; Tue, 18 Oct 2022 17:00:33 +0200 (CEST) Date: Tue, 18 Oct 2022 17:00:33 +0200 From: Peter Zijlstra To: Kees Cook Cc: Steven Rostedt , x86@kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , Kees Cook , Sami Tolvanen Subject: Re: [PATCH] ftrace,kcfi: Separate ftrace_stub() and ftrace_stub_graph() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 18, 2022 at 07:28:29AM -0700, Kees Cook wrote: > Thanks for solving this! Just for future archeology, can you include > the splat (I assume you hit a CFI splat) in the commit log, and/or how > you triggered the problem? I usually find it helpful in trying to fix > similar issues later, etc. Unfortunately I didn't save it; it was a while ago (I sorta lost track of this fix for a while since it was stuffed in my fineibt queue). But Mark ran it today to confirm on arm64 and there it looks like (harvested from IRC): [ 3.153082] CFI failure at ftrace_return_to_handler+0xac/0x16c (target: ftrace_stub+0x0/0x14; expected type: 0x0a5d5347) I think simply enabling the ftrace boot time tests is enough to trigger this.