summaryrefslogtreecommitdiff
path: root/kernel/exec_domain.c
AgeCommit message (Collapse)Author
2015-04-12Remove rest of exec domains.Richard Weinberger
It is gone from all archs, now we can remove the final bits. Signed-off-by: Richard Weinberger <richard@nod.at>
2015-04-12Remove execution domain supportRichard Weinberger
All users of exec_domain are gone, now we can get rid of that abandoned feature. To not break existing userspace we keep a dummy /proc/execdomains file which will always contain "0-0 Linux [kernel]". Signed-off-by: Richard Weinberger <richard@nod.at>
2014-06-04kernel/exec_domain.c: code clean-upFabian Frederick
Fix checkpatch warnings about EXPORT_SYMBOL and return() Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-09sys_personality: remove the bogus checks in ↵Oleg Nesterov
sys_personality()->__set_personality() path Cleanup, no functional changes. - __set_personality() always changes ->exec_domain/personality, the special case when ->exec_domain remains the same buys nothing but complicates the code. Unify both cases to simplify the code. - The -EINVAL check in sys_personality() was never right. If we assume that set_personality() can fail we should check the value it returns instead of verifying that task->personality was actually changed. Remove it. Before the previous patch it was possible to hit this case due to overflow problems, but this -EINVAL just indicated the kernel bug. OTOH, probably it makes sense to change lookup_exec_domain() to return ERR_PTR() instead of default_exec_domain if the search in exec_domains list fails, and report this error to the user-space. But this means another user-space change, and we have in-kernel users which need fixes. For example, PER_OSF4 falls into PER_MASK for unkown reason and nobody cares to register this domain. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Wenming Zhang <wezhang@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-04sys_personality: change sys_personality() to accept "unsigned int" instead ↵Oleg Nesterov
of u_long task_struct->pesonality is "unsigned int", but sys_personality() paths use "unsigned long pesonality". This means that every assignment or comparison is not right. In particular, if this argument does not fit into "unsigned int" __set_personality() changes the caller's personality and then sys_personality() returns -EINVAL. Turn this argument into "unsigned int" and avoid overflows. Obviously, this is the user-visible change, we just ignore the upper bits. But this can't break the sane application. There is another thing which can confuse the poorly written applications. User-space thinks that this syscall returns int, not long. This means that the returned value can be negative and look like the error code. But note that libc won't be confused and thus errno won't be set, and with this patch the user-space can never get -1 unless sys_personality() really fails. And, most importantly, the negative RET != -1 is only possible if that app previously called personality(RET). Pointed-out-by: Wenming Zhang <wezhang@redhat.com> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-31Get rid of indirect include of fs_struct.hAl Viro
Don't pull it in sched.h; very few files actually need it and those can include directly. sched.h itself only needs forward declaration of struct fs_struct; Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-03-31Kill unsharing fs_struct in __set_personality()Al Viro
That's a rudiment of altroot support. I.e. it should've been buried a long time ago. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-01-14[CVE-2009-0029] System call wrappers part 04Heiko Carstens
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-10-23proc: move /proc/execdomains to kernel/exec_domain.cAlexey Dobriyan
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
2008-07-26[PATCH] kill altrootAl Viro
long overdue... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-22remove CONFIG_KMOD from core kernel codeJohannes Berg
Always compile request_module when the kernel allows modules. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-18whitespace fixes: execution domainsDaniel Walker
Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-03-24[PATCH] Fix module refcount leak in __set_personality()Sergey Vlasov
If the change of personality does not lead to change of exec domain, __set_personality() returned without releasing the module reference acquired by lookup_exec_domain(). Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-07[PATCH] Lock initializer cleanup (Core)Thomas Gleixner
Kernel core files converted to use the new lock initializers. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-10-18[PATCH] add missing linux/syscalls.h includesArnd Bergmann
I found that the prototypes for sys_waitid and sys_fcntl in <linux/syscalls.h> don't match the implementation. In order to keep all prototypes in sync in the future, now include the header from each file implementing any syscall. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-09-07[PATCH] remove unused sysctls from kernel/personality.cChristoph Hellwig
These are only used by the out of tree linux-abi project, so it makes sense to define them in those modules. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-03-30[PATCH] double semicolon cleanupAlexander Stohr
This cleans up a larger amount of superfluos ";;" statements in current Linux kernel sources by converting them to the regular single ";" statments. It seems to be a common problem that at the end of a line the semicolon key is producing an echo.
2003-06-03[PATCH] C99 struct initializers for kernel filesArt Haas
2003-05-16Make request_module() take a printf-like vararg argument instead of a string.Linus Torvalds
This is what a lot of the callers really wanted.
2002-12-29[PATCH] more obsolete module API fixesChristoph Hellwig
completly remove the old try_inc_mod_count()
2002-12-29[PATCH] avoid deprecated module functions in core codeChristoph Hellwig
A second start at removing them from kernel/*.c and fs/*.c. Note that module_put is fine for a NULL argument.
2002-11-13[PATCH] module_name macroRusty Russell
Fixes crypto so it compiles with !CONFIG_MODULES, and cleans up two other cases which did #ifdef CONFIG_MODULES.
2002-11-10[PATCH] In-kernel Module LoaderRusty Russell
This is an implementation of the in-kernel module loader extending the try_inc_mod_count() primitive and making its use compulsory. This has the benifit of simplicity, and similarity to the existing scheme. To reduce the cost of the constant increments and decrements, reference counters are lockless and per-cpu. Eliminated (coming in following patches): o Modversions o Module parameters o kallsyms o EXPORT_SYMBOL_GPL and MODULE_LICENCE checks o DEVICE_TABLE support. New features: o Typesafe symbol_get/symbol_put o Single "insert this module" syscall interface allows trivial userspace. o Raceless loading and unloading You will need the trivial replacement module utilities from: http://ozlabs.org/~rusty/module-init-tools-0.6.tar.gz
2002-02-25[PATCH] Numerous address updates.Dave Jones
Updated maintainers list from Ingo's last ping, various changed email addresses in code headers.
2002-02-06[PATCH] thread information blockDavid Howells
syscall latency improvement * There's now an asm/thread_info.h header file with the basic structure def and asm offsets in it. * There's now a linux/thread_info.h header file which includes the asm version and wraps some bitops calls to make convenience functions for accessing the low-level flags. * The task_struct has had some fields removed (and some flags), and has acquired a pointer to the thread_info struct. * task_struct's are now allocated on slabs in kernel/fork.c, whereas thread_info structs are allocated at the bottom of the stack pages. * Some more convenience functions are provided at the end of linux/sched.h to access flags in other tasks (these are here because they need to access the task_struct).
2002-02-04v2.5.0.1 -> v2.5.0.2Linus Torvalds
- Greg KH: USB update - Richard Gooch: refcounting for devfs - Jens Axboe: start of new block IO layer
2002-02-04v2.4.14.2 -> v2.4.14.3Linus Torvalds
- Alan Cox: more driver merging - Al Viro: make ext2 group allocation more readable
2002-02-04v2.4.13 -> v2.4.13.1Linus Torvalds
- Michael Warfield: computone serial driver update - Alexander Viro: cdrom module race fixes - David Miller: Acenic driver fix - Andrew Grover: ACPI update - Kai Germaschewski: ISDN update - Tim Waugh: parport update - David Woodhouse: JFFS garbage collect sleep
2002-02-04v2.4.10.3 -> v2.4.10.4Linus Torvalds
- Al Viro: separate out superblocks and FS namespaces: fs/super.c fathers fs/namespace.c - David Woodhouse: large MTD and JFFS[2] update - Marcelo Tosatti: resurrect oom handling - Hugh Dickins: add_to_swap_cache racefix cleanup - Jean Tourrilhes: IrDA update - Martin Bligh: support clustered logical APIC for >8 CPU x86 boxes - Richard Henderson: alpha update
2002-02-04v2.4.9.13 -> v2.4.9.14Linus Torvalds
- Richard Gooch: devfs update - Andrea Arcangeli: clean up/fix ramdisk handling now that it's in page cache - Al Viro: follow up the above with initrd cleanups - Keith Owens: get rid of drivers/scsi/53c700-mem.c file - Trond Myklebust: RPC over TCP race fix - Greg KH: USB update (ohci understands USB_ZERO_PACKET) - me: clean up reference bit handling, fix silly GFP_ATOMIC allocation bug
2002-02-04v2.4.9.7 -> v2.4.9.8Linus Torvalds
- Christoph Hellwig: clean up personality handling a bit - Robert Love: update sysctl/vm documentation - make the three-argument (that everybody hates) "min()" be "min_t()", and introduce a type-anal "min()" that complains about arguments of different types.
2002-02-04Import changesetLinus Torvalds