|
From: Fred W. <fw...@us...> - 2006-01-24 04:40:39
|
Update of /cvsroot/linux-abi/linux-abi/linux-26/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2468/linux-26/include/linux Modified Files: fs.h major.h personality.h Log Message: linux-26: patch to 2.6.14, incl. audit syscalls Index: fs.h =================================================================== RCS file: /cvsroot/linux-abi/linux-abi/linux-26/include/linux/fs.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** fs.h 24 Jan 2006 00:28:19 -0000 1.3 --- fs.h 24 Jan 2006 04:40:17 -0000 1.4 *************** *** 10,13 **** --- 10,14 ---- #include <linux/limits.h> #include <linux/ioctl.h> + #include <linux/rcuref.h> /* *************** *** 70,73 **** --- 71,75 ---- #define WRITE 1 #define READA 2 /* read-ahead - don't block if no resources */ + #define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */ #define SPECIAL 4 /* For non-blockdevice requests in request queue */ #define READ_SYNC (READ | (1 << BIO_RW_SYNC)) *************** *** 214,217 **** --- 216,220 ---- #include <linux/prio_tree.h> #include <linux/init.h> + #include <linux/sched.h> #include <asm/atomic.h> *************** *** 221,224 **** --- 224,228 ---- struct iovec; struct nameidata; + struct kiocb; struct pipe_inode_info; struct poll_table_struct; *************** *** 241,245 **** unsigned long max_blocks, struct buffer_head *bh_result, int create); ! typedef void (dio_iodone_t)(struct inode *inode, loff_t offset, ssize_t bytes, void *private); --- 245,249 ---- unsigned long max_blocks, struct buffer_head *bh_result, int create); ! typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, ssize_t bytes, void *private); *************** *** 280,296 **** struct timespec ia_mtime; struct timespec ia_ctime; - unsigned int ia_attr_flags; }; /* - * This is the inode attributes flag definitions - */ - #define ATTR_FLAG_SYNCRONOUS 1 /* Syncronous write */ - #define ATTR_FLAG_NOATIME 2 /* Don't update atime */ - #define ATTR_FLAG_APPEND 4 /* Append-only file */ - #define ATTR_FLAG_IMMUTABLE 8 /* Immutable file */ - #define ATTR_FLAG_NODIRATIME 16 /* Don't update atime for directory */ - - /* * Includes for diskquotas. */ --- 284,290 ---- *************** *** 303,307 **** struct address_space; struct writeback_control; - struct kiocb; struct address_space_operations { --- 297,300 ---- *************** *** 331,334 **** --- 324,329 ---- ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, loff_t offset, unsigned long nr_segs); + struct page* (*get_xip_page)(struct address_space *, sector_t, + int); }; *************** *** 472,475 **** --- 467,475 ---- #endif + #ifdef CONFIG_INOTIFY + struct list_head inotify_watches; /* watches on this inode */ + struct semaphore inotify_sem; /* protects the watches list */ + #endif + unsigned long i_state; unsigned long dirtied_when; /* jiffies of first dirtying */ *************** *** 582,586 **** unsigned int f_flags; mode_t f_mode; - int f_error; loff_t f_pos; struct fown_struct f_owner; --- 582,585 ---- *************** *** 588,592 **** struct file_ra_state f_ra; - size_t f_maxcount; unsigned long f_version; void *f_security; --- 587,590 ---- *************** *** 601,604 **** --- 599,603 ---- #endif /* #ifdef CONFIG_EPOLL */ struct address_space *f_mapping; + struct rcu_head f_rcuhead; }; extern spinlock_t files_lock; *************** *** 606,610 **** #define file_list_unlock() spin_unlock(&files_lock); ! #define get_file(x) atomic_inc(&(x)->f_count) #define file_count(x) atomic_read(&(x)->f_count) --- 605,609 ---- #define file_list_unlock() spin_unlock(&files_lock); ! #define get_file(x) rcuref_inc(&(x)->f_count) #define file_count(x) atomic_read(&(x)->f_count) *************** *** 675,678 **** --- 674,678 ---- union { struct nfs_lock_info nfs_fl; + struct nfs4_lock_info nfs4_fl; } fl_u; }; *************** *** 690,698 **** extern int fcntl_getlk(struct file *, struct flock __user *); ! extern int fcntl_setlk(struct file *, unsigned int, struct flock __user *); #if BITS_PER_LONG == 32 extern int fcntl_getlk64(struct file *, struct flock64 __user *); ! extern int fcntl_setlk64(struct file *, unsigned int, struct flock64 __user *); #endif --- 690,700 ---- extern int fcntl_getlk(struct file *, struct flock __user *); ! extern int fcntl_setlk(unsigned int, struct file *, unsigned int, ! struct flock __user *); #if BITS_PER_LONG == 32 extern int fcntl_getlk64(struct file *, struct flock64 __user *); ! extern int fcntl_setlk64(unsigned int, struct file *, unsigned int, ! struct flock64 __user *); #endif *************** *** 821,824 **** --- 823,842 ---- wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level))) + static inline void get_fs_excl(void) + { + atomic_inc(¤t->fs_excl); + } + + static inline void put_fs_excl(void) + { + atomic_dec(¤t->fs_excl); + } + + static inline int has_fs_excl(void) + { + return atomic_read(¤t->fs_excl); + } + + /* * Superblock locking. *************** *** 826,829 **** --- 844,848 ---- static inline void lock_super(struct super_block * sb) { + get_fs_excl(); down(&sb->s_lock); } *************** *** 831,834 **** --- 850,854 ---- static inline void unlock_super(struct super_block * sb) { + put_fs_excl(); up(&sb->s_lock); } *************** *** 884,888 **** --- 904,910 ---- int (*release) (struct inode *, struct file *); int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); + long (*unlocked_ioctl) (struct file *, unsigned, unsigned long); long (*compat_ioctl) (struct file *, unsigned, unsigned long); + int (*direct_access) (struct block_device *, sector_t, unsigned long *); int (*media_changed) (struct gendisk *); int (*revalidate_disk) (struct gendisk *); *************** *** 964,969 **** struct inode *, struct dentry *); int (*readlink) (struct dentry *, char __user *,int); ! int (*follow_link) (struct dentry *, struct nameidata *); ! void (*put_link) (struct dentry *, struct nameidata *); void (*truncate) (struct inode *); int (*permission) (struct inode *, int, struct nameidata *); --- 986,991 ---- struct inode *, struct dentry *); int (*readlink) (struct dentry *, char __user *,int); ! void * (*follow_link) (struct dentry *, struct nameidata *); ! void (*put_link) (struct dentry *, struct nameidata *, void *); void (*truncate) (struct inode *); int (*permission) (struct inode *, int, struct nameidata *); *************** *** 1025,1028 **** --- 1047,1051 ---- #define I_CLEAR 32 #define I_NEW 64 + #define I_WILL_FREE 128 #define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES) *************** *** 1261,1264 **** --- 1284,1288 ---- extern int do_truncate(struct dentry *, loff_t start); + extern long do_sys_open(const char __user *filename, int flags, int mode); extern struct file *filp_open(const char *, int, int); extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); *************** *** 1370,1374 **** void *data, int force); extern sector_t bmap(struct inode *, sector_t); - extern int setattr_mask(unsigned int); extern int notify_change(struct dentry *, struct iattr *); extern int permission(struct inode *, int, struct nameidata *); --- 1394,1397 ---- *************** *** 1412,1416 **** --- 1435,1443 ---- extern int inode_needs_sync(struct inode *inode); extern void generic_delete_inode(struct inode *inode); + extern void generic_drop_inode(struct inode *inode); + extern struct inode *ilookup5_nowait(struct super_block *sb, + unsigned long hashval, int (*test)(struct inode *, void *), + void *data); extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval, int (*test)(struct inode *, void *), void *data); *************** *** 1483,1488 **** extern void file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); - extern ssize_t generic_file_direct_IO(int rw, struct kiocb *iocb, - const struct iovec *iov, loff_t offset, unsigned long nr_segs); extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov, unsigned long nr_segs, loff_t *ppos); --- 1510,1513 ---- *************** *** 1495,1498 **** --- 1520,1540 ---- extern int nonseekable_open(struct inode * inode, struct file * filp); + #ifdef CONFIG_FS_XIP + extern ssize_t xip_file_read(struct file *filp, char __user *buf, size_t len, + loff_t *ppos); + extern ssize_t xip_file_sendfile(struct file *in_file, loff_t *ppos, + size_t count, read_actor_t actor, + void *target); + extern int xip_file_mmap(struct file * file, struct vm_area_struct * vma); + extern ssize_t xip_file_write(struct file *filp, const char __user *buf, + size_t len, loff_t *ppos); + extern int xip_truncate_page(struct address_space *mapping, loff_t from); + #else + static inline int xip_truncate_page(struct address_space *mapping, loff_t from) + { + return 0; + } + #endif + static inline void do_generic_file_read(struct file * filp, loff_t *ppos, read_descriptor_t * desc, *************** *** 1552,1557 **** extern int vfs_follow_link(struct nameidata *, const char *); extern int page_readlink(struct dentry *, char __user *, int); ! extern int page_follow_link_light(struct dentry *, struct nameidata *); ! extern void page_put_link(struct dentry *, struct nameidata *); extern int page_symlink(struct inode *inode, const char *symname, int len); extern struct inode_operations page_symlink_inode_operations; --- 1594,1599 ---- extern int vfs_follow_link(struct nameidata *, const char *); extern int page_readlink(struct dentry *, char __user *, int); ! extern void *page_follow_link_light(struct dentry *, struct nameidata *); ! extern void page_put_link(struct dentry *, struct nameidata *, void *); extern int page_symlink(struct inode *inode, const char *symname, int len); extern struct inode_operations page_symlink_inode_operations; *************** *** 1670,1673 **** --- 1712,1761 ---- } + /* + * simple attribute files + * + * These attributes behave similar to those in sysfs: + * + * Writing to an attribute immediately sets a value, an open file can be + * written to multiple times. + * + * Reading from an attribute creates a buffer from the value that might get + * read with multiple read calls. When the attribute has been read + * completely, no further read calls are possible until the file is opened + * again. + * + * All attributes contain a text representation of a numeric value + * that are accessed with the get() and set() functions. + */ + #define DEFINE_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt) \ + static int __fops ## _open(struct inode *inode, struct file *file) \ + { \ + __simple_attr_check_format(__fmt, 0ull); \ + return simple_attr_open(inode, file, __get, __set, __fmt); \ + } \ + static struct file_operations __fops = { \ + .owner = THIS_MODULE, \ + .open = __fops ## _open, \ + .release = simple_attr_close, \ + .read = simple_attr_read, \ + .write = simple_attr_write, \ + }; + + static inline void __attribute__((format(printf, 1, 2))) + __simple_attr_check_format(const char *fmt, ...) + { + /* don't do anything, just let the compiler check the arguments; */ + } + + int simple_attr_open(struct inode *inode, struct file *file, + u64 (*get)(void *), void (*set)(void *, u64), + const char *fmt); + int simple_attr_close(struct inode *inode, struct file *file); + ssize_t simple_attr_read(struct file *file, char __user *buf, + size_t len, loff_t *ppos); + ssize_t simple_attr_write(struct file *file, const char __user *buf, + size_t len, loff_t *ppos); + + #ifdef CONFIG_SECURITY static inline char *alloc_secdata(void) Index: major.h =================================================================== RCS file: /cvsroot/linux-abi/linux-abi/linux-26/include/linux/major.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** major.h 24 Jan 2006 00:28:19 -0000 1.2 --- major.h 24 Jan 2006 04:40:17 -0000 1.3 *************** *** 102,105 **** --- 102,106 ---- #define SHMIQ_MAJOR 85 /* Linux/mips, SGI /dev/shmiq */ + #define SCSI_CHANGER_MAJOR 86 #define IDE6_MAJOR 88 Index: personality.h =================================================================== RCS file: /cvsroot/linux-abi/linux-abi/linux-26/include/linux/personality.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** personality.h 24 Jan 2006 00:28:19 -0000 1.3 --- personality.h 24 Jan 2006 04:40:17 -0000 1.4 *************** *** 14,19 **** extern int register_exec_domain(struct exec_domain *); extern int unregister_exec_domain(struct exec_domain *); ! extern int __set_personality(personality_t); ! /* --- 14,18 ---- extern int register_exec_domain(struct exec_domain *); extern int unregister_exec_domain(struct exec_domain *); ! extern int __set_personality(unsigned long); /* *************** *** 52,56 **** PERID_MASK = 0xff, }; ! /* * Flags for customizing the behaviour of a base personality id. --- 51,55 ---- PERID_MASK = 0xff, }; ! /* * Flags for customizing the behaviour of a base personality id. *************** *** 60,65 **** */ enum { ADDR_NO_RANDOMIZE = 0x0040000, /* disable randomization of VA space */ - #if 1 /* only for compatibilty with old code */ FDPIC_FUNCPTRS = 0x0080000, /* userspace function ptrs point to descriptors * (signal handling) --- 59,64 ---- */ enum { + #if 1 /* only for compatibilty with old code */ ADDR_NO_RANDOMIZE = 0x0040000, /* disable randomization of VA space */ FDPIC_FUNCPTRS = 0x0080000, /* userspace function ptrs point to descriptors * (signal handling) *************** *** 71,87 **** SHORT_INODE = 0x1000000, WHOLE_SECONDS = 0x2000000, ! STICKY_TIMEOUTS = 0x4000000, ADDR_LIMIT_3GB = 0x8000000, #endif /* ffffffpp */ ! PERF_MMAP_PAGE_ZERO = 0x00100000, ! PERF_ADDR_COMPAT_LAYOUT = 0x00200000, ! PERF_READ_IMPLIES_EXEC = 0x00400000, ! PERF_ADDR_LIMIT_32BIT = 0x00800000, ! PERF_SHORT_INODE = 0x01000000, ! PERF_WHOLE_SECONDS = 0x02000000, ! PERF_STICKY_TIMEOUTS = 0x04000000, ! PERF_ADDR_LIMIT_3GB = 0x08000000, ! PERF_MASK = 0xFFFFFF00, }; --- 70,86 ---- SHORT_INODE = 0x1000000, WHOLE_SECONDS = 0x2000000, ! STICKY_TIMEOUTS = 0x4000000, ADDR_LIMIT_3GB = 0x8000000, #endif /* ffffffpp */ ! PERF_MMAP_PAGE_ZERO = 0x00100000, ! PERF_ADDR_COMPAT_LAYOUT = 0x00200000, ! PERF_READ_IMPLIES_EXEC = 0x00400000, ! PERF_ADDR_LIMIT_32BIT = 0x00800000, ! PERF_SHORT_INODE = 0x01000000, ! PERF_WHOLE_SECONDS = 0x02000000, ! PERF_STICKY_TIMEOUTS = 0x04000000, ! PERF_ADDR_LIMIT_3GB = 0x08000000, ! PERF_MASK = 0xFFFFFF00, }; *************** *** 101,105 **** PER_SVR3 = PERID_SVR3 | PERF_STICKY_TIMEOUTS | PERF_SHORT_INODE, PER_SCOSVR3 = PERID_SCOSVR3 | PERF_STICKY_TIMEOUTS | ! PERF_WHOLE_SECONDS | PERF_SHORT_INODE, PER_LINUX_FDPIC = 0x0000 | FDPIC_FUNCPTRS, PER_OSR5 = PERID_SCOSVR3 | PERF_STICKY_TIMEOUTS | PERF_WHOLE_SECONDS, --- 100,104 ---- PER_SVR3 = PERID_SVR3 | PERF_STICKY_TIMEOUTS | PERF_SHORT_INODE, PER_SCOSVR3 = PERID_SCOSVR3 | PERF_STICKY_TIMEOUTS | ! PERF_WHOLE_SECONDS | PERF_SHORT_INODE, PER_LINUX_FDPIC = 0x0000 | FDPIC_FUNCPTRS, PER_OSR5 = PERID_SCOSVR3 | PERF_STICKY_TIMEOUTS | PERF_WHOLE_SECONDS, *************** *** 135,141 **** const char *name; /* name of the execdomain */ handler_t handler; /* handler for syscalls */ ! per_id_t pers_low; /* lowest personality id for this execdomain */ ! per_id_t pers_high; /* highest personality id for this execdomain */ ! unsigned long *signal_map; /* signal mapping */ unsigned long *signal_invmap; /* reverse signal mapping */ struct map_segment *err_map; /* error mapping */ --- 134,140 ---- const char *name; /* name of the execdomain */ handler_t handler; /* handler for syscalls */ ! per_id_t pers_low; /* lowest personality id for this execdomain */ ! per_id_t pers_high; /* highest personality id for this execdomain */ ! unsigned long *signal_map; /* signal mapping */ unsigned long *signal_invmap; /* reverse signal mapping */ struct map_segment *err_map; /* error mapping */ *************** *** 162,176 **** * Personality of the currently running process. */ ! #define get_cur_personality() (current->personality) /* * Return the base personality id of current process. */ ! #define get_cur_personality_id() get_personality_id(get_cur_personality()) /* * Return the flags of the personality of current process. */ ! #define get_cur_personality_flags() get_personality_flags(get_cur_personality()) /* --- 161,175 ---- * Personality of the currently running process. */ ! #define get_cur_personality() (current->personality) /* * Return the base personality id of current process. */ ! #define get_cur_personality_id() get_personality_id(get_cur_personality()) /* * Return the flags of the personality of current process. */ ! #define get_cur_personality_flags() get_personality_flags(get_cur_personality()) /* |