Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7494132rwl; Tue, 10 Jan 2023 01:18:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXtJBPJVj3rnRQodrB4cz4qt2KFgPPEzFt0jE5IdcdBQnHMH0TH8AjaEyzSGn4a1ePaOmcz9 X-Received: by 2002:a17:906:bfe3:b0:85a:2ba:d53a with SMTP id vr3-20020a170906bfe300b0085a02bad53amr279110ejb.9.1673342281678; Tue, 10 Jan 2023 01:18:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673342281; cv=none; d=google.com; s=arc-20160816; b=yiea9PUhO6yoFHd1YIb40g9adMQScZnGFl7h44kpqnl/uPDfSSBXoyyMTCUanCNcLv Z6fmQH/Vf4tEYoYEf52Fte3BoNAkJIZZFl3eFayS0kJtlSYrwbUWZX+jM5FFypHf9OVG Xnmf5GnkP2wjM2rVfzlX46yPhdiDfDysMy5OHO9LiftNsqFyz4GnZE0RE1+EMwLy5Ams U2L42RmLsEtG0XxR6BK02SdUivW9au0FOuHJ/JOCDNLv7hElGAI5xTaBsRXFpe9q5l0w fN//Khh/JereW4Jdmqaz2gq4kYB3ipd2Zn/vXFr4mqmEAYe65l/IWJskNwiARRMRnJBJ LtGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=DyxJuo9aY2iE2sw7POz5ymM0L7j5bgg2/yYrc4wphUY=; b=t1W1wVY7zVD7WyV064xlPCfD3zenWmk0I4GQPO7NKkoYZIkG53WRQ1ISYdvvonbyvc zxmWnkOIYb4vMjK3Ixs7ITQnNkIw2Rg1AvU7qQneCibVzTSgrSMBTRAbW+wAzowBOJtW eKurkSNJSeuWSnMJX3Eb7RsOBUy+cF2mfcTcXz+eHLvXBZ7X5+oimAhXK9uWcsK0BylH zgcLGCmxxkhljKSyWuYeIjeVd2t4mIhkGEPpa/uSnitVnR3S0a/SeK5iAe/+mNGP/HI9 AeoXRc41AohN2rAvKfrtdaC2jd3URs/v237PNdE6ZMUffjIzZTwVuNu5ACoY3ZuMLqMO 7iPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020a50eb0d000000b0047338d1bfcfsi11181955edp.166.2023.01.10.01.17.48; Tue, 10 Jan 2023 01:18:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231682AbjAJI75 convert rfc822-to-8bit (ORCPT + 55 others); Tue, 10 Jan 2023 03:59:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238322AbjAJI7E (ORCPT ); Tue, 10 Jan 2023 03:59:04 -0500 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B73EA5F7C for ; Tue, 10 Jan 2023 00:56:02 -0800 (PST) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-170-YekVvk-BPaSzqybZP3NNRQ-1; Tue, 10 Jan 2023 08:55:59 +0000 X-MC-Unique: YekVvk-BPaSzqybZP3NNRQ-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 10 Jan 2023 08:55:58 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.044; Tue, 10 Jan 2023 08:55:58 +0000 From: David Laight To: 'Mark Rutland' , "linux-arm-kernel@lists.infradead.org" CC: "catalin.marinas@arm.com" , "lenb@kernel.org" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "mhiramat@kernel.org" , "ndesaulniers@google.com" , "ojeda@kernel.org" , "peterz@infradead.org" , "rafael.j.wysocki@intel.com" , "revest@chromium.org" , "robert.moore@intel.com" , "rostedt@goodmis.org" , "will@kernel.org" Subject: RE: [PATCH 0/8] arm64/ftrace: Add support for DYNAMIC_FTRACE_WITH_CALL_OPS Thread-Topic: [PATCH 0/8] arm64/ftrace: Add support for DYNAMIC_FTRACE_WITH_CALL_OPS Thread-Index: AQHZJDKgXMrizOIIlkyvOnatOuVuDa6XWT2g Date: Tue, 10 Jan 2023 08:55:58 +0000 Message-ID: <34e0144b19e149d99719a5ffc834f228@AcuMS.aculab.com> References: <20230109135828.879136-1-mark.rutland@arm.com> In-Reply-To: <20230109135828.879136-1-mark.rutland@arm.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mark Rutland > Sent: 09 January 2023 13:58 > > This series adds a new DYNAMIC_FTRACE_WITH_CALL_OPS mechanism, and > enables support for this on arm64. This significantly reduces the > overhead of tracing when a callsite/tracee has a single associated > tracer, avoids a number of issues that make it undesireably and > infeasible to use dynamically-allocated trampolines (e.g. branch range > limitations), and makes it possible to implement support for > DYNAMIC_FTRACE_WITH_DIRECT_CALLS in future. > > The main idea is to give each ftrace callsite an associated pointer to > an ftrace_ops. The architecture's ftrace_caller trampoline can recover > the ops pointer and invoke ops->func from this without needing to use > ftrace_ops_list_func, which has to iterate through all registered ops. > > To do this, we use -fpatchable-function-entry=M,N, there N NOPs are > placed before the function entry point... Doesn't this bump the minimum gcc version up to something like 9.0 ? How does it interact with the 'CFI stuff' that also uses the same area? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)