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:	Wed, 23 Jul 2014 09:55:14 -0400
From:	Matthew Wilcox <willy@...ux.intel.com>
To:	"Kirill A. Shutemov" <kirill@...temov.name>
Cc:	Matthew Wilcox <matthew.r.wilcox@...el.com>,
	linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 10/22] Replace the XIP page fault handler with the DAX
 page fault handler

On Wed, Jul 23, 2014 at 03:10:25PM +0300, Kirill A. Shutemov wrote:
> > +int dax_fault(struct vm_area_struct *vma, struct vm_fault *vmf,
> > +			get_block_t get_block)
> > +{
> > +	int result;
> > +	struct super_block *sb = file_inode(vma->vm_file)->i_sb;
> > +
> > +	if (vmf->flags & FAULT_FLAG_WRITE) {
> 
> Nobody seems calls sb_start_pagefault() in fault handler.
> Do you mean FAULT_FLAG_MKWRITE?

We need to call sb_start_pagefault() if we're going to make a modification
to the filesystem.  Admittedly, we don't know if we're going to make a
modification at this point, but if we're taking a write fault on a hole,
we will be.  We can skip the call to sb_start_pagefault() if we're taking
a read fault.

> > +int dax_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
> > +			get_block_t get_block)
> > +{
> > +	return dax_fault(vma, vmf, get_block);
> > +}
> > +EXPORT_SYMBOL_GPL(dax_mkwrite);
> 
> I don't think we want to introduce new exported symbol just for dummy
> wrapper. Just use ".page_mkwrite = foo_fault,". perf and selinux do
> this.
> Or add #define into header file if you want better readability.

They were different at one time ... agreed, I can just make them an alias
for now.
--
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