Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1427763

Re: [PATCH] x86/mm: only allow memmap=XX!YY over existing RAM

From Johannes Thumshirn <jthumshirn@suse.de>
Newsgroups linux.kernel
Subject Re: [PATCH] x86/mm: only allow memmap=XX!YY over existing RAM
Date 2016-06-21 15:40 +0200
Message-ID <rMu4h-6rf-35@gated-at.bofh.it> (permalink)
References <rM1Ym-5hV-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jun 20, 2016 at 10:33:59AM +0300, Yigal Korman wrote:
> Before this patch, passing a range that is beyond the physical memory
> range will succeed, the user will see a /dev/pmem0 and will be able to
> access it. Reads will always return 0 and writes will be silently
> ignored.
> 
> I've gotten more than one bug report about mkfs.{xfs,ext4} or nvml
> failing that were eventually tracked down to be wrong values passed to
> memmap.
> 
> This patch prevents the above issue by instead of adding a new memory
> range, only update a RAM memory range with the PRAM type. This way,
> passing the wrong memmap will either not give you a pmem at all or give
> you a smaller one that actually has RAM behind it.
> 
> And if someone still needs to fake a pmem that doesn't have RAM behind
> it, they can simply do memmap=XX@YY,XX!YY.
> 
> Signed-off-by: Yigal Korman <yigal@plexistor.com>

Acked-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86/mm: only allow memmap=XX!YY over existing RAM Yigal Korman <yigal@plexistor.com> - 2016-06-20 09:40 +0200
  Re: [PATCH] x86/mm: only allow memmap=XX!YY over existing RAM Dan Williams <dan.j.williams@intel.com> - 2016-06-20 17:50 +0200
  Re: [PATCH] x86/mm: only allow memmap=XX!YY over existing RAM Johannes Thumshirn <jthumshirn@suse.de> - 2016-06-21 15:40 +0200
  Re: [PATCH] x86/mm: only allow memmap=XX!YY over existing RAM Boaz Harrosh <boaz@plexistor.com> - 2016-06-23 14:00 +0200

csiph-web