The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-123.1.2.vz7.5.5 ------> commit 8304c77c69430cd34af8c2a349c90feaa4b3ab08 Author: Vladimir Davydov <vdavy...@parallels.com> Date: Tue May 26 18:52:26 2015 +0400
cpt: Unexport everything CPT-related No more CPT in kernel. Hopefully, I haven't missed anything. [This patch reverts parts of commit 1da9426dc5c49] khorenko@: online migration has not been dropped, it will be done via CRIU. Signed-off-by: Vladimir Davydov <vdavy...@parallels.com> --- arch/x86/include/asm/tlbflush.h | 1 - arch/x86/kernel/ldt.c | 1 - arch/x86/mm/tlb.c | 1 - arch/x86/vdso/vdso32-setup.c | 3 +-- fs/aio.c | 7 ++---- fs/file.c | 5 +--- fs/filesystems.c | 1 - fs/locks.c | 1 - fs/namei.c | 3 --- fs/open.c | 2 -- fs/pipe.c | 1 - fs/select.c | 3 +-- fs/splice.c | 1 - fs/super.c | 3 --- include/linux/aio.h | 4 ---- include/linux/futex.h | 1 - include/linux/huge_mm.h | 1 - include/linux/mm.h | 5 +--- include/linux/poll.h | 1 - include/linux/sched.h | 2 -- include/net/addrconf.h | 6 ----- include/net/tcp.h | 5 ---- ipc/util.c | 1 - kernel/exit.c | 6 +---- kernel/fork.c | 5 +--- kernel/futex.c | 6 ++--- kernel/hrtimer.c | 1 - kernel/posix-cpu-timers.c | 1 - kernel/sched/core.c | 1 - kernel/signal.c | 7 ++---- kernel/user.c | 2 -- mm/fremap.c | 1 - mm/init-mm.c | 1 - mm/memory.c | 48 ++++++++------------------------------- mm/mlock.c | 2 -- mm/mmap.c | 4 +--- mm/mprotect.c | 1 - mm/nommu.c | 1 - mm/rmap.c | 4 ---- mm/swapfile.c | 4 ---- net/ipv4/devinet.c | 9 +++----- net/ipv4/tcp_ipv4.c | 4 +--- net/ipv6/addrconf.c | 3 +-- net/ipv6/mcast.c | 1 - net/ipv6/tcp_ipv6.c | 9 +++----- security/integrity/ima/ima_main.c | 1 - 46 files changed, 32 insertions(+), 149 deletions(-) diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h index b6914e0..50a7fc0 100644 --- a/arch/x86/include/asm/tlbflush.h +++ b/arch/x86/include/asm/tlbflush.h @@ -100,7 +100,6 @@ static inline void flush_tlb_page(struct vm_area_struct *vma, if (vma->vm_mm == current->active_mm) __flush_tlb_one(addr); } -EXPORT_SYMBOL(flush_tlb_page); static inline void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c index b654ee4..79aa97d 100644 --- a/arch/x86/kernel/ldt.c +++ b/arch/x86/kernel/ldt.c @@ -120,7 +120,6 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm) } return retval; } -EXPORT_SYMBOL(init_new_context); /* * No need to lock the MM as we are the last user diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 9aab73e..459590c 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -227,7 +227,6 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long start) preempt_enable(); } -EXPORT_SYMBOL(flush_tlb_page); static void do_flush_tlb_all(void *info) { diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c index 9775d58..0faad64 100644 --- a/arch/x86/vdso/vdso32-setup.c +++ b/arch/x86/vdso/vdso32-setup.c @@ -193,8 +193,7 @@ static __init void relocate_vdso(Elf32_Ehdr *ehdr) } } -struct page *vdso32_pages[1]; -EXPORT_SYMBOL(vdso32_pages); +static struct page *vdso32_pages[1]; #ifdef CONFIG_X86_64 diff --git a/fs/aio.c b/fs/aio.c index 04fc50e..715eb75 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -115,16 +115,13 @@ struct kioctx { }; /*------ sysctl variables----*/ -DEFINE_SPINLOCK(aio_nr_lock); -EXPORT_SYMBOL(aio_nr_lock); +static DEFINE_SPINLOCK(aio_nr_lock); unsigned long aio_nr; /* current system wide number of aio requests */ -EXPORT_SYMBOL(aio_nr); unsigned long aio_max_nr = 0x10000; /* system wide maximum number of aio requests */ /*----end sysctl variables---*/ static struct kmem_cache *kiocb_cachep; -struct kmem_cache *kioctx_cachep; -EXPORT_SYMBOL(kioctx_cachep); +static struct kmem_cache *kioctx_cachep; static struct vfsmount *aio_mnt; diff --git a/fs/file.c b/fs/file.c index 7bbbb42..4a78f98 100644 --- a/fs/file.c +++ b/fs/file.c @@ -141,7 +141,7 @@ out: * Return <0 error code on error; 1 on successful completion. * The files->file_lock should be held on entry, and will be held on exit. */ -int expand_fdtable(struct files_struct *files, int nr) +static int expand_fdtable(struct files_struct *files, int nr) __releases(files->file_lock) __acquires(files->file_lock) { @@ -177,7 +177,6 @@ int expand_fdtable(struct files_struct *files, int nr) } return 1; } -EXPORT_SYMBOL(expand_fdtable); /* * Expand files. @@ -413,7 +412,6 @@ void put_files_struct(struct files_struct *files) kmem_cache_free(files_cachep, files); } } -EXPORT_SYMBOL_GPL(put_files_struct); void reset_files_struct(struct files_struct *files) { @@ -892,7 +890,6 @@ SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd) } return sys_dup3(oldfd, newfd, 0); } -EXPORT_SYMBOL(sys_dup2); SYSCALL_DEFINE1(dup, unsigned int, fildes) { diff --git a/fs/filesystems.c b/fs/filesystems.c index 0e80c0b..beaba56 100644 --- a/fs/filesystems.c +++ b/fs/filesystems.c @@ -52,7 +52,6 @@ static struct file_system_type **find_filesystem(const char *name, unsigned len) break; return p; } -EXPORT_SYMBOL(put_filesystem); /** * register_filesystem - register a new filesystem diff --git a/fs/locks.c b/fs/locks.c index 16b607d..5715ef7 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -1865,7 +1865,6 @@ SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) out: return error; } -EXPORT_SYMBOL(sys_flock); /** * vfs_test_lock - test file byte range lock diff --git a/fs/namei.c b/fs/namei.c index b62c93d..7bea210 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2553,7 +2553,6 @@ int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, fsnotify_create(dir, dentry); return error; } -EXPORT_SYMBOL(sys_mknod); static int may_open(struct path *path, int acc_mode, int flag) { @@ -3493,7 +3492,6 @@ SYSCALL_DEFINE2(mkdir, const char __user *, pathname, umode_t, mode) { return sys_mkdirat(AT_FDCWD, pathname, mode); } -EXPORT_SYMBOL(sys_mkdir); /* * The dentry_unhash() helper will try to drop the dentry early: we @@ -3617,7 +3615,6 @@ SYSCALL_DEFINE1(rmdir, const char __user *, pathname) { return do_rmdir(AT_FDCWD, pathname); } -EXPORT_SYMBOL(sys_rmdir); /** * vfs_unlink - unlink a filesystem object diff --git a/fs/open.c b/fs/open.c index 0e68948..f0e659b 100644 --- a/fs/open.c +++ b/fs/open.c @@ -569,7 +569,6 @@ retry_deleg: } return error; } -EXPORT_SYMBOL(sys_chown); SYSCALL_DEFINE5(fchownat, int, dfd, const char __user *, filename, uid_t, user, gid_t, group, int, flag) @@ -995,7 +994,6 @@ SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode) return do_sys_open(AT_FDCWD, filename, flags, mode); } -EXPORT_SYMBOL(sys_open); SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, umode_t, mode) diff --git a/fs/pipe.c b/fs/pipe.c index fb42d8a..0e0752e 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -956,7 +956,6 @@ static int __do_pipe_flags(int *fd, struct file **files, int flags) fput(files[1]); return error; } -EXPORT_SYMBOL(do_pipe_flags); int do_pipe_flags(int *fd, int flags) { diff --git a/fs/select.c b/fs/select.c index 709da67..739320d 100644 --- a/fs/select.c +++ b/fs/select.c @@ -932,7 +932,7 @@ out_fds: return err; } -long do_restart_poll(struct restart_block *restart_block) +static long do_restart_poll(struct restart_block *restart_block) { struct pollfd __user *ufds = restart_block->poll.ufds; int nfds = restart_block->poll.nfds; @@ -953,7 +953,6 @@ long do_restart_poll(struct restart_block *restart_block) } return ret; } -EXPORT_SYMBOL(do_restart_poll); SYSCALL_DEFINE3(poll, struct pollfd __user *, ufds, unsigned int, nfds, int, timeout_msecs) diff --git a/fs/splice.c b/fs/splice.c index 698f2b0..49aabc2 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1325,7 +1325,6 @@ long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, return ret; } -EXPORT_SYMBOL(do_splice_direct); static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, diff --git a/fs/super.c b/fs/super.c index e3ff0bf..bf3a8c1 100644 --- a/fs/super.c +++ b/fs/super.c @@ -38,9 +38,7 @@ LIST_HEAD(super_blocks); -EXPORT_SYMBOL(super_blocks); DEFINE_SPINLOCK(sb_lock); -EXPORT_SYMBOL(sb_lock); static char *sb_writers_name[SB_FREEZE_LEVELS] = { "sb_writers", @@ -730,7 +728,6 @@ rescan: spin_unlock(&sb_lock); return NULL; } -EXPORT_SYMBOL(user_get_super); /** * do_remount_sb - asks filesystem to change mount options. diff --git a/include/linux/aio.h b/include/linux/aio.h index 5bb26ee..a2f6172 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h @@ -88,10 +88,6 @@ static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp) }; } -extern spinlock_t aio_nr_lock; -extern unsigned long aio_nr; -extern struct kmem_cache *kioctx_cachep; - /* prototypes */ #ifdef CONFIG_AIO extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb); diff --git a/include/linux/futex.h b/include/linux/futex.h index 7735765..b0d95ca 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h @@ -11,7 +11,6 @@ union ktime; long do_futex(u32 __user *uaddr, int op, u32 val, union ktime *timeout, u32 __user *uaddr2, u32 val2, u32 val3); -extern long futex_wait_restart(struct restart_block *restart); extern int handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi); diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index db96509..d57875e 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h @@ -95,7 +95,6 @@ extern bool is_vma_temporary_stack(struct vm_area_struct *vma); extern unsigned long transparent_hugepage_flags; extern int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, pmd_t *dst_pmd, pmd_t *src_pmd, - struct vm_area_struct *dst_vma, struct vm_area_struct *vma, unsigned long addr, unsigned long end); extern int split_huge_page_to_list(struct page *page, struct list_head *list); diff --git a/include/linux/mm.h b/include/linux/mm.h index f641f9f..ecde5be 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1054,9 +1054,7 @@ int walk_page_range(unsigned long addr, unsigned long end, void free_pgd_range(struct mmu_gather *tlb, unsigned long addr, unsigned long end, unsigned long floor, unsigned long ceiling); int copy_page_range(struct mm_struct *dst, struct mm_struct *src, - struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma); -int __copy_page_range(struct vm_area_struct *dst_vma, struct vm_area_struct *vma, - unsigned long addr, size_t size); + struct vm_area_struct *vma); void unmap_mapping_range(struct address_space *mapping, loff_t const holebegin, loff_t const holelen, int even_cows); int follow_pfn(struct vm_area_struct *vma, unsigned long address, @@ -1858,7 +1856,6 @@ unsigned long change_prot_numa(struct vm_area_struct *vma, unsigned long start, unsigned long end); #endif -extern const struct vm_operations_struct special_mapping_vmops; struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr); int remap_pfn_range(struct vm_area_struct *, unsigned long addr, unsigned long pfn, unsigned long size, pgprot_t); diff --git a/include/linux/poll.h b/include/linux/poll.h index 3fd1bda..c08386f 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h @@ -92,7 +92,6 @@ struct poll_wqueues { struct poll_table_entry inline_entries[N_INLINE_POLL_ENTRIES]; }; -extern long do_restart_poll(struct restart_block *restart_block); extern void poll_initwait(struct poll_wqueues *pwq); extern void poll_freewait(struct poll_wqueues *pwq); extern int poll_schedule_timeout(struct poll_wqueues *pwq, int state, diff --git a/include/linux/sched.h b/include/linux/sched.h index 7a3b793..edca7b8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2166,7 +2166,6 @@ static inline int dequeue_signal_lock(struct task_struct *tsk, sigset_t *mask, s return ret; } -extern struct kmem_cache *sigqueue_cachep; extern void block_all_signals(int (*notifier)(void *priv), void *priv, sigset_t *mask); extern void unblock_all_signals(void); @@ -2288,7 +2287,6 @@ extern void flush_itimer_signals(void); extern void do_group_exit(int); extern int allow_signal(int); -extern void exit_mm(struct task_struct *); extern int disallow_signal(int); extern int do_execve(const char *, diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 6f43f44..9795843 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -355,10 +355,4 @@ int if6_proc_init(void); void if6_proc_exit(void); #endif -int inet6_addr_add(struct net *net, int ifindex, - const struct in6_addr *pfx, - const struct in6_addr *peer_pfx, - unsigned int plen, __u32 ifa_flags, - __u32 prefered_lft, __u32 valid_lft); - #endif diff --git a/include/net/tcp.h b/include/net/tcp.h index f89f146..cf81c63 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1602,11 +1602,6 @@ struct tcp_request_sock_ops { #endif }; -#ifdef CONFIG_TCP_MD5SIG -extern const struct tcp_request_sock_ops tcp_request_sock_ipv4_ops; -extern const struct tcp_request_sock_ops tcp_request_sock_ipv6_ops; -#endif - extern int tcpv4_offload_init(void); extern void tcp_v4_init(void); extern void tcp_init(void); diff --git a/ipc/util.c b/ipc/util.c index 721a9e0..795e05f 100644 --- a/ipc/util.c +++ b/ipc/util.c @@ -692,7 +692,6 @@ struct kern_ipc_perm *ipc_obtain_object_check(struct ipc_ids *ids, int id) out: return out; } -EXPORT_SYMBOL(ipc_lock); /** * ipcget - Common sys_*get() code diff --git a/kernel/exit.c b/kernel/exit.c index bbfd54d..52ce91e 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -62,8 +62,6 @@ #include <asm/pgtable.h> #include <asm/mmu_context.h> -void exit_mm(struct task_struct * tsk); - static void __unhash_process(struct task_struct *p, bool group_dead) { nr_threads--; @@ -458,7 +456,7 @@ assign_new_owner: * Turn us into a lazy TLB process if we * aren't already.. */ -void exit_mm(struct task_struct * tsk) +static void exit_mm(struct task_struct * tsk) { struct mm_struct *mm = tsk->mm; struct core_state *core_state; @@ -509,7 +507,6 @@ void exit_mm(struct task_struct * tsk) mm_update_next_owner(mm); mmput(mm); } -EXPORT_SYMBOL(exit_mm); /* * When we die, we re-parent all our children, and try to: @@ -1705,7 +1702,6 @@ SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr, return ret; } -EXPORT_SYMBOL(sys_wait4); #ifdef __ARCH_WANT_SYS_WAITPID diff --git a/kernel/fork.c b/kernel/fork.c index bf9aab4..911dcc3 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -469,7 +469,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) rb_parent = &tmp->vm_rb; mm->map_count++; - retval = copy_page_range(mm, oldmm, tmp, mpnt); + retval = copy_page_range(mm, oldmm, mpnt); if (tmp->vm_ops && tmp->vm_ops->open) tmp->vm_ops->open(tmp); @@ -518,7 +518,6 @@ static inline void mm_free_pgd(struct mm_struct *mm) #endif /* CONFIG_MMU */ __cacheline_aligned_in_smp DEFINE_SPINLOCK(mmlist_lock); -EXPORT_SYMBOL(mmlist_lock); #ifdef CONFIG_BEANCOUNTERS @@ -616,7 +615,6 @@ static void check_mm(struct mm_struct *mm) VM_BUG_ON(mm->pmd_huge_pte); #endif } -EXPORT_SYMBOL(mm_alloc); /* * Allocate and initialize an mm_struct. @@ -688,7 +686,6 @@ void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file) fput(mm->exe_file); mm->exe_file = new_exe_file; } -EXPORT_SYMBOL(set_mm_exe_file); struct file *get_mm_exe_file(struct mm_struct *mm) { diff --git a/kernel/futex.c b/kernel/futex.c index dc96181..2d8b8b3 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -1844,7 +1844,7 @@ handle_fault: goto retry; } -long futex_wait_restart(struct restart_block *restart); +static long futex_wait_restart(struct restart_block *restart); /** * fixup_owner() - Post lock pi_state and corner case management @@ -2111,7 +2111,7 @@ out: } -long futex_wait_restart(struct restart_block *restart) +static long futex_wait_restart(struct restart_block *restart) { u32 __user *uaddr = restart->futex.uaddr; ktime_t t, *tp = NULL; @@ -2125,7 +2125,7 @@ long futex_wait_restart(struct restart_block *restart) return (long)futex_wait(uaddr, restart->futex.flags, restart->futex.val, tp, restart->futex.bitset); } -EXPORT_SYMBOL(futex_wait_restart); + /* * Userspace tried a 0 -> TID atomic transition of the futex value diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 76f02f9..c9ed1e6 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -1603,7 +1603,6 @@ out: destroy_hrtimer_on_stack(&t.timer); return ret; } -EXPORT_SYMBOL(hrtimer_nanosleep_restart); long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp, const enum hrtimer_mode mode, const clockid_t clockid) diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index 81a43c0..725e4f9 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c @@ -1431,7 +1431,6 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clock_idx, out: posix_cpu_timer_kick_nohz(); } -EXPORT_SYMBOL(set_process_cpu_timer); static int do_cpu_nanosleep(const clockid_t which_clock, int flags, struct timespec *rqtp, struct itimerspec *it) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 38cf09e..efc069e 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1350,7 +1350,6 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state) return ncsw; } -EXPORT_SYMBOL(wait_task_inactive); /*** * kick_process - kick a running thread to enter/exit the kernel diff --git a/kernel/signal.c b/kernel/signal.c index 9cc44d0..357f164 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -50,8 +50,7 @@ * SLAB caches for signal bits. */ -struct kmem_cache *sigqueue_cachep; -EXPORT_SYMBOL(sigqueue_cachep); +static struct kmem_cache *sigqueue_cachep; static inline int is_si_special(const struct siginfo *info); int print_fatal_signals __read_mostly; @@ -153,7 +152,7 @@ static inline int has_pending_signals(sigset_t *signal, sigset_t *blocked) #define PENDING(p,b) has_pending_signals(&(p)->signal, (b)) -int recalc_sigpending_tsk(struct task_struct *t) +static int recalc_sigpending_tsk(struct task_struct *t) { if ((t->jobctl & JOBCTL_PENDING_MASK) || PENDING(&t->pending, &t->blocked) || @@ -168,7 +167,6 @@ int recalc_sigpending_tsk(struct task_struct *t) */ return 0; } -EXPORT_SYMBOL(recalc_sigpending_tsk); /* * After recalculating TIF_SIGPENDING, we need to make sure the task wakes up. @@ -740,7 +738,6 @@ void signal_wake_up_state(struct task_struct *t, unsigned int state) if (!wake_up_state(t, state | TASK_INTERRUPTIBLE)) kick_process(t); } -EXPORT_SYMBOL(signal_wake_up); /* * Remove signals in mask from the pending set and queue. diff --git a/kernel/user.c b/kernel/user.c index 88c5b2d..02a5985 100644 --- a/kernel/user.c +++ b/kernel/user.c @@ -206,7 +206,6 @@ struct user_struct *alloc_uid(kuid_t uid) out_unlock: return NULL; } -EXPORT_SYMBOL(alloc_uid); static int __init uid_cache_init(void) { @@ -225,6 +224,5 @@ static int __init uid_cache_init(void) return 0; } -EXPORT_SYMBOL(free_uid); module_init(uid_cache_init); diff --git a/mm/fremap.c b/mm/fremap.c index 55435b0..adc52e3 100644 --- a/mm/fremap.c +++ b/mm/fremap.c @@ -262,4 +262,3 @@ out: return err; } -EXPORT_SYMBOL(sys_remap_file_pages); diff --git a/mm/init-mm.c b/mm/init-mm.c index a701ad5..285b75f 100644 --- a/mm/init-mm.c +++ b/mm/init-mm.c @@ -24,4 +24,3 @@ struct mm_struct init_mm = { .mmlist = LIST_HEAD_INIT(init_mm.mmlist), INIT_MM_CONTEXT(init_mm) }; -EXPORT_SYMBOL(init_mm); diff --git a/mm/memory.c b/mm/memory.c index 5acbed3..1214542 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -391,21 +391,18 @@ void pgd_clear_bad(pgd_t *pgd) pgd_ERROR(*pgd); pgd_clear(pgd); } -EXPORT_SYMBOL(pgd_clear_bad); void pud_clear_bad(pud_t *pud) { pud_ERROR(*pud); pud_clear(pud); } -EXPORT_SYMBOL(pud_clear_bad); void pmd_clear_bad(pmd_t *pmd) { pmd_ERROR(*pmd); pmd_clear(pmd); } -EXPORT_SYMBOL(pmd_clear_bad); /* * Note: this doesn't free the actual pages themselves. That @@ -629,7 +626,6 @@ int __pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma, wait_split_huge_page(vma->anon_vma, pmd); return 0; } -EXPORT_SYMBOL(__pte_alloc); int __pte_alloc_kernel(pmd_t *pmd, unsigned long address) { @@ -830,7 +826,6 @@ check_pfn: out: return pfn_to_page(pfn); } -EXPORT_SYMBOL(vm_normal_page); /* * copy one vm_area from one task to the other. Assumes the page tables @@ -930,9 +925,7 @@ out_set_pte: #endif int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, - pmd_t *dst_pmd, pmd_t *src_pmd, - struct vm_area_struct *dst_vma, - struct vm_area_struct *vma, + pmd_t *dst_pmd, pmd_t *src_pmd, struct vm_area_struct *vma, unsigned long addr, unsigned long end) { pte_t *orig_src_pte, *orig_dst_pte; @@ -995,9 +988,7 @@ again: } static inline int copy_pmd_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, - pud_t *dst_pud, pud_t *src_pud, - struct vm_area_struct *dst_vma, - struct vm_area_struct *vma, + pud_t *dst_pud, pud_t *src_pud, struct vm_area_struct *vma, unsigned long addr, unsigned long end) { pmd_t *src_pmd, *dst_pmd; @@ -1023,16 +1014,14 @@ static inline int copy_pmd_range(struct mm_struct *dst_mm, struct mm_struct *src if (pmd_none_or_clear_bad(src_pmd)) continue; if (copy_pte_range(dst_mm, src_mm, dst_pmd, src_pmd, - dst_vma, vma, addr, next)) + vma, addr, next)) return -ENOMEM; } while (dst_pmd++, src_pmd++, addr = next, addr != end); return 0; } static inline int copy_pud_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, - pgd_t *dst_pgd, pgd_t *src_pgd, - struct vm_area_struct *dst_vma, - struct vm_area_struct *vma, + pgd_t *dst_pgd, pgd_t *src_pgd, struct vm_area_struct *vma, unsigned long addr, unsigned long end) { pud_t *src_pud, *dst_pud; @@ -1047,21 +1036,19 @@ static inline int copy_pud_range(struct mm_struct *dst_mm, struct mm_struct *src if (pud_none_or_clear_bad(src_pud)) continue; if (copy_pmd_range(dst_mm, src_mm, dst_pud, src_pud, - dst_vma, vma, addr, next)) + vma, addr, next)) return -ENOMEM; } while (dst_pud++, src_pud++, addr = next, addr != end); return 0; } -int __copy_page_range(struct vm_area_struct *dst_vma, - struct vm_area_struct *vma, - unsigned long addr, size_t size) +int copy_page_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, + struct vm_area_struct *vma) { - struct mm_struct *dst_mm = dst_vma->vm_mm; - struct mm_struct *src_mm = vma->vm_mm; pgd_t *src_pgd, *dst_pgd; unsigned long next; - unsigned long end = addr + size; + unsigned long addr = vma->vm_start; + unsigned long end = vma->vm_end; unsigned long mmun_start; /* For mmu_notifiers */ unsigned long mmun_end; /* For mmu_notifiers */ bool is_cow; @@ -1113,7 +1100,7 @@ int __copy_page_range(struct vm_area_struct *dst_vma, if (pgd_none_or_clear_bad(src_pgd)) continue; if (unlikely(copy_pud_range(dst_mm, src_mm, dst_pgd, src_pgd, - dst_vma, vma, addr, next))) { + vma, addr, next))) { ret = -ENOMEM; break; } @@ -1123,17 +1110,6 @@ int __copy_page_range(struct vm_area_struct *dst_vma, mmu_notifier_invalidate_range_end(src_mm, mmun_start, mmun_end); return ret; } -EXPORT_SYMBOL_GPL(__copy_page_range); - -int copy_page_range(struct mm_struct *dst, struct mm_struct *src, - struct vm_area_struct *dst_vma, struct vm_area_struct *vma) -{ - if (dst_vma->vm_mm != dst) - BUG(); - if (vma->vm_mm != src) - BUG(); - return __copy_page_range(dst_vma, vma, vma->vm_start, vma->vm_end-vma->vm_start); -} static unsigned long zap_pte_range(struct mmu_gather *tlb, struct vm_area_struct *vma, pmd_t *pmd, @@ -3849,7 +3825,6 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, return handle_pte_fault(mm, vma, address, pte, pmd, flags); } -EXPORT_SYMBOL(handle_mm_fault); #ifndef __PAGETABLE_PUD_FOLDED /* @@ -3874,7 +3849,6 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address) spin_unlock(&mm->page_table_lock); return 0; } -EXPORT_SYMBOL(__pud_alloc); #endif /* __PAGETABLE_PUD_FOLDED */ #ifndef __PAGETABLE_PMD_FOLDED @@ -3909,7 +3883,6 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address) spin_unlock(&mm->page_table_lock); return 0; } -EXPORT_SYMBOL(__pmd_alloc); #endif /* __PAGETABLE_PMD_FOLDED */ #if !defined(__HAVE_ARCH_GATE_AREA) @@ -4178,7 +4151,6 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, return ret; } -EXPORT_SYMBOL_GPL(access_process_vm); /* * Print the name of a VMA. diff --git a/mm/mlock.c b/mm/mlock.c index 2666c22..8dc34a8 100644 --- a/mm/mlock.c +++ b/mm/mlock.c @@ -491,7 +491,6 @@ SYSCALL_DEFINE2(mlock, unsigned long, start, size_t, len) error = __mm_populate(start, len, 0); return error; } -EXPORT_SYMBOL(sys_mlock); SYSCALL_DEFINE2(munlock, unsigned long, start, size_t, len) { @@ -504,7 +503,6 @@ SYSCALL_DEFINE2(munlock, unsigned long, start, size_t, len) up_write(¤t->mm->mmap_sem); return ret; } -EXPORT_SYMBOL(sys_munlock); static int do_mlockall(int flags) { diff --git a/mm/mmap.c b/mm/mmap.c index b908d1d..826cf37 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2540,7 +2540,6 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma, return __split_vma(mm, vma, addr, new_below); } -EXPORT_SYMBOL(split_vma); /* Munmap is split into 2 main parts -- this part which finds * what needs doing, and the areas themselves, which do the @@ -2995,11 +2994,10 @@ static void special_mapping_close(struct vm_area_struct *vma) { } -const struct vm_operations_struct special_mapping_vmops = { +static const struct vm_operations_struct special_mapping_vmops = { .close = special_mapping_close, .fault = special_mapping_fault, }; -EXPORT_SYMBOL(special_mapping_vmops); /* * Called with mm->mmap_sem held for writing. diff --git a/mm/mprotect.c b/mm/mprotect.c index b55899d..31d140f 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -462,4 +462,3 @@ out: up_write(¤t->mm->mmap_sem); return error; } -EXPORT_SYMBOL(sys_mprotect); diff --git a/mm/nommu.c b/mm/nommu.c index cb2180d..a689e16 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -1594,7 +1594,6 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma, add_vma_to_mm(mm, new); return 0; } -EXPORT_SYMBOL(split_vma); /* * shrink a VMA by removing the specified chunk from either the beginning or diff --git a/mm/rmap.c b/mm/rmap.c index fa823be..c92f05c 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -205,7 +205,6 @@ int anon_vma_prepare(struct vm_area_struct *vma) out_enomem: return -ENOMEM; } -EXPORT_SYMBOL(anon_vma_prepare); /* * This is a useful helper function for locking the anon_vma root as @@ -504,13 +503,11 @@ out: rcu_read_unlock(); return anon_vma; } -EXPORT_SYMBOL(page_lock_anon_vma_read); void page_unlock_anon_vma_read(struct anon_vma *anon_vma) { anon_vma_unlock_read(anon_vma); } -EXPORT_SYMBOL(page_unlock_anon_vma_read); /* * At what user virtual address is page expected in @vma? @@ -536,7 +533,6 @@ vma_address(struct page *page, struct vm_area_struct *vma) return address; } -EXPORT_SYMBOL(vma_address); /* * At what user virtual address is page expected in vma? diff --git a/mm/swapfile.c b/mm/swapfile.c index e2d7358..760fc42 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -48,10 +48,8 @@ static sector_t map_swap_entry(swp_entry_t, struct block_device**); DEFINE_SPINLOCK(swap_lock); static unsigned int nr_swapfiles; atomic_long_t nr_swap_pages; -EXPORT_SYMBOL(nr_swap_pages); /* protected with swap_lock. reading in vm_swap_full() doesn't need lock */ long total_swap_pages; -EXPORT_SYMBOL(total_swap_pages); static int least_priority; static atomic_t highest_priority_index = ATOMIC_INIT(-1); @@ -1349,7 +1347,6 @@ int try_to_unuse(unsigned int type, bool frontswap, mmput(start_mm); return retval; } -EXPORT_SYMBOL(free_swap_and_cache); /* * After a successful try_to_unuse, if no swap is now in use, we know @@ -2371,7 +2368,6 @@ int swap_duplicate(swp_entry_t entry) err = add_swap_count_continuation(entry, GFP_ATOMIC); return err; } -EXPORT_SYMBOL(swap_duplicate); /* * @entry: swap entry for which we allocate swap cache. diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index bb64e82..2fef948 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -192,11 +192,10 @@ static void devinet_sysctl_unregister(struct in_device *idev) /* Locks all the inet devices. */ -struct in_ifaddr *inet_alloc_ifa(void) +static struct in_ifaddr *inet_alloc_ifa(void) { return kzalloc(sizeof(struct in_ifaddr), GFP_KERNEL); } -EXPORT_SYMBOL(inet_alloc_ifa); static void inet_rcu_free_ifa(struct rcu_head *head) { @@ -228,7 +227,7 @@ void in_dev_finish_destroy(struct in_device *idev) } EXPORT_SYMBOL(in_dev_finish_destroy); -struct in_device *inetdev_init(struct net_device *dev) +static struct in_device *inetdev_init(struct net_device *dev) { struct in_device *in_dev; @@ -265,7 +264,6 @@ out_kfree: in_dev = NULL; goto out; } -EXPORT_SYMBOL(inetdev_init); static void in_dev_rcu_put(struct rcu_head *head) { @@ -482,11 +480,10 @@ static int __inet_insert_ifa(struct in_ifaddr *ifa, struct nlmsghdr *nlh, return 0; } -int inet_insert_ifa(struct in_ifaddr *ifa) +static int inet_insert_ifa(struct in_ifaddr *ifa) { return __inet_insert_ifa(ifa, NULL, 0); } -EXPORT_SYMBOL(inet_insert_ifa); static int inet_set_ifa(struct net_device *dev, struct in_ifaddr *ifa) { diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 0e990c2..ad4520c 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1263,14 +1263,12 @@ struct request_sock_ops tcp_request_sock_ops __read_mostly = { .send_reset = tcp_v4_send_reset, .syn_ack_timeout = tcp_syn_ack_timeout, }; -EXPORT_SYMBOL(tcp_request_sock_ops); #ifdef CONFIG_TCP_MD5SIG -const struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = { +static const struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = { .md5_lookup = tcp_v4_reqsk_md5_lookup, .calc_md5_hash = tcp_v4_md5_hash_skb, }; -EXPORT_SYMBOL(tcp_request_sock_ipv4_ops); #endif static bool tcp_fastopen_check(struct sock *sk, struct sk_buff *skb, diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index ba1e8ba..6481f8b 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2374,7 +2374,7 @@ err_exit: /* * Manual configuration of address on an interface */ -int inet6_addr_add(struct net *net, int ifindex, +static int inet6_addr_add(struct net *net, int ifindex, const struct in6_addr *pfx, const struct in6_addr *peer_pfx, unsigned int plen, __u32 ifa_flags, @@ -2453,7 +2453,6 @@ int inet6_addr_add(struct net *net, int ifindex, return PTR_ERR(ifp); } -EXPORT_SYMBOL(inet6_addr_add); static int inet6_addr_del(struct net *net, int ifindex, const struct in6_addr *pfx, unsigned int plen) diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 277e904..2d9d15b 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c @@ -215,7 +215,6 @@ int ipv6_sock_mc_join(struct sock *sk, int ifindex, const struct in6_addr *addr) return 0; } -EXPORT_SYMBOL(ipv6_sock_mc_join); /* * socket leave on multicast group diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 686de69..28e35ea 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -81,7 +81,7 @@ static void tcp_v6_reqsk_send_ack(struct sock *sk, struct sk_buff *skb, static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb); -const struct inet_connection_sock_af_ops ipv6_mapped; +static const struct inet_connection_sock_af_ops ipv6_mapped; static const struct inet_connection_sock_af_ops ipv6_specific; #ifdef CONFIG_TCP_MD5SIG static const struct tcp_sock_af_ops tcp_sock_ipv6_specific; @@ -714,14 +714,12 @@ struct request_sock_ops tcp6_request_sock_ops __read_mostly = { .send_reset = tcp_v6_send_reset, .syn_ack_timeout = tcp_syn_ack_timeout, }; -EXPORT_SYMBOL(tcp6_request_sock_ops); #ifdef CONFIG_TCP_MD5SIG -const struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = { +static const struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = { .md5_lookup = tcp_v6_reqsk_md5_lookup, .calc_md5_hash = tcp_v6_md5_hash_skb, }; -EXPORT_SYMBOL(tcp_request_sock_ipv6_ops); #endif static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win, @@ -1674,7 +1672,7 @@ static const struct tcp_sock_af_ops tcp_sock_ipv6_specific = { * TCP over IPv4 via INET6 API */ -const struct inet_connection_sock_af_ops ipv6_mapped = { +static const struct inet_connection_sock_af_ops ipv6_mapped = { .queue_xmit = ip_queue_xmit, .send_check = tcp_v4_send_check, .rebuild_header = inet_sk_rebuild_header, @@ -1692,7 +1690,6 @@ const struct inet_connection_sock_af_ops ipv6_mapped = { .compat_getsockopt = compat_ipv6_getsockopt, #endif }; -EXPORT_SYMBOL(ipv6_mapped); #ifdef CONFIG_TCP_MD5SIG static const struct tcp_sock_af_ops tcp_sock_ipv6_mapped_specific = { diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 51107d1..6c491a6 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c @@ -209,7 +209,6 @@ out: return -EACCES; return 0; } -EXPORT_SYMBOL(ima_counts_get); /** * ima_file_mmap - based on policy, collect/store measurement. _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel