From patchwork Mon Feb 8 17:57:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 580446 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0783814017E for ; Tue, 9 Feb 2016 05:01:34 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=XfqLdYth; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id D9DAB1A0290 for ; Tue, 9 Feb 2016 05:01:33 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=XfqLdYth; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id AC70E1A0167 for ; Tue, 9 Feb 2016 04:58:01 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=XfqLdYth; dkim-atps=neutral Received: by mail-wm0-x235.google.com with SMTP id 128so165759269wmz.1 for ; Mon, 08 Feb 2016 09:58:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hUVorz3kuPckMPH5eBbnVdUsqKO7ZsaFi9MiE/gFB1I=; b=XfqLdYthirtfB5Fl2Ix5bmSGQ/u5ERYbfSoYX63C8I8BlzjiYSr6xuvExSjKvZRN2G IwYrSzluJeFYqUFp4ggMH0Th4GIoA8MPyYGaFj5wQi4u+pT2J81E6HX7Yrl047XBws2z F3luG1M8XvT8rtk/gkL1fCkn2ISyDL70yjz7o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hUVorz3kuPckMPH5eBbnVdUsqKO7ZsaFi9MiE/gFB1I=; b=cTJ+3KePsdkg3R+Pw7EXamxKt1/DFJK3IJgAEJttAWHHrBvv88R305gqLu4rRvFvT1 XhFcfstCcKT33C5DTkYdN9Tc4l4jCEOdHHmhrbngv4Czmgu4bv00+eY8LAdKz/lF93e9 RqFn8DqbQnA/b6citGy/zIMiR/g5RdEmSm/NPq3FSLsgzTRSxwpS/xKgiP7fadoEwYvj NTm4iHzW3Fi2rpGiPcY8ciAF0KbMfhXcLFBJubKfZ1cI0DmRfbAbxzeHbgbDbEgSs4GE I7juO+pF7UHwdxlPwirn2MOA78TmaImzF+GybOoXiS/IKP5zQ380kLuekJlIqUpBz/78 tCWA== X-Gm-Message-State: AG10YOSgdNkNvZ2E9XTHhovzVEYvB8soHAFIEx851k0oJ4kdea7jGazNcxXKiTS9o2XSkXux X-Received: by 10.194.204.225 with SMTP id lb1mr28140280wjc.156.1454954278612; Mon, 08 Feb 2016 09:57:58 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id w17sm13664684wmw.5.2016.02.08.09.57.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Feb 2016 09:57:57 -0800 (PST) From: Ard Biesheuvel To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, keescook@chromium.org, akpm@linux-foundation.org, mingo@kernel.org, hpa@zytor.com, heiko.carstens@de.ibm.com, benh@kernel.crashing.org, mpe@ellerman.id.au, mmarek@suse.cz, rusty@rustcorp.com.au, arnd@arndb.de, linux-arch@vger.kernel.org, linux@roeck-us.net Subject: [PATCH v5 1/3] x86: kallsyms: disable absolute percpu symbols on !SMP Date: Mon, 8 Feb 2016 18:57:46 +0100 Message-Id: <1454954268-3225-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1454954268-3225-1-git-send-email-ard.biesheuvel@linaro.org> References: <1454954268-3225-1-git-send-email-ard.biesheuvel@linaro.org> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" scripts/kallsyms.c has a special --absolute-percpu command line option which deals with the zero based per cpu offsets that are used when building for SMP on x86_64. This means that the option should only be passed in that case, so add a Kconfig symbol with the correct predicate, and use that instead. Tested-by: Guenter Roeck Reviewed-by: Kees Cook Tested-by: Kees Cook Acked-by: Rusty Russell Signed-off-by: Ard Biesheuvel --- init/Kconfig | 4 ++++ scripts/link-vmlinux.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/init/Kconfig b/init/Kconfig index 22320804fbaf..b17824a875fa 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1420,6 +1420,10 @@ config KALLSYMS_ALL Say N unless you really need all symbols. +config KALLSYMS_ABSOLUTE_PERCPU + bool + default X86_64 && SMP + config PRINTK default y bool "Enable support for printk" if EXPERT diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index ba6c34ea5429..7a08bf9a9576 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -86,7 +86,7 @@ kallsyms() kallsymopt="${kallsymopt} --page-offset=$CONFIG_PAGE_OFFSET" fi - if [ -n "${CONFIG_X86_64}" ]; then + if [ -n "${CONFIG_KALLSYMS_ABSOLUTE_PERCPU}" ]; then kallsymopt="${kallsymopt} --absolute-percpu" fi