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]
Date:	Tue, 04 Nov 2014 12:37:41 +0200
From:	Boaz Harrosh <boaz@...xistor.com>
To:	"Wilcox, Matthew R" <matthew.r.wilcox@...el.com>,
	"Elliott, Robert (Server Storage)" <Elliott@...com>,
	Ross Zwisler <ross.zwisler@...ux.intel.com>,
	Jens Axboe <axboe@...nel.dk>, Nick Piggin <npiggin@...nel.dk>,
	"Kani, Toshimitsu" <toshi.kani@...com>,
	"Knippers, Linda" <linda.knippers@...com>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
	Matthew Wilcox <willy@...ux.intel.com>
Subject: Re: [PATCH 1/4] pmem: Initial version of persistent memory driver

On 11/03/2014 06:19 PM, Wilcox, Matthew R wrote:
<>
>>> +config BLK_DEV_PMEM_COUNT
>>> +	int "Default number of PMEM disks"
>>> +	default "4"
>>
>> For real use I think a default of 1 would be better.
> 
> For real use, you need at least two to run xfstests.  This whole configuration mechanism is going away soon anyway.
> 
>>> +	size_t page_offset = sector >> PAGE_SECTORS_SHIFT;
>>> +	size_t offset = page_offset << PAGE_SHIFT;
>>> +
>>
>> Since page_offset is only used to calculate offset, they
>> could be joined to avoid relying on the compiler to
>> optimize it away:
>> 	size_t offset = sector >> PAGE_SECTORS_SHIFT << PAGE_SHIFT;
> 
> If you insist on doing the compiler's job for it, why not:
> 
> 	size_t offset = sector >> (PAGE_SECTORS_SHIFT - PAGE_SHIFT);
> 
> I actually think the original is clearer.
> 

I wish you guys would actually review the correct code.

In the actual good driver that has any shape of proper code all these issue
are gone.

* config defaults gone, multiple-devices multiple-memory ranges fully supported
  hot plug style.
* above shifts cruft completely gone it is left overs from brd.c and
  its page usage.
* getgeo fixed to do what we realy want by the only application on earth
  that still uses it, fdisk. All other partitioners do not call it at all.

Why are we reviewing dead code ?

Cheers
Boaz

--
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