Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1363855imm; Wed, 25 Jul 2018 17:01:47 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfcpFVOOXQUEbUzfZxs13EXE+EummkbI4mWnLAMB46N6K27XtguSlB4FAvj+FH8a5H5nMe7 X-Received: by 2002:a62:5ec3:: with SMTP id s186-v6mr24356188pfb.129.1532563307702; Wed, 25 Jul 2018 17:01:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532563307; cv=none; d=google.com; s=arc-20160816; b=kz+lcE97205jaV4OyTZO9z6OBDJO2W3tYWf9AwGkpRt1S3se73+TWwkwdjrRB6Vsvd zAP/2DVkxaW6xyBYyKFNq1yiRXR/UESP23/vmzgU/LUihsDvP4oVDK4lXjeMS9sSbJtL BjPnzNg+cg9v1BK7POh7hath7vR+qFJuulMZTlGTkA4uVTJ6+yE8wecgbfe7Ob2eHCI4 pK84vv01NXRr24YrwjIUOJhjqtSY5LQhnS5Yk1XJlnC6kKzA6xZZCBH33hpOABuCz6Uu V/GL1Joxcql1dFo2B2EUUV9TWfQf+QMejBZZcpag88UM0WV2QoBVrh3pP8+PlvD7/KiB SGUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=hIvpKGKNqRxV3JggszEiPqiqS8x7Has4uKzatQ8KMas=; b=i+SWSg1wLBHqkLDyQJZt0DvYwd1FpKVP1eOPTwca4pGIGOb+bVHkLOpydXMCiavJjo Jpq39QAsQ2m3pa5+HjGoDV3cS5hYqHCpv+6WwXWxMR2BCfnJ8xKnRztjx+xMVVJ1+jgu 901BZT6qDdaL8Ah4dBNJPA4wCBBi51x1zl6+cQANCHlpS0WT/C0WPDX3GSuTjDa8tQmP t36KfCVBeyk4WJsfEi1Ml0A+53f9LwK3khtoyfVTBAah+eQfSaKcR8c5QyQ87Z9wV/Ex PwZozTH/s5H+WjTSJdFmm0wF1y9tHbf/CLkvhbVL4F8C/k+ilWoOkT5f4myza8WM6IHx DLcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@osandov-com.20150623.gappssmtp.com header.s=20150623 header.b=VgwH9ehG; 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 x62-v6si16924840pfd.124.2018.07.25.17.01.33; Wed, 25 Jul 2018 17:01: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=@osandov-com.20150623.gappssmtp.com header.s=20150623 header.b=VgwH9ehG; 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 S1728701AbeGZBNm (ORCPT + 99 others); Wed, 25 Jul 2018 21:13:42 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42148 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728623AbeGZBNl (ORCPT ); Wed, 25 Jul 2018 21:13:41 -0400 Received: by mail-pf1-f193.google.com with SMTP id l9-v6so2196784pff.9 for ; Wed, 25 Jul 2018 16:59:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hIvpKGKNqRxV3JggszEiPqiqS8x7Has4uKzatQ8KMas=; b=VgwH9ehGKsvLCpNCJBZ3LT/BPS3kwPfYyYKCdvQLTjgI2AWqFcsKmr1fkMCFT/BbGJ S85GvHFFcSzPQU1l4YKlJHpcQQ6zcChxOOFcnSLBdTSbPFOu+7ixg2949tYvLMmtAbT6 2QGcFpKlnIoPWeoNKDmXnDDeV9cbZhwWm3nzfzTXZEf47Lg5/GueHAjRZMS8Mb0s6KjY +JZYhVbDDVeG9TLa7leCTOOcozVaPDpVoDi1yB+IgzN6vhJwflPRtnuL5BdgKpU2KzI3 fgKdrprTyv4+bS0dD/o9uBqWURDlqMIN9XC4N2OwkVBsdoy7yKlnbK4z7xkf4crXj6qa NK/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hIvpKGKNqRxV3JggszEiPqiqS8x7Has4uKzatQ8KMas=; b=tFrvsCqIWEXL+qff3sk5lSHFEsZzTSkps8+ajEBrqMroo0uNdpRfZcHk2DoINWh3qX oy5G6iZtOeThv6RkFYYbgKZ7R+QPADQfRCOPtq5BSYpS7kGZsbYZspRzqjkDjDHjlX6R bLS9IwOabNGOkWVXhbTibsVW0vXkJCmTIsH/rFGeokcJXnw2h3Qfdl7SJ1ALDRi2/hDx hMt6hERRqSssAtNyaf4XnkswQ/F/nW8GSkkcnv2dOJXNlpZEFEuA2uoHYTyQ5NmQACeb om2BAaBVKwKrPa/fV+yW7OjE084rnZ5XVyKqTOoHrpqENwRVpp0RcfDDrL2e4XxcgewU HA3Q== X-Gm-Message-State: AOUpUlFBFUIcrCV83LwyF07odLCGtkb8OzAOn973TGjZ+xskqh9DqjM4 26L+tUTLCiWdD74SV5VsAQyTA9lOBZY= X-Received: by 2002:a63:5055:: with SMTP id q21-v6mr21675081pgl.397.1532563176737; Wed, 25 Jul 2018 16:59:36 -0700 (PDT) Received: from vader.thefacebook.com ([2620:10d:c090:180::1:8d38]) by smtp.gmail.com with ESMTPSA id 65-v6sm23188753pfq.81.2018.07.25.16.59.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jul 2018 16:59:36 -0700 (PDT) From: Omar Sandoval To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Andrew Morton Cc: Alexey Dobriyan , Eric Biederman , James Morse , Bhupesh Sharma , kernel-team@fb.com Subject: [PATCH v4 8/9] crash_core: use VMCOREINFO_SYMBOL_ARRAY() for swapper_pg_dir Date: Wed, 25 Jul 2018 16:59:19 -0700 Message-Id: X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Omar Sandoval This is preparation for allowing CRASH_CORE to be enabled for any architecture. swapper_pg_dir is always either an array or a macro expanding to NULL. In the latter case, VMCOREINFO_SYMBOL() won't work, as it tries to take the address of the given symbol: #define VMCOREINFO_SYMBOL(name) \ vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)&name) Instead, use VMCOREINFO_SYMBOL_ARRAY(), which uses the value: #define VMCOREINFO_SYMBOL_ARRAY(name) \ vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)name) This is the same thing for the array case but isn't an error for the macro case. Signed-off-by: Omar Sandoval --- kernel/crash_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/crash_core.c b/kernel/crash_core.c index b66aced5e8c2..e7b4025c7b24 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -401,7 +401,7 @@ static int __init crash_save_vmcoreinfo_init(void) VMCOREINFO_SYMBOL(init_uts_ns); VMCOREINFO_SYMBOL(node_online_map); #ifdef CONFIG_MMU - VMCOREINFO_SYMBOL(swapper_pg_dir); + VMCOREINFO_SYMBOL_ARRAY(swapper_pg_dir); #endif VMCOREINFO_SYMBOL(_stext); VMCOREINFO_SYMBOL(vmap_area_list); -- 2.18.0