Received: by 10.223.176.5 with SMTP id f5csp561660wra; Sat, 3 Feb 2018 05:31:36 -0800 (PST) X-Google-Smtp-Source: AH8x224FXXm9BlRvsmc39gflUJZnJjbI3JQvTL0qFdjNcHVJsoRFyKVK5STEH6ECUlHMB7rzXyFN X-Received: by 2002:a17:902:62:: with SMTP id 89-v6mr37339637pla.284.1517664696663; Sat, 03 Feb 2018 05:31:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517664696; cv=none; d=google.com; s=arc-20160816; b=BwGeiaPFjCzTjHgOAhnpA54Jr9IqthkDvh+Oremie3LjeEAIaMphl/vNU7xVc3pzCo b+6HprQt0hIQEROYaq3jnKVNQXXGuU8fhXqfwiXKrLaqwAL9uWzBJO72hVuF73OIeLAM UZ6bbgMGv0q+iaXOQvge1j+u25tRLaf90I5FBjENlu+KogqL+u2uzsHIMxZlMueETe0J v9bM2BkWWmYM3TUOXnWrLfXsKaKX0GtPxlniHmPlIcFrcYARfSWZp4OPb1ilK1NY0WXL QYCD27dG9Nez9TJ/EQQuil8P7hPrEFjucOkvPcq0Er/VTEgI8H+nOTEDsyzSvuCxpfLF 1qSw== 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 :dmarc-filter:arc-authentication-results; bh=YNW2iJwBLS3ECTxcPdnF22TNd8lXl6CVKTAN5QJojSE=; b=PZuEJmN31pzv/dXEr1L8Pgy2UFG1X7X/fzUh87OAp66z1oSavFACTR4kaJTGg4bCHY Cs8fzAOIDUU30H4t2KWHF8BnbjnPrXe1osvJy7A7NH5zKEIejSOGF0J60D9Ajq0sU7uJ u0V/MkqssmdGPS1akb0SXwKNGRSUWJ2qOSo1yQMcbzy1m5aFznmNsib3MqRTCBpAZLf4 26yeHK/tKd3FVqvUgEcwV8qyrAn+ksTV2yaHSPqwNkKduA5Mm+r39ERP5bAa8C1LwS25 ur4l0Sl/wDJMNQGRKl0y7odJjW0o/8jAZibQYmSS9q7fZfN3VSzTorKvNO/tVxe9UzSj QBzg== 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 q69si1246546pfa.199.2018.02.03.05.30.48; Sat, 03 Feb 2018 05:31:36 -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 S1752288AbeBCNVj (ORCPT + 99 others); Sat, 3 Feb 2018 08:21:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:33958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751795AbeBCNVc (ORCPT ); Sat, 3 Feb 2018 08:21:32 -0500 Received: from devbox (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 69D6221785; Sat, 3 Feb 2018 13:21:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69D6221785 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org Date: Sat, 3 Feb 2018 22:21:28 +0900 From: Masami Hiramatsu To: Arnd Bergmann Cc: x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Nicolas Pitre , Andi Kleen , linux-kernel@vger.kernel.org, Masami Hiramatsu , Josef Bacik , Alexei Starovoitov Subject: Re: [PATCH 3/3] x86: error_inject: make just_return_func globally visible Message-Id: <20180203222128.c551eb3e12bd38d3341ce3de@kernel.org> In-Reply-To: <20180202145634.200291-3-arnd@arndb.de> References: <20180202145434.100626-1-arnd@arndb.de> <20180202145634.200291-1-arnd@arndb.de> <20180202145634.200291-3-arnd@arndb.de> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-redhat-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 Fri, 2 Feb 2018 15:56:19 +0100 Arnd Bergmann wrote: > With link time optimizations enabled, I get a link failure: > > ./ccLbOEHX.ltrans19.ltrans.o: In function `override_function_with_return': > :(.text+0x7f3): undefined reference to `just_return_func' > > Marking the symbol .globl makes it work as expected. Good catch! Acked-by: Masami Hiramatsu Thank you! > > Fixes: 540adea3809f ("error-injection: Separate error-injection from kprobe") > Signed-off-by: Arnd Bergmann > --- > arch/x86/lib/error-inject.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/x86/lib/error-inject.c b/arch/x86/lib/error-inject.c > index 7b881d03d0dd..3cdf06128d13 100644 > --- a/arch/x86/lib/error-inject.c > +++ b/arch/x86/lib/error-inject.c > @@ -7,6 +7,7 @@ asmlinkage void just_return_func(void); > > asm( > ".type just_return_func, @function\n" > + ".globl just_return_func\n" > "just_return_func:\n" > " ret\n" > ".size just_return_func, .-just_return_func\n" > -- > 2.9.0 > -- Masami Hiramatsu