Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp70928pja; Fri, 22 Nov 2019 03:36:26 -0800 (PST) X-Google-Smtp-Source: APXvYqytdMPjPCfF2RdqwhRwnL9PP9XXBvXl8vdYlrafueIqtYd3RJTKbSrG0a+xZrnV1WUYiTdw X-Received: by 2002:a05:6402:78e:: with SMTP id d14mr469119edy.210.1574422586783; Fri, 22 Nov 2019 03:36:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574422586; cv=none; d=google.com; s=arc-20160816; b=WzbACERPhrEzS/1KQ/NMsjT1LIayQUUfTgYRVLma8loIAbmWF07L5p83Bp1z1mYe1I tLTYQdgC/2PKAwgBqjwAFPVt4sU8Aei2logC9EtkWeMwkxxvyilCq5+48sUr1VkAtKc2 NEHkIDwDGAflJgHqhc4qQdL/94m3dus9rPX0pXqOCXLexDGqg3c34Nt0xwj75Tn1iZ3H 72RjNa9TQdc8HE0937nz/K7idO+dLIhzimFawTsi4JrBLUyCJH75vFAi13XcAzCMrsxM MOkJWV5JPBOF73o7YjfrjV3DB4Hs1qjnYWrwYbWk5yT8o+8riFpQMyzEcTgQTHHQMzR7 xk/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=2Ux9B+Wdp/Tv8z9ex4yK/FlfDoAtNnpfK+Vbzta9Fo8=; b=BIwanGwlPSvey7GKH/lquoHnkoSssgb+0Tb6SFt5mF965xm4tYBWOSqNATX8FBjTO9 cvw1es5pE7WpBOGEBvEpiLJLNx2t3MCC+ix6Jf83CY2zByl73+pDrqTD5CEjWW1SKrJ9 N6Ll396s1aceTTTs9yDffBRdxnfzhmq9v1QL9MUnYLBZXh7DiNN5c/DjXyNMZuwnus3+ nHgXNLIC919nk8J00LxrCqnFj9iVhZvrkn/Ieqkv4EX4PrDLRO8QxCDKtr7AG6t0X3oz GGTavBKFn82lGnhh+Q0nEHhXaulOc1IWGl6lrvuYcJaMMLCKblcGCyVEN7vOkNPo7iJ5 fxvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qn24si458228ejb.333.2019.11.22.03.36.02; Fri, 22 Nov 2019 03:36:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727385AbfKVLdB (ORCPT + 99 others); Fri, 22 Nov 2019 06:33:01 -0500 Received: from foss.arm.com ([217.140.110.172]:46102 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726568AbfKVLdB (ORCPT ); Fri, 22 Nov 2019 06:33:01 -0500 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 508F8328; Fri, 22 Nov 2019 03:33:00 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 85CE73F703; Fri, 22 Nov 2019 03:32:59 -0800 (PST) Date: Fri, 22 Nov 2019 11:32:57 +0000 From: Mark Rutland To: Steven Rostedt Cc: Torsten Duwe , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ingo Molnar Subject: Re: KASAN_INLINE && patchable-function-entry Message-ID: <20191122113257.GB15749@lakrids.cambridge.arm.com> References: <20191121183630.GA3668@lakrids.cambridge.arm.com> <20191121142737.69978ef9@oasis.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191121142737.69978ef9@oasis.local.home> User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 21, 2019 at 02:27:37PM -0500, Steven Rostedt wrote: > On Thu, 21 Nov 2019 18:36:32 +0000 > Mark Rutland wrote: > > > As a heads-up to the ftrace folk, I think it's possible to work around > > this specific issue in the kernel by allowing the arch code to filter > > out call sites at init time (probably in ftrace_init_nop()), but I > > haven't put that together yet. > > If you need to make some code invisible to ftrace at init time, it can > be possible by setting the dyn_ftrace rec flag to DISABLED, but this > can be cleared, which we would need a way to keep it from being > cleared, which shouldn't be too hard. > > Is that what you would be looking for? That sounds about right, assuming that would also prevent those from showing up in available_filter_functions, etc. Another option would be to have arm64's ftrace_adjust_addr() detect this case and return NULL, given we don't need to perform any call site initialization for the redundant NOPs. I'm just not sure if we have all the necessary information at that point, though. Thanks, Mark.