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: <8f9a33bc-f4ae-0cc7-3db6-a516f246ed14@oracle.com>
Date:   Wed, 6 Apr 2022 17:33:54 +0000
From:   Jane Chu <jane.chu@...cle.com>
To:     Christoph Hellwig <hch@...radead.org>
CC:     "david@...morbit.com" <david@...morbit.com>,
        "djwong@...nel.org" <djwong@...nel.org>,
        "dan.j.williams@...el.com" <dan.j.williams@...el.com>,
        "vishal.l.verma@...el.com" <vishal.l.verma@...el.com>,
        "dave.jiang@...el.com" <dave.jiang@...el.com>,
        "agk@...hat.com" <agk@...hat.com>,
        "snitzer@...hat.com" <snitzer@...hat.com>,
        "dm-devel@...hat.com" <dm-devel@...hat.com>,
        "ira.weiny@...el.com" <ira.weiny@...el.com>,
        "willy@...radead.org" <willy@...radead.org>,
        "vgoyal@...hat.com" <vgoyal@...hat.com>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "nvdimm@...ts.linux.dev" <nvdimm@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-xfs@...r.kernel.org" <linux-xfs@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH v7 6/6] pmem: implement pmem_recovery_write()

On 4/5/2022 10:21 PM, Christoph Hellwig wrote:
> On Tue, Apr 05, 2022 at 01:47:47PM -0600, Jane Chu wrote:
>> +	off = (unsigned long)addr & ~PAGE_MASK;
> 
> offset_inpage()
> 
>> +	if (off || !(PAGE_ALIGNED(bytes))) {
> 
> No need for the inner braces.
> 
>> +	mutex_lock(&pmem->recovery_lock);
>> +	pmem_off = PFN_PHYS(pgoff) + pmem->data_offset;
>> +	cleared = __pmem_clear_poison(pmem, pmem_off, len);
>> +	if (cleared > 0 && cleared < len) {
>> +		dev_warn(dev, "poison cleared only %ld out of %lu\n",
>> +			cleared, len);
>> +		mutex_unlock(&pmem->recovery_lock);
>> +		return 0;
>> +	} else if (cleared < 0) {
> 
> No need for an else after a return.


Agreed, will reflect your comments in next rev.

thanks!
-jane

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ