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, 11 Dec 2007 21:40:30 -0500
From:	Trond Myklebust <trond.myklebust@....uio.no>
To:	"Berkhan, Enrik (GE Infra, Oil & Gas)" <enrik.berkhan@...com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] fix 2.6.24-rc1 nfs_file_mmap change for NOMMU


On Sun, 2007-12-09 at 19:52 +0100, Berkhan, Enrik (GE Infra, Oil & Gas)
wrote:
> - generic_file_mmap returns -ENOSYS for NOMMU systems; replicate this
>   behaviour
> 
> Signed-off-by: Enrik Berkhan <Enrik.Berkhan@...com>
> ---
>  fs/nfs/file.c |    4 ++++
>  1 files changed, 4 insertions(+)
> 
> Index: fs/nfs/file.c
> ===================================================================
> --- fs/nfs/file.c.orig	2007-12-05 09:48:59.000000000 +0100
> +++ fs/nfs/file.c	2007-12-05 09:49:56.000000000 +0100
> @@ -283,7 +283,11 @@ nfs_file_mmap(struct file * file, struct
>  	if (!status) {
>  		vma->vm_ops = &nfs_file_vm_ops;
>  		vma->vm_flags |= VM_CAN_NONLINEAR;
> +#ifdef CONFIG_MMU
>  		file_accessed(file);
> +#else
> +		return -ENOSYS;
> +#endif
>  	}
>  	return status;
>  }

Why do that after going through the process of revalidating the inode
etc.? Just replace nfs_file_mmap() with a function returning ENOSYS in
the case of CONFIG_MMU.

Better still, in the case of CONFIG_MMU, instead of having an
nfs_file_mmap(), just replace the .mmap field in nfs_file_operations
with a call to generic_file_mmap().

Trond

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