Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1434440img; Sat, 23 Mar 2019 02:46:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCtgI71nixysKmlx5oAjkFYo8e9tAJqjJK4hI35I/jdKfyU4tJA5/JLQSTlyw3PMjARme5 X-Received: by 2002:a17:902:968a:: with SMTP id n10mr14433370plp.283.1553334407724; Sat, 23 Mar 2019 02:46:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553334407; cv=none; d=google.com; s=arc-20160816; b=pvhG1256MjeaypijGSyXT8c1TYnn3PuyGeJcpvMFDi4nbsJ2i1/hRum75DCclRHX/G 5wlSQpW/+wxklShJ7exnKp1zcErgTi5i1uR2+tXJvOx3vgfhKSl/YlZCEw8X0mhTRx84 V30LXcTPfaYHny/bbhCaPW8q67/Y9Mj0MlPP99w2Gs57L66HgM7Jlco86pt81jtkHqAH idJ/CnnSvUVuRy3L/Faya4GSZygorv2lzrevFHra+xwUVnbJBBpl/1c5pjlvhW0mGWs4 foigirDhQUadZZSLIfBxAbz2sT+y2lbKE5yI/ioZGV+bDN/Vd0KmEle0Yudk+cLY5fwt PPTw== 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 :dkim-signature; bh=+GGgPhx9Y+8lBncDOpKiKJ1DhP9FqOdm1fY3eXSQKnw=; b=RMuEO3lHXHnRXduVTRF4ViEqiypaXLBkaF2BwWDADn9aCXra5IeRFhLlzuaLYoeECh Rzmo0F6hBm8NBRqpQtNjjHJie5tzTDgp+ZztpwTegOFJnTL+OQmwYM3B6tObraCkb+a9 rXCS/DJz9jsl4qVuCGoBee1MLIwsL7RHgcnLtadk/qpujGNZ5qyX4hxIEKCcE+33/q3H 1w4NqpIeloi1QDbWnQTVnfDhB6833Ck7VEnOHxDIh7DYGmUDnMHImurYtiD3jNnuoGRd 8VxdW1r3MZwxI/0R0PN1nPn4rD9CyN2paeOiE7SRSOYOGrI8KVY+V3yJ7N+yvTlyYWfE dZfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IgxzZk9Q; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s4si8606690pgs.566.2019.03.23.02.46.32; Sat, 23 Mar 2019 02:46:47 -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; dkim=pass header.i=@kernel.org header.s=default header.b=IgxzZk9Q; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726038AbfCWJp0 (ORCPT + 99 others); Sat, 23 Mar 2019 05:45:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:53844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbfCWJp0 (ORCPT ); Sat, 23 Mar 2019 05:45:26 -0400 Received: from devnote2 (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (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 34282218E2; Sat, 23 Mar 2019 09:45:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553334325; bh=qdOcipUroHZFD3vacwH0cgyvXy+P8C2hbDp/mb055nQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=IgxzZk9Qe9jlXTcg3oMUrDG3+fpLVjjudffvV/jaR4XgJqEJGoyTYbgPRsnc8AzNH MTZwx6/5r9/BJuo0BaazQhiv6dYiK825++5o+ZDJNQLVZLzmbN7mq05mGHqXA41Lfd izMtei/7yzJQd+km5HX5915EHsNUFpGkkA28VrUc= Date: Sat, 23 Mar 2019 18:45:21 +0900 From: Masami Hiramatsu To: Andi Kleen Cc: x86@kernel.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, Andi Kleen , mhiramat@kernel.org Subject: Re: [PATCH 11/17] x86/kprobes: Make trampoline_handler global and visible Message-Id: <20190323184521.a443cc741997cb0d3ed26395@kernel.org> In-Reply-To: <20190321220009.29334-12-andi@firstfloor.org> References: <20190321220009.29334-1-andi@firstfloor.org> <20190321220009.29334-12-andi@firstfloor.org> X-Mailer: Sylpheed 3.5.1 (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 Thu, 21 Mar 2019 15:00:03 -0700 Andi Kleen wrote: > From: Andi Kleen > > This function is referenced from assembler, so in LTO > it needs to be global and visible to not be optimized away. > I got it. Acked-by: Masami Hiramatsu Andi, out of curiousity, that is not only for x86, but does all arch have to care it? Thank you, > Cc: mhiramat@kernel.org > 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 > -- Masami Hiramatsu