Re: [PATCHv4 3/3] fs: Update coredump-related headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Quoting Alex Kelly (alex.page.kelly@xxxxxxxxx):
> 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@xxxxxxxxx>
> Reviewed-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx>

Acked-by: Serge Hallyn <serge.hallyn@xxxxxxxxxxxxx>

> ---
>  fs/coredump.c            | 2 ++
>  fs/coredump.h            | 6 ++++++
>  fs/exec.c                | 1 +
>  include/linux/binfmts.h  | 5 -----
>  include/linux/coredump.h | 5 +++++
>  include/linux/sched.h    | 1 -
>  kernel/signal.c          | 1 +
>  7 files changed, 15 insertions(+), 6 deletions(-)
>  create mode 100644 fs/coredump.h
> 
> diff --git a/fs/coredump.c b/fs/coredump.c
> index 9692329..1935b4d 100644
> --- a/fs/coredump.c
> +++ b/fs/coredump.c
> @@ -14,6 +14,7 @@
>  #include <linux/key.h>
>  #include <linux/personality.h>
>  #include <linux/binfmts.h>
> +#include <linux/coredump.h>
>  #include <linux/utsname.h>
>  #include <linux/pid_namespace.h>
>  #include <linux/module.h>
> @@ -39,6 +40,7 @@
>  
>  #include <trace/events/task.h>
>  #include "internal.h"
> +#include "coredump.h"
>  
>  #include <trace/events/sched.h>
>  
> diff --git a/fs/coredump.h b/fs/coredump.h
> new file mode 100644
> index 0000000..e39ff07
> --- /dev/null
> +++ b/fs/coredump.h
> @@ -0,0 +1,6 @@
> +#ifndef _FS_COREDUMP_H
> +#define _FS_COREDUMP_H
> +
> +extern int __get_dumpable(unsigned long mm_flags);
> +
> +#endif
> diff --git a/fs/exec.c b/fs/exec.c
> index b604050..a0ad3a2 100644
> --- a/fs/exec.c
> +++ b/fs/exec.c
> @@ -63,6 +63,7 @@
>  
>  #include <trace/events/task.h>
>  #include "internal.h"
> +#include "coredump.h"
>  
>  #include <trace/events/sched.h>
>  
> diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
> index 00e2e89..c7b16ee 100644
> --- a/include/linux/binfmts.h
> +++ b/include/linux/binfmts.h
> @@ -132,11 +132,6 @@ extern int copy_strings_kernel(int argc, const char *const *argv,
>  			       struct linux_binprm *bprm);
>  extern int prepare_bprm_creds(struct linux_binprm *bprm);
>  extern void install_exec_creds(struct linux_binprm *bprm);
> -#ifdef CONFIG_COREDUMP
> -extern void do_coredump(long signr, int exit_code, struct pt_regs *regs);
> -#else
> -static inline void do_coredump(long signr, int exit_code, struct pt_regs *regs) {}
> -#endif
>  extern void set_binfmt(struct linux_binfmt *new);
>  extern void free_bprm(struct linux_binprm *);
>  
> diff --git a/include/linux/coredump.h b/include/linux/coredump.h
> index ba4b85a..42f9752 100644
> --- a/include/linux/coredump.h
> +++ b/include/linux/coredump.h
> @@ -11,5 +11,10 @@
>   */
>  extern int dump_write(struct file *file, const void *addr, int nr);
>  extern int dump_seek(struct file *file, loff_t off);
> +#ifdef CONFIG_COREDUMP
> +extern void do_coredump(long signr, int exit_code, struct pt_regs *regs);
> +#else
> +static inline void do_coredump(long signr, int exit_code, struct pt_regs *regs) {}
> +#endif
>  
>  #endif /* _LINUX_COREDUMP_H */
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index 7bb5047..c147e70 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -413,7 +413,6 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm) {}
>  
>  extern void set_dumpable(struct mm_struct *mm, int value);
>  extern int get_dumpable(struct mm_struct *mm);
> -extern int __get_dumpable(unsigned long mm_flags);
>  
>  /* get/set_dumpable() values */
>  #define SUID_DUMPABLE_DISABLED	0
> diff --git a/kernel/signal.c b/kernel/signal.c
> index be4f856..fb4fd72 100644
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -17,6 +17,7 @@
>  #include <linux/fs.h>
>  #include <linux/tty.h>
>  #include <linux/binfmts.h>
> +#include <linux/coredump.h>
>  #include <linux/security.h>
>  #include <linux/syscalls.h>
>  #include <linux/ptrace.h>
> -- 
> 1.7.11.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[Other Archives]     [Linux Kernel Newbies]     [Linux Driver Development]     [Linux Kbuild]     [Fedora Kernel]     [Linux Kernel Testers]     [Linux SH]     [Linux Omap]     [Linux Tape]     [Linux Input]     [Linux Kernel Janitors]     [Linux Kernel Packagers]     [Linux Doc]     [Linux Man Pages]     [Linux API]     [Linux Memory Management]     [Linux Modules]     [Linux Standards]     [Kernel Announce]     [Netdev]     [Git]     [Linux PCI]     Linux CAN Development     [Linux I2C]     [Linux RDMA]     [Linux NUMA]     [Netfilter]     [Netfilter Devel]     [SELinux]     [Bugtraq]     [FIO]     [Linux Perf Users]     [Linux Serial]     [Linux PPP]     [Linux ISDN]     [Linux Next]     [Kernel Stable Commits]     [Linux Tip Commits]     [Kernel MM Commits]     [Linux Security Module]     [AutoFS]     [Filesystem Development]     [Ext3 Filesystem]     [Linux bcache]     [Ext4 Filesystem]     [Linux BTRFS]     [Linux CEPH Filesystem]     [Linux XFS]     [XFS]     [Linux NFS]     [Linux CIFS]     [Ecryptfs]     [Linux NILFS]     [Linux Cachefs]     [Reiser FS]     [Initramfs]     [Linux FB Devel]     [Linux OpenGL]     [DRI Devel]     [Fastboot]     [Linux RT Users]     [Linux RT Stable]     [eCos]     [Corosync]     [Linux Clusters]     [LVS Devel]     [Hot Plug]     [Linux Virtualization]     [KVM]     [KVM PPC]     [KVM ia64]     [Linux Containers]     [Linux Hexagon]     [Linux Cgroups]     [Util Linux]     [Wireless]     [Linux Bluetooth]     [Bluez Devel]     [Ethernet Bridging]     [Embedded Linux]     [Barebox]     [Linux MMC]     [Linux IIO]     [Sparse]     [Smatch]     [Linux Arch]     [x86 Platform Driver]     [Linux ACPI]     [Linux IBM ACPI]     [LM Sensors]     [CPU Freq]     [Linux Power Management]     [Linmodems]     [Linux DCCP]     [Linux SCTP]     [ALSA Devel]     [Linux USB]     [Linux PA RISC]     [Linux Samsung SOC]     [MIPS Linux]     [IBM S/390 Linux]     [ARM Linux]     [ARM Kernel]     [ARM MSM]     [Tegra Devel]     [Sparc Linux]     [Linux Security]     [Linux Sound]     [Linux Media]     [Video 4 Linux]     [Linux IRDA Users]     [Linux for the blind]     [Linux RAID]     [Linux ATA RAID]     [Device Mapper]     [Linux SCSI]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Linux IDE]     [Linux SMP]     [Linux AXP]     [Linux Alpha]     [Linux M68K]     [Linux ia64]     [Linux 8086]     [Linux x86_64]     [Linux Config]     [Linux Apps]     [Linux MSDOS]     [Linux X.25]     [Linux Crypto]     [DM Crypt]     [Linux Trace Users]     [Linux Btrace]     [Linux Watchdog]     [Utrace Devel]     [Linux C Programming]     [Linux Assembly]     [Dash]     [DWARVES]     [Hail Devel]     [Linux Kernel Debugger]     [Linux gcc]     [Gcc Help]     [X.Org]     [Wine]

Add to Google Powered by Linux

[Older Kernel Discussion]     [Yosemite National Park Forum]     [Large Format Photos]     [Gimp]     [Yosemite Photos]     [Stuff]