Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4286548yba; Tue, 7 May 2019 15:37:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZNmWd7q1hX2rCReSZGkQbOB5N7POXJoikxgKIl+/Ju8ib+7eLzxIpXR1GkukIXtZJqxJb X-Received: by 2002:a63:234c:: with SMTP id u12mr4381466pgm.264.1557268647896; Tue, 07 May 2019 15:37:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557268647; cv=none; d=google.com; s=arc-20160816; b=wZj+DY4Et/Y2+Nt28x3cPS+RRCiqj9Mx2szkCTtfHnM8AfL55Kqh3p5Mgra+vzmi3k lSlfEPqJe+tz6gduCcMt79K1TtRg38/6KK80S81XEatKHFqYDSRl3luO0IoMEriWiL9i hyk3KA+BUoHXFGhtzrc2r4vmmDbxBTGJHv6b9C86RlZAOP8uubrPzQKz/B0m7f6hdptY Zj6jk0bxjfBr88pumS16gPADdzp4D+sMas01bR63t1GneR01CoT2clLrn+AlDMOW8vvr z9JNjzCSh1Evxct44wO3m7Ieuln4SsBUkInPcYqEOiKWPtyziq5R/y92v5ilxvMgUdys kFww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4R5ifsup3NykhfRTLDToqK948qspJ5mN7zRILNuTmJI=; b=RnidroeLT9yASY+hMFkJ1Pe1M3GLX4/W+4fwS2oH/7ROOD9YEY8WuhRgNZvZnl0NG8 YTItatQQ2qhHHNILgYrnkt8NdGiSCM480qbCqBOVgvvJaLqxIppsiyZ2Q+M62emc30rJ 70hKOrayTEsdztlaEsIf+ewk5LmTTY32c945JnTVVQpiYvj3j76CTnRkR1wwCy5SkA/q 5ROqOMo+IdKiNXRD4t6WWo8xHynmGWyjzP+fad2FiOKhISeN0ckO9ol3HBLNIilvWSBN b6LlmT9MoqqQjOOBzwA65/ByMy2DCF5xMc1VKowmcGudouAqO7L+IjbXWRAKIK5jjtPg rK1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JZlFoukS; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6si21166669pgm.317.2019.05.07.15.37.10; Tue, 07 May 2019 15:37:27 -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=@gmail.com header.s=20161025 header.b=JZlFoukS; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726415AbfEGWgO (ORCPT + 99 others); Tue, 7 May 2019 18:36:14 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:45899 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726091AbfEGWgO (ORCPT ); Tue, 7 May 2019 18:36:14 -0400 Received: by mail-lf1-f65.google.com with SMTP id n22so5494227lfe.12; Tue, 07 May 2019 15:36:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=4R5ifsup3NykhfRTLDToqK948qspJ5mN7zRILNuTmJI=; b=JZlFoukSAz1HM3PmXPF5oBf51z0VlGSx/HjQHd3a4ZmMdBpmDhXnqv5naD5DGrXXXa wq8pg2+ARP3oN5zqiDGOiQmkr0visLyBmCt7Cu+ZFFD48vWcZWHcsWJtq8xKhDlV5QPf 1TbbO70/jiMWtnMCPdOgvTse0Za9otU4wb1arqG+2yFZF8I8EvEknQbYKc4nYiz+LWOB TzX3hUaSmz8qfAhFfZ2n5gBzmF1JPeau/XDeI9PnpsVfsiCoz0/5k0exyqfxtFj1zoi5 QBU/uUUj+3aBOjS/9p4xl80RRcTfcQl5CY9zpG0Q7XlrV2d16PUk4wl2QV1vdsGiHJlQ w9TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=4R5ifsup3NykhfRTLDToqK948qspJ5mN7zRILNuTmJI=; b=MVSWCPlYcydqxtubzMxoy8lVyzIKAzTx1HwCc/3XmqS24IEcLyViXeh2UfVy6ax3e7 +CcwutzTn0jwYecPwGrR+rR8GymK98pkU2/JGGapdGO+N1ew5dpBWUv+iYGJQGt8HdCa l2+IPvtdNSHWk0S6i6shMppuCGv5XkF627QCAk4Kc930xa+0z1TlpwInFWa/7JUhTg9w cLcsqhJw/wj3dkX+mH7vwLMsNhD7W37fEn3qWBmyxpZCsA4edHnKK3dvIHw5TUOD7fMb WEQdBWd9sMVg895IqHZS6Cj5HZpn9IkZ7OvQsR4fmWnx5P9fz7Q/P6vXbLGPAeNx/cKT EdaA== X-Gm-Message-State: APjAAAU0AKJy11gcOn6bn7bMgSc3235IhEQda4oCZAhiBV61CBug9b7m E9LYiEOKdsdhte+of0vRLcYRJUMmKJM= X-Received: by 2002:ac2:5582:: with SMTP id v2mr17802681lfg.19.1557268571015; Tue, 07 May 2019 15:36:11 -0700 (PDT) Received: from mobilestation ([5.164.217.122]) by smtp.gmail.com with ESMTPSA id r21sm3442159ljg.51.2019.05.07.15.36.09 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 07 May 2019 15:36:10 -0700 (PDT) Date: Wed, 8 May 2019 01:36:07 +0300 From: Serge Semin To: Paul Burton Cc: Ralf Baechle , James Hogan , Mike Rapoport , Andrew Morton , Michal Hocko , Greg Kroah-Hartman , Thomas Bogendoerfer , Huacai Chen , Stefan Agner , Stephen Rothwell , Alexandre Belloni , Juergen Gross , Serge Semin , "linux-mips@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 3/5] mips: Print the kernel virtual mem layout on debugging Message-ID: <20190507223603.ewuye6lutbb5wz2l@mobilestation> References: <20190503175041.7949-1-fancer.lancer@gmail.com> <20190503175041.7949-4-fancer.lancer@gmail.com> <20190506191419.w3qtkgcjrjjuzwmu@pburton-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190506191419.w3qtkgcjrjjuzwmu@pburton-laptop> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Paul On Mon, May 06, 2019 at 07:14:21PM +0000, Paul Burton wrote: > Hi Serge, > > On Fri, May 03, 2019 at 08:50:39PM +0300, Serge Semin wrote: > > It is useful at least for debugging to have the kernel virtual > > memory layout printed at boot time so to have the full information > > about the booted kernel. Make the printing optional and available > > only when DEBUG_KERNEL config is enabled so not to leak a sensitive > > kernel information. > > > > Signed-off-by: Serge Semin > > --- > > arch/mips/mm/init.c | 49 +++++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 49 insertions(+) > > FYI the rest of the series is in mips-next, but I left this one out > because it gives me compile errors for 64r6el_defconfig: > > In file included from ./include/linux/printk.h:7, > from ./include/linux/kernel.h:15, > from ./include/asm-generic/bug.h:18, > from ./arch/mips/include/asm/bug.h:42, > from ./include/linux/bug.h:5, > from arch/mips/mm/init.c:11: > arch/mips/mm/init.c: In function ‘mem_print_kmap_info’: > ./include/linux/kern_levels.h:5:18: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘long long unsigned int’ [-Werror=format=] > #define KERN_SOH "\001" /* ASCII Start Of Header */ > ^~~~~~ > ./include/linux/kern_levels.h:13:21: note: in expansion of macro ‘KERN_SOH’ > #define KERN_NOTICE KERN_SOH "5" /* normal but significant condition */ > ^~~~~~~~ > ./include/linux/printk.h:307:9: note: in expansion of macro ‘KERN_NOTICE’ > printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) > ^~~~~~~~~~~ > arch/mips/mm/init.c:69:2: note: in expansion of macro ‘pr_notice’ > pr_notice("Kernel virtual memory layout:\n" > ^~~~~~~~~ > arch/mips/mm/init.c:70:39: note: format string is defined here > " lowmem : 0x%px - 0x%px (%4ld MB)\n" > ~~~^ > %4lld > In file included from ./arch/mips/include/asm/bug.h:5, > from ./include/linux/bug.h:5, > from arch/mips/mm/init.c:11: > In function ‘mem_print_kmap_info’, > inlined from ‘mem_init’ at arch/mips/mm/init.c:530:2: > ./include/linux/compiler.h:344:38: error: call to ‘__compiletime_assert_99’ declared with attribute error: BUILD_BUG_ON failed: FIXADDR_TOP < PAGE_OFFSET > _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) > ^ > ./include/linux/compiler.h:325:4: note: in definition of macro ‘__compiletime_assert’ > prefix ## suffix(); \ > ^~~~~~ > ./include/linux/compiler.h:344:2: note: in expansion of macro ‘_compiletime_assert’ > _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) > ^~~~~~~~~~~~~~~~~~~ > ./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’ > #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) > ^~~~~~~~~~~~~~~~~~ > ./include/linux/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ > BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) > ^~~~~~~~~~~~~~~~ > arch/mips/mm/init.c:99:2: note: in expansion of macro ‘BUILD_BUG_ON’ > BUILD_BUG_ON(FIXADDR_TOP < PAGE_OFFSET); > ^~~~~~~~~~~~ > cc1: all warnings being treated as errors > make[3]: *** [scripts/Makefile.build:278: arch/mips/mm/init.o] Error 1 > make[2]: *** [scripts/Makefile.build:489: arch/mips/mm] Error 2 > > Thanks, > Paul Thanks for the report regarding this issue. I actually thought I tested the patch being buildable for 64bit systems. It turns out I didn't.( Should I resend the fixed patch as a separate v3 one In-Reply-to this v2 patch or resubmit the patchset with cover-letter and only the fixed patch being there? Cheers, -Sergey