lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220825060407.335475-2-Adrian.Zaharia@windriver.com>
Date:   Thu, 25 Aug 2022 09:04:07 +0300
From:   Adrian Zaharia <Adrian.Zaharia@...driver.com>
To:     <linux-mtd@...ts.infradead.org>
CC:     <miquel.raynal@...tlin.com>, <richard@....at>, <vigneshr@...com>,
        <jani.nurminen@...driver.com>, <adrian.zaharia@...driver.com>,
        <linux-kernel@...r.kernel.org>, <stable@...r.kernel.org>
Subject: [PATCH 1/1] mtd: mtdpart: Fix cosmetic print

From: Jani Nurminen <jani.nurminen@...driver.com>

The print of the MTD partitions during boot are off-by-one for the size.
Fix this and show the real last offset.

Fixes: 3d6f657ced2b ("mtd: mtdpart: Fix cosmetic print")
Signed-off-by: Jani Nurminen <jani.nurminen@...driver.com>
Signed-off-by: Adrian Zaharia <Adrian.Zaharia@...driver.com>
---
 drivers/mtd/mtdpart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index d442fa94c872..fab10e6d4171 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -118,7 +118,7 @@ static struct mtd_info *allocate_partition(struct mtd_info *parent,
 		child->part.size = parent_size - child->part.offset;
 
 	printk(KERN_NOTICE "0x%012llx-0x%012llx : \"%s\"\n",
-	       child->part.offset, child->part.offset + child->part.size,
+	       child->part.offset, child->part.offset + child->part.size - 1,
 	       child->name);
 
 	/* let's do some sanity checks */
-- 
2.37.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ