fs: Move core dump functionality into its own file

This prepares for making core dump functionality optional.

The variable "suid_dumpable" and associated functions are left in fs/exec.c
because they're used elsewhere, such as in ptrace.

Signed-off-by: Alex Kelly <alex.page.kelly@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
fs: Make core dump functionality optional

Adds an expert Kconfig option, CONFIG_COREDUMP, which allows disabling of core dump.
This saves approximately 2.6k in the compiled kernel, and complements CONFIG_ELF_CORE,
which now depends on it.

CONFIG_COREDUMP also disables coredump-related sysctls, except for suid_dumpable and
related functions, which are necessary for ptrace.

Signed-off-by: Alex Kelly <alex.page.kelly@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
fs: Update coredump-related headers

This patch creates a new header file, fs/coredump.h, which contains
functions only used by the new coredump.c. It also moves do_coredump
to the include/linux/coredump.h header file, for consistency.

Signed-off-by: Alex Kelly <alex.page.kelly@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Minor fix, probably should inform LKML
sched: Support compiling out real-time scheduling with REALTIME_SCHED.

Adds support for compiling out the real-time scheduler (SCHED_FIFO
and SCHED_RR) to save space. Changes sched_set_stop_task to use
SCHED_NORMAL rather than SCHED_FIFO, since the kernel only uses this
function as a fake scheduling priority for userspace to read to avoid
exposing the stop class to userspace. Bloat-o-meter gives a space
savings of 1877 bytes with REALTIME_SCHED turned off.

Userspace works fine with REALTIME_SCHED turned off. Processes
attempting to set a real-time scheduling policy get EINVAL, exactly
the response that the sched_setscheduler manpage documents you will
get if the "scheduling policy is not one of the recognized policies."

Signed-off-by: Trevor Brandt <tjbrandt@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>

Conflicts:

	init/Kconfig
Added a CONFIG_TTY option to allow removal of TTY

The option allows you to remove TTY and compile without errors. This
could be a security feature, or as a space saver for systems that
won't support TTY interfaces anyway. bloat-o-meter showed a 54KB
savings between TTY on and off, with all other options the same.

Signed-off-by: Joe Millenbach <jmillenbach@gmail.com>
To be merged after review.

Conflicts:
	drivers/tty/hvc/Kconfig
	drivers/tty/serial/Kconfig
sched: Fixed bug in cpupri_init; changed cpupri stubs to inline.

Fixed the cpupri_init stub in cpupri.h so it takes one argument
instead of none. At the same time, changed the cpupri stubs from
macros to static inlines.

Signed-off-by: Trevor Brandt <tjbrandt@gmail.com>
sched: Support compiling out real-time scheduling with REALTIME_SCHED.

Adds support for compiling out the real-time scheduler (SCHED_FIFO
and SCHED_RR) to save space. Changes sched_set_stop_task to use
SCHED_NORMAL rather than SCHED_FIFO, since the kernel only uses this
function as a fake scheduling priority for userspace to read to avoid
exposing the stop class to userspace. Bloat-o-meter gives a space
savings of 1877 bytes with REALTIME_SCHED turned off.

Userspace works fine with REALTIME_SCHED turned off. Processes
attempting to set a real-time scheduling policy get EINVAL, exactly
the response that the sched_setscheduler manpage documents you will
get if the "scheduling policy is not one of the recognized policies."

Signed-off-by: Trevor Brandt <tjbrandt@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
boot: Put initcall_debug into its own Kconfig option DEBUG_INITCALL

Putting DEBUG_INITCALL config option to compile out the command-line option
"initcall_debug".

Signed-off-by: Thai Bui <blquythai@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Tidied this up and fixed the stuff and things and stuff this is getting squashed anyway
Merge branch 'cd-header' into integrated-fjord
fs: Amended coredump-related sysctl functions

This fixes an error introduced in the coredump-header patch in
the coredump removal patch I submitted earlier. It should be squashed
into that patch series so that the Kconfig option to remove coredump
doesn't cause compile-time errors.

Signed-off-by: Alex Kelly <alex.page.kelly@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Merge branch 'coredump-fix' into integrated-fjord
fs: Amended coredump-related sysctl functions

This fixes an error introduced in the coredump-header patch in
the coredump removal patch I submitted earlier. It should be squashed
into that patch series so that the Kconfig option to remove coredump
doesn't cause compile-time errors.

Signed-off-by: Alex Kelly <alex.page.kelly@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Merge branch 'coredump-actualfix' into integrated-fjord