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: <70a24c20-d7ee-064c-e863-9f012422a2f5@fujitsu.com>
Date:   Fri, 21 Jan 2022 10:33:58 +0800
From:   Shiyang Ruan <ruansy.fnst@...itsu.com>
To:     Christoph Hellwig <hch@...radead.org>
CC:     <linux-kernel@...r.kernel.org>, <linux-xfs@...r.kernel.org>,
        <nvdimm@...ts.linux.dev>, <linux-mm@...ck.org>,
        <linux-fsdevel@...r.kernel.org>, <djwong@...nel.org>,
        <dan.j.williams@...el.com>, <david@...morbit.com>,
        <jane.chu@...cle.com>
Subject: Re: [PATCH v9 10/10] fsdax: set a CoW flag when associate reflink
 mappings



在 2022/1/20 16:59, Christoph Hellwig 写道:
> On Sun, Dec 26, 2021 at 10:34:39PM +0800, Shiyang Ruan wrote:
>> +#define FS_DAX_MAPPING_COW	1UL
>> +
>> +#define MAPPING_SET_COW(m)	(m = (struct address_space *)FS_DAX_MAPPING_COW)
>> +#define MAPPING_TEST_COW(m)	(((unsigned long)m & FS_DAX_MAPPING_COW) == \
>> +					FS_DAX_MAPPING_COW)
> 
> These really should be inline functions and probably use lower case
> names.

OK.

> 
> But different question, how does this not conflict with:
> 
> #define PAGE_MAPPING_ANON       0x1
> 
> in page-flags.h?

Now we are treating dax pages, so I think its flags should be different 
from normal page.  In another word, PAGE_MAPPING_ANON is a flag of rmap 
mechanism for normal page, it doesn't work for dax page.  And now, we 
have dax rmap for dax page.  So, I think this two kinds of flags are 
supposed to be used in different mechanisms and won't conflect.

> 
> Either way I think this flag should move to page-flags.h and be
> integrated with the PAGE_MAPPING_FLAGS infrastucture.

And that's why I keep them in this dax.c file.


--
Thanks,
Ruan.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ