~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/sched/coredump.h

Version: ~ [ linux-5.2 ] ~ [ linux-5.1.16 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.57 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.132 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.184 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.184 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.69 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _LINUX_SCHED_COREDUMP_H
  3 #define _LINUX_SCHED_COREDUMP_H
  4 
  5 #include <linux/mm_types.h>
  6 
  7 #define SUID_DUMP_DISABLE       0       /* No setuid dumping */
  8 #define SUID_DUMP_USER          1       /* Dump as user of process */
  9 #define SUID_DUMP_ROOT          2       /* Dump as root */
 10 
 11 /* mm flags */
 12 
 13 /* for SUID_DUMP_* above */
 14 #define MMF_DUMPABLE_BITS 2
 15 #define MMF_DUMPABLE_MASK ((1 << MMF_DUMPABLE_BITS) - 1)
 16 
 17 extern void set_dumpable(struct mm_struct *mm, int value);
 18 /*
 19  * This returns the actual value of the suid_dumpable flag. For things
 20  * that are using this for checking for privilege transitions, it must
 21  * test against SUID_DUMP_USER rather than treating it as a boolean
 22  * value.
 23  */
 24 static inline int __get_dumpable(unsigned long mm_flags)
 25 {
 26         return mm_flags & MMF_DUMPABLE_MASK;
 27 }
 28 
 29 static inline int get_dumpable(struct mm_struct *mm)
 30 {
 31         return __get_dumpable(mm->flags);
 32 }
 33 
 34 /* coredump filter bits */
 35 #define MMF_DUMP_ANON_PRIVATE   2
 36 #define MMF_DUMP_ANON_SHARED    3
 37 #define MMF_DUMP_MAPPED_PRIVATE 4
 38 #define MMF_DUMP_MAPPED_SHARED  5
 39 #define MMF_DUMP_ELF_HEADERS    6
 40 #define MMF_DUMP_HUGETLB_PRIVATE 7
 41 #define MMF_DUMP_HUGETLB_SHARED  8
 42 #define MMF_DUMP_DAX_PRIVATE    9
 43 #define MMF_DUMP_DAX_SHARED     10
 44 
 45 #define MMF_DUMP_FILTER_SHIFT   MMF_DUMPABLE_BITS
 46 #define MMF_DUMP_FILTER_BITS    9
 47 #define MMF_DUMP_FILTER_MASK \
 48         (((1 << MMF_DUMP_FILTER_BITS) - 1) << MMF_DUMP_FILTER_SHIFT)
 49 #define MMF_DUMP_FILTER_DEFAULT \
 50         ((1 << MMF_DUMP_ANON_PRIVATE) | (1 << MMF_DUMP_ANON_SHARED) |\
 51          (1 << MMF_DUMP_HUGETLB_PRIVATE) | MMF_DUMP_MASK_DEFAULT_ELF)
 52 
 53 #ifdef CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS
 54 # define MMF_DUMP_MASK_DEFAULT_ELF      (1 << MMF_DUMP_ELF_HEADERS)
 55 #else
 56 # define MMF_DUMP_MASK_DEFAULT_ELF      0
 57 #endif
 58                                         /* leave room for more dump flags */
 59 #define MMF_VM_MERGEABLE        16      /* KSM may merge identical pages */
 60 #define MMF_VM_HUGEPAGE         17      /* set when VM_HUGEPAGE is set on vma */
 61 /*
 62  * This one-shot flag is dropped due to necessity of changing exe once again
 63  * on NFS restore
 64  */
 65 //#define MMF_EXE_FILE_CHANGED  18      /* see prctl_set_mm_exe_file() */
 66 
 67 #define MMF_HAS_UPROBES         19      /* has uprobes */
 68 #define MMF_RECALC_UPROBES      20      /* MMF_HAS_UPROBES can be wrong */
 69 #define MMF_OOM_SKIP            21      /* mm is of no interest for the OOM killer */
 70 #define MMF_UNSTABLE            22      /* mm is unstable for copy_from_user */
 71 #define MMF_HUGE_ZERO_PAGE      23      /* mm has ever used the global huge zero page */
 72 #define MMF_DISABLE_THP         24      /* disable THP for all VMAs */
 73 #define MMF_OOM_VICTIM          25      /* mm is the oom victim */
 74 #define MMF_OOM_REAP_QUEUED     26      /* mm was queued for oom_reaper */
 75 #define MMF_DISABLE_THP_MASK    (1 << MMF_DISABLE_THP)
 76 
 77 #define MMF_INIT_MASK           (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK |\
 78                                  MMF_DISABLE_THP_MASK)
 79 
 80 #endif /* _LINUX_SCHED_COREDUMP_H */
 81 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp