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: <1427405861.29730.5.camel@theros.lm.intel.com>
Date:	Thu, 26 Mar 2015 15:37:41 -0600
From:	Ross Zwisler <ross.zwisler@...ux.intel.com>
To:	Christoph Hellwig <hch@....de>
Cc:	Dan Williams <dan.j.williams@...el.com>,
	Jens Axboe <axboe@...nel.dk>,
	linux-nvdimm <linux-nvdimm@...1.01.org>, X86 ML <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [Linux-nvdimm] [PATCH 1/3] pmem: Initial version of persistent
 memory driver

On Thu, 2015-03-26 at 15:35 +0100, Christoph Hellwig wrote:
> On Thu, Mar 26, 2015 at 07:12:23AM -0700, Dan Williams wrote:
> > > +       struct resource *res_mem;
> > > +       int err;
> > > +
> > > +       res_mem = request_mem_region_exclusive(pmem->phys_addr, pmem->size,
> > > +                                              "pmem");
> > 
> > Isn't request_mem_region() enough?  i.e. it seems
> > request_mem_region_exclusive() assumes no DAX, at least in theory?
> 
> This is 1:1 from the patch Ross sent, but I've been wondering why
> request_mem_region_exclusive is used here.  All it does is setting the
> IORESOURCE_EXCLUSIVE flag, which prevents /dev/mem and sysfs from accessing
> the memory while the driver claims it. Besides pmem only a watchdog driver
> and e1000 make use of this flag, and there's various function related to
> it that are entirely unused.  It's a weird beast.

I don't have a compelling reason to use request_mem_region_exclusive()
over request_mem_region().  If the latter is cleaner I'm fine with the
change.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ