linux/include/linux/sched/coredump.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_SCHED_COREDUMP_H
#define _LINUX_SCHED_COREDUMP_H

#include <linux/mm_types.h>

#define SUID_DUMP_DISABLE
#define SUID_DUMP_USER
#define SUID_DUMP_ROOT

/* mm flags */

/* for SUID_DUMP_* above */
#define MMF_DUMPABLE_BITS
#define MMF_DUMPABLE_MASK

extern void set_dumpable(struct mm_struct *mm, int value);
/*
 * This returns the actual value of the suid_dumpable flag. For things
 * that are using this for checking for privilege transitions, it must
 * test against SUID_DUMP_USER rather than treating it as a boolean
 * value.
 */
static inline int __get_dumpable(unsigned long mm_flags)
{}

static inline int get_dumpable(struct mm_struct *mm)
{}

/* coredump filter bits */
#define MMF_DUMP_ANON_PRIVATE
#define MMF_DUMP_ANON_SHARED
#define MMF_DUMP_MAPPED_PRIVATE
#define MMF_DUMP_MAPPED_SHARED
#define MMF_DUMP_ELF_HEADERS
#define MMF_DUMP_HUGETLB_PRIVATE
#define MMF_DUMP_HUGETLB_SHARED
#define MMF_DUMP_DAX_PRIVATE
#define MMF_DUMP_DAX_SHARED

#define MMF_DUMP_FILTER_SHIFT
#define MMF_DUMP_FILTER_BITS
#define MMF_DUMP_FILTER_MASK
#define MMF_DUMP_FILTER_DEFAULT

#ifdef CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS
#define MMF_DUMP_MASK_DEFAULT_ELF
#else
#define MMF_DUMP_MASK_DEFAULT_ELF
#endif
					/* leave room for more dump flags */
#define MMF_VM_MERGEABLE
#define MMF_VM_HUGEPAGE
/*
 * This one-shot flag is dropped due to necessity of changing exe once again
 * on NFS restore
 */
//#define MMF_EXE_FILE_CHANGED	18	/* see prctl_set_mm_exe_file() */

#define MMF_HAS_UPROBES
#define MMF_RECALC_UPROBES
#define MMF_OOM_SKIP
#define MMF_UNSTABLE
#define MMF_HUGE_ZERO_PAGE
#define MMF_DISABLE_THP
#define MMF_DISABLE_THP_MASK
#define MMF_OOM_REAP_QUEUED
#define MMF_MULTIPROCESS
/*
 * MMF_HAS_PINNED: Whether this mm has pinned any pages.  This can be either
 * replaced in the future by mm.pinned_vm when it becomes stable, or grow into
 * a counter on its own. We're aggresive on this bit for now: even if the
 * pinned pages were unpinned later on, we'll still keep this bit set for the
 * lifecycle of this mm, just for simplicity.
 */
#define MMF_HAS_PINNED

#define MMF_HAS_MDWE
#define MMF_HAS_MDWE_MASK


#define MMF_HAS_MDWE_NO_INHERIT

#define MMF_VM_MERGE_ANY
#define MMF_VM_MERGE_ANY_MASK

#define MMF_TOPDOWN
#define MMF_TOPDOWN_MASK

#define MMF_INIT_MASK

static inline unsigned long mmf_init_flags(unsigned long flags)
{}

#endif /* _LINUX_SCHED_COREDUMP_H */