Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp2054885ybb; Fri, 29 Mar 2019 17:49:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqydjX8alRDsTen8NIvdobc4lr+VfQpmcDdRyRXg0alJAgR2FihA9Lnc6wMNeGLkdP8sMpuq X-Received: by 2002:a17:902:b617:: with SMTP id b23mr49207868pls.200.1553906942158; Fri, 29 Mar 2019 17:49:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553906942; cv=none; d=google.com; s=arc-20160816; b=0P3h9/pY5AFBLuA19MZl/Vf7yUnqHx6GR1Qjs4r0aiiwHyP6U6HpkhuO/eTF/qM7wn FL1A+7r1S7cNPmvrYUzcmiSX+8wD1i1Rvgs1KRBW2cXfaPUadsj650tATaH8ptR2bcD1 x4e//DVjnw0luayLxWqrHTM5S93Ftrquqit+XJHuzVveU3RSq2S9KMqlabaKHuWD4+vm sF4aM7nj+RMPVGnj0RPXMabk5MNuSKhzBh6i4uG1wbs4Ajc+R6LoSAKpczkenbDfYUvh DcwR0rXFo56dGMoIML8Tc9zfD8Zbwbj8lSEHDzcMa/iaaf3M6wVJnMDd1HydgF7/w41J 8VHQ== 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:date:subject:cc:to:from; bh=oxxysBPyPlvC0KPMSX/O91swGSA0x9ktTjGfIjQzHNI=; b=TYe2YvrsEEubff1sr/uykVwvHS6hMIOWyqbVgsH5RAQ+84fpExx4JmcGp1HmpWDvVu lPKMUBsy4RukCyF7WHyQKF/VwORZEEnhJjIp8+BwIS4SHQnnggql7IheU2PAxSIiq52D P2UsF9K5GlXXjKkd+48Vzhq8mYeuuzcKZeUcFd8fpBOYHrbyY3GgP9Djz3WdCKnS4BU9 rGqSGdiq/f39eScX0CQD740olGOsceywR0KAijSZPJkQ/c8HRh4oKOdgGLMARYO1Aqpk yA4+Jd+QbvMi0unjfpKHbZrHB51KLxYgXwJRB8ZUAv/U3IFMChvb+wUiDRSZ9m2SHbLR PKEw== 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 b6si2953999pgw.70.2019.03.29.17.48.47; Fri, 29 Mar 2019 17:49:02 -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 S1730542AbfC3Ar4 (ORCPT + 99 others); Fri, 29 Mar 2019 20:47:56 -0400 Received: from mga06.intel.com ([134.134.136.31]:64217 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730468AbfC3Arx (ORCPT ); Fri, 29 Mar 2019 20:47:53 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2019 17:47:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,286,1549958400"; d="scan'208";a="129912804" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.137]) by orsmga008.jf.intel.com with ESMTP; 29 Mar 2019 17:47:51 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id 11E62301BE3; Fri, 29 Mar 2019 17:47:51 -0700 (PDT) From: Andi Kleen To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Andi Kleen , mhiramat@kernel.org Subject: [PATCH v2 7/9] x86/kprobes: Make trampoline_handler global and visible Date: Fri, 29 Mar 2019 17:47:41 -0700 Message-Id: <20190330004743.29541-7-andi@firstfloor.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190330004743.29541-1-andi@firstfloor.org> References: <20190330004743.29541-1-andi@firstfloor.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andi Kleen This function is referenced from assembler, so in LTO it needs to be global and visible to not be optimized away. Cc: mhiramat@kernel.org Acked-by: Masami Hiramatsu Signed-off-by: Andi Kleen --- arch/x86/kernel/kprobes/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c index 31ab91c9c4e9..1309a4eb3119 100644 --- a/arch/x86/kernel/kprobes/core.c +++ b/arch/x86/kernel/kprobes/core.c @@ -752,7 +752,7 @@ STACK_FRAME_NON_STANDARD(kretprobe_trampoline); /* * Called from kretprobe_trampoline */ -static __used void *trampoline_handler(struct pt_regs *regs) +__used __visible void *trampoline_handler(struct pt_regs *regs) { struct kretprobe_instance *ri = NULL; struct hlist_head *head, empty_rp; -- 2.20.1