From patchwork Wed Mar 28 03:09:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balbir Singh X-Patchwork-Id: 891956 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 ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 409tFw35dxz9s0x for ; Wed, 28 Mar 2018 14:11:48 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tjhbM1Gy"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 409tFw1bCMzF2JF for ; Wed, 28 Mar 2018 14:11:48 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tjhbM1Gy"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c00::243; helo=mail-pf0-x243.google.com; envelope-from=bsingharora@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tjhbM1Gy"; dkim-atps=neutral Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (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 409tCW4hn0zF2D1 for ; Wed, 28 Mar 2018 14:09:43 +1100 (AEDT) Received: by mail-pf0-x243.google.com with SMTP id t16so454527pfh.4 for ; Tue, 27 Mar 2018 20:09:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Bh2msioj+tHAslNPSvuqV5ccS2Ic8uxFJB++UFvM3Uk=; b=tjhbM1GyTRO2raIhv5WoSfEXyqDwf91YpsQtjcexwHl1yPDlGZQij1Hh7ywfeB1CiJ fWkuPogkFVlkYh+4iS4wbplbuUFzhIJzG9dZ7X8/dSUI/syRMXP0r2neifw56dHT0oQv TG2U7Xr7z3gKVlgUE45gxYi/gkEiM15jHk/s7EdksZRRHrlf3usSCWHUuRAPo3W0NFIB evLr1TuW/UrLHlIuzaeZMkKKPFgo58NEI6SofX7s/l36Afptr/uiKwIhZwq4khtHTZWd FnUXjW1qccl1vOCyN6/LUqoterDJRoAhW9WgD2YrvgKL//1JOrNxFpFb5jj1xj9caJIl 6xgw== 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; bh=Bh2msioj+tHAslNPSvuqV5ccS2Ic8uxFJB++UFvM3Uk=; b=HzgHYrealooq8ddIUY0vMjlBxSeUyZ7+tG9PMxZkJ6mGW5TiG97lqXPXwFXXYFwcAZ kw9LlxRaC6tW0HHuyf+2TbqdakNip8gOAaqhz+vSsC3L/eoqTSJWV3LTRwix6UJ5K6c3 BLzpKBi2jVlNt3xmIonh5j7PVqMGpeBYxU7tu80LeFuuWs4/uk3Xl+mxYTt87j2Wz2n+ 7ZNG6C6JqQbr3tpMfmkIV2WdBVY/QRWhM6tfCZ/hOOAkOC5cur8v3juyWoGwku5FQ88Z MUW7Ppy1fP/G2uAKUq4yqLCYekDZcThmy2a+8uLX8XFmnY2BsElz7ESmxpfs5JSUp/xJ knvg== X-Gm-Message-State: AElRT7FHdDz5Amlm0P200X2f4IndfR7z4jpoerBWAURghy9myeJHgi0G AMGQgGfomsfw29pAhrz7X+azDq11Zdw= X-Google-Smtp-Source: AIpwx48TzVblLNgwPej20qylISbNQefqsAbeNZsVRw+58Yx13dySrpo8dM6jCoX0AEWUrBqob0GPeg== X-Received: by 10.99.60.6 with SMTP id j6mr1248685pga.73.1522206580492; Tue, 27 Mar 2018 20:09:40 -0700 (PDT) Received: from balbir.ozlabs.ibm.com ([122.99.82.10]) by smtp.googlemail.com with ESMTPSA id z78sm5100133pfd.23.2018.03.27.20.09.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Mar 2018 20:09:39 -0700 (PDT) From: Balbir Singh To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc/mm: Fix printing of process table address Date: Wed, 28 Mar 2018 14:09:32 +1100 Message-Id: <20180328030932.32169-1-bsingharora@gmail.com> X-Mailer: git-send-email 2.13.6 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" New changes to %p cause the information printed at boot about radix-mmu partition and process table opaque, if we really want to protect those values, we should make dmesg more secure using CONFIG_SECURITY_DMESG_RESTRICT Before the patches: radix-mmu: Partition table (ptrval) radix-mmu: Process table (ptrval) and radix root for kernel: (ptrval) After the patches radix-mmu: Partition table c0000000ffff0000 radix-mmu: Process table c0000000fe000000 and radix root for kernel: c0000000015a0000 Signed-off-by: Balbir Singh --- arch/powerpc/mm/pgtable-radix.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c index 2e10a964e290..3f676e89c3a6 100644 --- a/arch/powerpc/mm/pgtable-radix.c +++ b/arch/powerpc/mm/pgtable-radix.c @@ -329,7 +329,8 @@ static void __init radix_init_pgtable(void) * physical address here. */ register_process_table(__pa(process_tb), 0, PRTB_SIZE_SHIFT - 12); - pr_info("Process table %p and radix root for kernel: %p\n", process_tb, init_mm.pgd); + pr_info("Process table %px and radix root for kernel: %px\n", + process_tb, init_mm.pgd); asm volatile("ptesync" : : : "memory"); asm volatile(PPC_TLBIE_5(%0,%1,2,1,1) : : "r" (TLBIEL_INVAL_SET_LPID), "r" (0)); @@ -363,7 +364,7 @@ static void __init radix_init_partition_table(void) mmu_partition_table_set_entry(0, dw0, 0); pr_info("Initializing Radix MMU\n"); - pr_info("Partition table %p\n", partition_tb); + pr_info("Partition table %px\n", partition_tb); } void __init radix_init_native(void)