Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp74983imm; Mon, 4 Jun 2018 13:17:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKCU/ZGCErBb9S3kjC4F7P0Fl+YRCDp70OVp+JW85y0KEXlBcRnfGIU3Cl1+UlwCKCg9ykw X-Received: by 2002:a65:520c:: with SMTP id o12-v6mr10643310pgp.15.1528143421663; Mon, 04 Jun 2018 13:17:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528143421; cv=none; d=google.com; s=arc-20160816; b=Ti/oYydYIQQTisp8PqKZXDm/YkaDqyI1Pd/KxYuS/F5n3EvkGks1Uub3ea/UvcWjdu pws62+Aiog3DCZifCuyHNGcm3yjpeWtPsDh/0+fsA8aE2bzDdMRzTQG7j7OzXm+JQYDS tHWL4W2vKukHSsbyZseBavWoa377WRm6UXhNPabrpBNgmVNFd6RkNiJ7zLcLur6vMIUN yA+FRFDa1QuwU1aZ5M6wquEh5J9BJVlg7Gk8Ko1ce/Zkf5crSO76vkv7whBJC0K9cuAz s2cYC9M9Pk1IDxSZeIvbzC5KMLMjjBy8kFw9jRfyK8zHZ5SA1jCMmlxeHl2+ajV6KKmY TnMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=U8ctzvpr1kwrWKJftPYxGSrY/qyEV/ysHsL1MsSHZqc=; b=z482S/GhQaJhOwDaWrpvhTVPHAY+QwTv6Omjriy0TNrXHSV87sQGt0uvoIzYyK6HVe zQMwGapw9Azq9iYPutBA25sA/lcYiYnN6WeRtLLS0Lw9pfCYXL3BwQPZCnsyR2RcTZeu TuiSI0Qdt9k2CSoo6g2l4d0DYUm1AC+7btDhRn2i2wXApYVrUCHJ4pWsb6x5KDOtvrFc oZldOjc4TrKo/OhSCCRJ0ywBAEW/m5rO4mUEbUcceZBxIRZcCs1BAXJdd1amE9K2Q9s3 SjLJTByuPVXhOgRSzX1J/+NQNUiewqTt8GyUYAOPPvPLWhhO1EsZqYLLo9/tO3Dj7+rc zlIA== 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 d14-v6si11720521plj.57.2018.06.04.13.16.44; Mon, 04 Jun 2018 13:17:01 -0700 (PDT) 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 S1751217AbeFDUQR (ORCPT + 99 others); Mon, 4 Jun 2018 16:16:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:46884 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbeFDUQQ (ORCPT ); Mon, 4 Jun 2018 16:16:16 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2F1012083F; Mon, 4 Jun 2018 20:16:14 +0000 (UTC) Date: Mon, 4 Jun 2018 16:16:12 -0400 From: Steven Rostedt To: Thomas Garnier Cc: kernel-hardening@lists.openwall.com, Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org, Francis Deslauriers , Greg Kroah-Hartman , Andrew Morton , "Peter Zijlstra (Intel)" , Guenter Roeck , nixiaoming , James Hogan , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 21/27] x86/ftrace: Adapt function tracing for PIE support Message-ID: <20180604161612.6d48d8d2@gandalf.local.home> In-Reply-To: <20180529221625.33541-22-thgarnie@google.com> References: <20180529221625.33541-1-thgarnie@google.com> <20180529221625.33541-22-thgarnie@google.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 29 May 2018 15:15:22 -0700 Thomas Garnier wrote: > When using -fPIE/PIC with function tracing, the compiler generates a > call through the GOT (call *__fentry__@GOTPCREL). This instruction > takes 6 bytes instead of 5 on the usual relative call. > > If PIE is enabled, replace the 6th byte of the GOT call by a 1-byte nop > so ftrace can handle the previous 5-bytes as before. > > Position Independent Executable (PIE) support will allow to extend the > KASLR randomization range 0xffffffff80000000. I thought you were going to write a update to recordmcount.c to handle this at compile time? -- Steve > > Signed-off-by: Thomas Garnier > --- >