Index: linux-2.6.26/fs/exec.c =================================================================== --- linux-2.6.26.orig/fs/exec.c +++ linux-2.6.26/fs/exec.c @@ -690,6 +690,14 @@ struct file *open_exec(const char *name) if (IS_ERR(file)) return file; + if (file->f_op && file->f_op->open_exec) { + err = file->f_op->open_exec(nd.path.dentry->d_inode); + if (err) { + fput(file); + goto out; + } + } + err = deny_write_access(file); if (err) { fput(file); Index: linux-2.6.26/fs/Kconfig =================================================================== --- linux-2.6.26.orig/fs/Kconfig +++ linux-2.6.26/fs/Kconfig @@ -538,6 +538,25 @@ config INOTIFY_USER If unsure, say Y. +config DMAPI + tristate "DMAPI support" + help + The Data Management API is a system interface used to implement + the interface defined in the X/Open document: + "Systems Management: Data Storage Management (XDSM) API", + dated February 1997. This interface is used by hierarchical + storage management systems. + + If any DMAPI-capable filesystem is built into the kernel, then + DMAPI must also be built into the kernel. + +config DMAPI_DEBUG + bool "DMAPI debugging support" + depends on DMAPI + help + If you don't know whether you need it, then you don't need it: + answer N. + config QUOTA bool "Quota support" help Index: linux-2.6.26/fs/Makefile =================================================================== --- linux-2.6.26.orig/fs/Makefile +++ linux-2.6.26/fs/Makefile @@ -55,6 +55,8 @@ obj-$(CONFIG_QFMT_V1) += quota_v1.o obj-$(CONFIG_QFMT_V2) += quota_v2.o obj-$(CONFIG_QUOTACTL) += quota.o +obj-$(CONFIG_DMAPI) += dmapi/ + obj-$(CONFIG_DNOTIFY) += dnotify.o obj-$(CONFIG_PROC_FS) += proc/ Index: linux-2.6.26/include/linux/fs.h =================================================================== --- linux-2.6.26.orig/include/linux/fs.h +++ linux-2.6.26/include/linux/fs.h @@ -1259,6 +1259,8 @@ struct file_operations { int (*flock) (struct file *, int, struct file_lock *); ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); +#define HAVE_FOP_OPEN_EXEC + int (*open_exec) (struct inode *); int (*setlease)(struct file *, long, struct file_lock **); }; Index: linux-2.6.26/include/linux/mm.h =================================================================== --- linux-2.6.26.orig/include/linux/mm.h +++ linux-2.6.26/include/linux/mm.h @@ -171,6 +171,9 @@ struct vm_operations_struct { void (*close)(struct vm_area_struct * area); int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf); +#define HAVE_VMOP_MPROTECT + int (*mprotect)(struct vm_area_struct * area, unsigned int newflags); + /* notification that a previously read-only page is about to become * writable, if an error is returned it will cause a SIGBUS */ int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page); Index: linux-2.6.26/MAINTAINERS =================================================================== --- linux-2.6.26.orig/MAINTAINERS +++ linux-2.6.26/MAINTAINERS @@ -1397,6 +1397,13 @@ M: tori@unhappy.mine.nu L: netdev@vger.kernel.org S: Maintained +DMAPI +P: Silicon Graphics Inc +M: xfs-masters@oss.sgi.com +L: xfs@oss.sgi.com +W: http://oss.sgi.com/projects/xfs +S: Supported + DMA GENERIC OFFLOAD ENGINE SUBSYSTEM P: Maciej Sosnowski M: maciej.sosnowski@intel.com Index: linux-2.6.26/mm/mprotect.c =================================================================== --- linux-2.6.26.orig/mm/mprotect.c +++ linux-2.6.26/mm/mprotect.c @@ -294,6 +294,11 @@ sys_mprotect(unsigned long start, size_t if (error) goto out; + if (vma->vm_ops && vma->vm_ops->mprotect) { + error = vma->vm_ops->mprotect(vma, newflags); + if (error < 0) + goto out; + } tmp = vma->vm_end; if (tmp > end) tmp = end;