Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp11706pxb; Wed, 20 Jan 2021 23:19:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwp/5mZZ2lPy0UCvHG8Y9OS9IfIWT883Dutz/B7acZBqA9st4VisP9H/ebJd/xDHKqYFT4s X-Received: by 2002:a17:906:404a:: with SMTP id y10mr8203920ejj.331.1611213572776; Wed, 20 Jan 2021 23:19:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611213572; cv=none; d=google.com; s=arc-20160816; b=K3zBeQVKPbFbMJjBMMfV+3/TtteAjKFJeRk2hfOeUH2qre4gVTz3djIneTCvewwNs8 5ymNcrPVltMCysufT79eftUSq10vZeoMr8ulHKVQBsx+lwK6fubQ0Qn28qm9S+Z64lHk NGGtPURHLQmKMUYC/WaVbN+91HJ5SbjxIqa/pFaJ1mXVdlFfGncu0b4A6WuUEWIdaWj9 iV4ZSCQDX9uhAimKNWEFMzUaYGEXJIC0LOOm0x2JY0bguRRptr4HogE9BbVhbtA+mHOK QObgXv2qVhGTQWM6qd0U6W0jh4zysqNLe8tgIoZtw6eF3iJBU58gzi1Xj0xXqSmG3Her OEbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=rhSh/HQgdN2lB7/EZd4gRNSdAORZpzmyu4+TIebLNY8=; b=hPDorUrTsx+mmjj+Iey8kc0DttO0757vu3LFoLpAIhgRh0nKsh61GtXs4h7VWTqjaW v60UpJ+iR1CXxdeI2NvCQ2ZtWCi8KVXN658Wto0tQECiK7fu4QCmXZqTgRodzuamMhmK HAWKOjQwQD7N18NLqTQ7UnEXPKchHmBV/aNzjZvBkDbB+DyPgYguvaohpfDNRwGp90DS XrhBAHYeyB7WNCkh9NSv6aiApIi9EJ7e4fUdXwp0LUdGkPu0qxjjIoFdxZDbfPEgIw5o m0j+9yYmOzTPxKLaxF8PcNdIYMNNlvIWFXOr6HGf3ic2tiop4YtI3sRzoka7ZwEdn6Au nfQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Um1EJA3d; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=RXj5TaUa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga16si1454195ejb.691.2021.01.20.23.19.08; Wed, 20 Jan 2021 23:19:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Um1EJA3d; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=RXj5TaUa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726858AbhAUHQc (ORCPT + 99 others); Thu, 21 Jan 2021 02:16:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726821AbhAUHPX (ORCPT ); Thu, 21 Jan 2021 02:15:23 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2D23C061575; Wed, 20 Jan 2021 23:14:42 -0800 (PST) Date: Thu, 21 Jan 2021 07:14:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1611213280; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rhSh/HQgdN2lB7/EZd4gRNSdAORZpzmyu4+TIebLNY8=; b=Um1EJA3dPP+CiPWRe6fDf6FinFU4NWe9rq8Hyay6pERPXNtPwEccZ4wggwH9oBjzxyYP4U Vcskd7WrRLZODTr1NYHzpongoMGcuAZMACYZ1UVVuqqLZFFyMzl+zAGkO0iWCrVPpfznpo KZ/Dru0oUOJm4gEYXrK8UXskcd54+xPXoHj8ZfACHFPhHnqnPQQJj1RQNZ2L8MqwKOlOwV Mg3QiZ0sJE8LiK3pltERr9haoG3HUQWGr6P5ukZsP99m1PIXJAh42FONsYR9MVkqFiThmB RBovyuAW8B8PguTfUWaX2Hhz1Ltq38ry/umJEIzmwcdGy4VBz8pQRY9BOsT2QQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1611213280; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rhSh/HQgdN2lB7/EZd4gRNSdAORZpzmyu4+TIebLNY8=; b=RXj5TaUagGHYePH1fU0VySk7d12MR8mlMTh5IFM1ptDeyDMfmqKjPAkEF9UXxtvA0BG6XI 9Tsts0WD5YM/piDA== From: "tip-bot2 for Andrea Righi" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/entry] x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y Cc: Andrea Righi , Ingo Molnar , Borislav Petkov , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: MIME-Version: 1.0 Message-ID: <161121327995.414.14890124942899525500.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/entry branch of tip: Commit-ID: e6d92b6680371ae1aeeb6c5eb2387fdc5d9a2c89 Gitweb: https://git.kernel.org/tip/e6d92b6680371ae1aeeb6c5eb2387fdc5d9a2c89 Author: Andrea Righi AuthorDate: Thu, 14 Jan 2021 12:48:35 +01:00 Committer: Ingo Molnar CommitterDate: Thu, 21 Jan 2021 08:11:52 +01:00 x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y With CONFIG_PREEMPTION disabled, arch/x86/entry/thunk_64.o is just an empty object file. With the newer binutils (tested with 2.35.90.20210113-1ubuntu1) the GNU assembler doesn't generate a symbol table for empty object files and objtool fails with the following error when a valid symbol table cannot be found: arch/x86/entry/thunk_64.o: warning: objtool: missing symbol table To prevent this from happening, build thunk_$(BITS).o only if CONFIG_PREEMPTION is enabled. BugLink: https://bugs.launchpad.net/bugs/1911359 Fixes: 320100a5ffe5 ("x86/entry: Remove the TRACE_IRQS cruft") Signed-off-by: Andrea Righi Signed-off-by: Ingo Molnar Cc: Borislav Petkov Link: https://lore.kernel.org/r/YAAvk0UQelq0Ae7+@xps-13-7390 --- arch/x86/entry/Makefile | 3 ++- arch/x86/entry/thunk_32.S | 2 -- arch/x86/entry/thunk_64.S | 4 ---- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/x86/entry/Makefile b/arch/x86/entry/Makefile index 08bf95d..83c98da 100644 --- a/arch/x86/entry/Makefile +++ b/arch/x86/entry/Makefile @@ -21,12 +21,13 @@ CFLAGS_syscall_64.o += $(call cc-option,-Wno-override-init,) CFLAGS_syscall_32.o += $(call cc-option,-Wno-override-init,) CFLAGS_syscall_x32.o += $(call cc-option,-Wno-override-init,) -obj-y := entry_$(BITS).o thunk_$(BITS).o syscall_$(BITS).o +obj-y := entry_$(BITS).o syscall_$(BITS).o obj-y += common.o obj-y += vdso/ obj-y += vsyscall/ +obj-$(CONFIG_PREEMPTION) += thunk_$(BITS).o obj-$(CONFIG_IA32_EMULATION) += entry_64_compat.o syscall_32.o obj-$(CONFIG_X86_X32_ABI) += syscall_x32.o diff --git a/arch/x86/entry/thunk_32.S b/arch/x86/entry/thunk_32.S index f1f96d4..5997ec0 100644 --- a/arch/x86/entry/thunk_32.S +++ b/arch/x86/entry/thunk_32.S @@ -29,10 +29,8 @@ SYM_CODE_START_NOALIGN(\name) SYM_CODE_END(\name) .endm -#ifdef CONFIG_PREEMPTION THUNK preempt_schedule_thunk, preempt_schedule THUNK preempt_schedule_notrace_thunk, preempt_schedule_notrace EXPORT_SYMBOL(preempt_schedule_thunk) EXPORT_SYMBOL(preempt_schedule_notrace_thunk) -#endif diff --git a/arch/x86/entry/thunk_64.S b/arch/x86/entry/thunk_64.S index 496b11e..9d543c4 100644 --- a/arch/x86/entry/thunk_64.S +++ b/arch/x86/entry/thunk_64.S @@ -31,14 +31,11 @@ SYM_FUNC_END(\name) _ASM_NOKPROBE(\name) .endm -#ifdef CONFIG_PREEMPTION THUNK preempt_schedule_thunk, preempt_schedule THUNK preempt_schedule_notrace_thunk, preempt_schedule_notrace EXPORT_SYMBOL(preempt_schedule_thunk) EXPORT_SYMBOL(preempt_schedule_notrace_thunk) -#endif -#ifdef CONFIG_PREEMPTION SYM_CODE_START_LOCAL_NOALIGN(__thunk_restore) popq %r11 popq %r10 @@ -53,4 +50,3 @@ SYM_CODE_START_LOCAL_NOALIGN(__thunk_restore) ret _ASM_NOKPROBE(__thunk_restore) SYM_CODE_END(__thunk_restore) -#endif