Changes in 4.19.7
mm/huge_memory: rename freeze_page() to unmap_page()
mm/huge_memory: splitting set mapping+index before unfreeze
mm/huge_memory: fix lockdep complaint on 32-bit i_size_read()
mm/khugepaged: collapse_shmem() stop if punched or truncated
mm/khugepaged: fix crashes due to misaccounted holes
mm/khugepaged: collapse_shmem() remember to clear holes
mm/khugepaged: minor reorderings in collapse_shmem()
mm/khugepaged: collapse_shmem() without freezing new_page
mm/khugepaged: collapse_shmem() do not crash on Compound
lan743x: Enable driver to work with LAN7431
lan743x: fix return value for lan743x_tx_napi_poll
net: don't keep lonely packets forever in the gro hash
net: gemini: Fix copy/paste error
net: thunderx: set tso_hdrs pointer to NULL in nicvf_free_snd_queue
packet: copy user buffers before orphan or clone
rapidio/rionet: do not free skb before reading its length
s390/qeth: fix length check in SNMP processing
usbnet: ipheth: fix potential recvmsg bug and recvmsg bug 2
net: thunderx: set xdp_prog to NULL if bpf_prog_add fails
net: skb_scrub_packet(): Scrub offload_fwd_mark
virtio-net: disable guest csum during XDP set
virtio-net: fail XDP set if guest csum is negotiated
net/dim: Update DIM start sample after each DIM iteration
tcp: defer SACK compression after DupThresh
net: phy: add workaround for issue where PHY driver doesn't bind to the device
tipc: fix lockdep warning during node delete
x86/speculation: Enable cross-hyperthread spectre v2 STIBP mitigation
x86/speculation: Apply IBPB more strictly to avoid cross-process data leak
x86/speculation: Propagate information about RSB filling mitigation to sysfs
x86/speculation: Add RETPOLINE_AMD support to the inline asm CALL_NOSPEC variant
x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support
x86/retpoline: Remove minimal retpoline support
x86/speculation: Update the TIF_SSBD comment
x86/speculation: Clean up spectre_v2_parse_cmdline()
x86/speculation: Remove unnecessary ret variable in cpu_show_common()
x86/speculation: Move STIPB/IBPB string conditionals out of cpu_show_common()
x86/speculation: Disable STIBP when enhanced IBRS is in use
x86/speculation: Rename SSBD update functions
x86/speculation: Reorganize speculation control MSRs update
sched/smt: Make sched_smt_present track topology
x86/Kconfig: Select SCHED_SMT if SMP enabled
sched/smt: Expose sched_smt_present static key
x86/speculation: Rework SMT state change
x86/l1tf: Show actual SMT state
x86/speculation: Reorder the spec_v2 code
x86/speculation: Mark string arrays const correctly
x86/speculataion: Mark command line parser data __initdata
x86/speculation: Unify conditional spectre v2 print functions
x86/speculation: Add command line control for indirect branch speculation
x86/speculation: Prepare for per task indirect branch speculation control
x86/process: Consolidate and simplify switch_to_xtra() code
x86/speculation: Avoid __switch_to_xtra() calls
x86/speculation: Prepare for conditional IBPB in switch_mm()
ptrace: Remove unused ptrace_may_access_sched() and MODE_IBRS
x86/speculation: Split out TIF update
x86/speculation: Prevent stale SPEC_CTRL msr content
x86/speculation: Prepare arch_smt_update() for PRCTL mode
x86/speculation: Add prctl() control for indirect branch speculation
x86/speculation: Enable prctl mode for spectre_v2_user
x86/speculation: Add seccomp Spectre v2 user space protection mode
x86/speculation: Provide IBPB always command line options
userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas
kvm: mmu: Fix race in emulated page table writes
kvm: svm: Ensure an IBPB on all affected CPUs when freeing a vmcb
KVM: nVMX/nSVM: Fix bug which sets vcpu->arch.tsc_offset to L1 tsc_offset
KVM: x86: Fix kernel info-leak in KVM_HC_CLOCK_PAIRING hypercall
KVM: LAPIC: Fix pv ipis use-before-initialization
KVM: X86: Fix scan ioapic use-before-initialization
KVM: VMX: re-add ple_gap module parameter
xtensa: enable coprocessors that are being flushed
xtensa: fix coprocessor context offset definitions
xtensa: fix coprocessor part of ptrace_{get,set}xregs
udf: Allow mounting volumes with incorrect identification strings
btrfs: Always try all copies when reading extent buffers
Btrfs: ensure path name is null terminated at btrfs_control_ioctl
Btrfs: fix rare chances for data loss when doing a fast fsync
Btrfs: fix race between enabling quotas and subvolume creation
btrfs: relocation: set trans to be NULL after ending transaction
PCI: layerscape: Fix wrong invocation of outbound window disable accessor
PCI: dwc: Fix MSI-X EP framework address calculation bug
PCI: Fix incorrect value returned from pcie_get_speed_cap()
arm64: dts: rockchip: Fix PCIe reset polarity for rk3399-puma-haikou.
x86/MCE/AMD: Fix the thresholding machinery initialization order
x86/fpu: Disable bottom halves while loading FPU registers
perf/x86/intel: Move branch tracing setup to the Intel-specific source file
perf/x86/intel: Add generic branch tracing check to intel_pmu_has_bts()
perf/x86/intel: Disallow precise_ip on BTS events
fs: fix lost error code in dio_complete
ALSA: wss: Fix invalid snd_free_pages() at error path
ALSA: ac97: Fix incorrect bit shift at AC97-SPSA control write
ALSA: control: Fix race between adding and removing a user element
ALSA: sparc: Fix invalid snd_free_pages() at error path
ALSA: hda: Add ASRock N68C-S UCC the power_save blacklist
ALSA: hda/realtek - Support ALC300
ALSA: hda/realtek - fix headset mic detection for MSI MS-B171
ALSA: hda/realtek - fix the pop noise on headphone for lenovo laptops
ALSA: hda/realtek - Add auto-mute quirk for HP Spectre x360 laptop
function_graph: Create function_graph_enter() to consolidate architecture code
ARM: function_graph: Simplify with function_graph_enter()
microblaze: function_graph: Simplify with function_graph_enter()
x86/function_graph: Simplify with function_graph_enter()
nds32: function_graph: Simplify with function_graph_enter()
powerpc/function_graph: Simplify with function_graph_enter()
sh/function_graph: Simplify with function_graph_enter()
sparc/function_graph: Simplify with function_graph_enter()
parisc: function_graph: Simplify with function_graph_enter()
riscv/function_graph: Simplify with function_graph_enter()
s390/function_graph: Simplify with function_graph_enter()
arm64: function_graph: Simplify with function_graph_enter()
MIPS: function_graph: Simplify with function_graph_enter()
function_graph: Make ftrace_push_return_trace() static
function_graph: Use new curr_ret_depth to manage depth instead of curr_ret_stack
function_graph: Have profiler use curr_ret_stack and not depth
function_graph: Move return callback before update of curr_ret_stack
function_graph: Reverse the order of pushing the ret_stack and the callback
binder: fix race that allows malicious free of live buffer
ext2: initialize opts.s_mount_opt as zero before using it
ext2: fix potential use after free
ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using pmc_plt_clk_0
ASoC: pcm186x: Fix device reset-registers trigger value
ARM: dts: rockchip: Remove @0 from the veyron memory node
dmaengine: at_hdmac: fix memory leak in at_dma_xlate()
dmaengine: at_hdmac: fix module unloading
staging: most: use format specifier "%s" in snprintf
staging: vchiq_arm: fix compat VCHIQ_IOC_AWAIT_COMPLETION
staging: mt7621-dma: fix potentially dereferencing uninitialized 'tx_desc'
staging: mt7621-pinctrl: fix uninitialized variable ngroups
staging: rtl8723bs: Fix incorrect sense of ether_addr_equal
staging: rtl8723bs: Add missing return for cfg80211_rtw_get_station
USB: usb-storage: Add new IDs to ums-realtek
usb: core: quirks: add RESET_RESUME quirk for Cherry G230 Stream series
Revert "usb: dwc3: gadget: skip Set/Clear Halt when invalid"
iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers
iio:st_magn: Fix enable device after trigger
lib/test_kmod.c: fix rmmod double free
mm: cleancache: fix corruption on missed inode invalidation
mm: use swp_offset as key in shmem_replace_page()
Drivers: hv: vmbus: check the creation_status in vmbus_establish_gpadl()
misc: mic/scif: fix copy-paste error in scif_create_remote_lookup
Linux 4.19.7
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
227 lines
7.5 KiB
C
227 lines
7.5 KiB
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
#ifndef _LINUX_PRCTL_H
|
|
#define _LINUX_PRCTL_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
/* Values to pass as first argument to prctl() */
|
|
|
|
#define PR_SET_PDEATHSIG 1 /* Second arg is a signal */
|
|
#define PR_GET_PDEATHSIG 2 /* Second arg is a ptr to return the signal */
|
|
|
|
/* Get/set current->mm->dumpable */
|
|
#define PR_GET_DUMPABLE 3
|
|
#define PR_SET_DUMPABLE 4
|
|
|
|
/* Get/set unaligned access control bits (if meaningful) */
|
|
#define PR_GET_UNALIGN 5
|
|
#define PR_SET_UNALIGN 6
|
|
# define PR_UNALIGN_NOPRINT 1 /* silently fix up unaligned user accesses */
|
|
# define PR_UNALIGN_SIGBUS 2 /* generate SIGBUS on unaligned user access */
|
|
|
|
/* Get/set whether or not to drop capabilities on setuid() away from
|
|
* uid 0 (as per security/commoncap.c) */
|
|
#define PR_GET_KEEPCAPS 7
|
|
#define PR_SET_KEEPCAPS 8
|
|
|
|
/* Get/set floating-point emulation control bits (if meaningful) */
|
|
#define PR_GET_FPEMU 9
|
|
#define PR_SET_FPEMU 10
|
|
# define PR_FPEMU_NOPRINT 1 /* silently emulate fp operations accesses */
|
|
# define PR_FPEMU_SIGFPE 2 /* don't emulate fp operations, send SIGFPE instead */
|
|
|
|
/* Get/set floating-point exception mode (if meaningful) */
|
|
#define PR_GET_FPEXC 11
|
|
#define PR_SET_FPEXC 12
|
|
# define PR_FP_EXC_SW_ENABLE 0x80 /* Use FPEXC for FP exception enables */
|
|
# define PR_FP_EXC_DIV 0x010000 /* floating point divide by zero */
|
|
# define PR_FP_EXC_OVF 0x020000 /* floating point overflow */
|
|
# define PR_FP_EXC_UND 0x040000 /* floating point underflow */
|
|
# define PR_FP_EXC_RES 0x080000 /* floating point inexact result */
|
|
# define PR_FP_EXC_INV 0x100000 /* floating point invalid operation */
|
|
# define PR_FP_EXC_DISABLED 0 /* FP exceptions disabled */
|
|
# define PR_FP_EXC_NONRECOV 1 /* async non-recoverable exc. mode */
|
|
# define PR_FP_EXC_ASYNC 2 /* async recoverable exception mode */
|
|
# define PR_FP_EXC_PRECISE 3 /* precise exception mode */
|
|
|
|
/* Get/set whether we use statistical process timing or accurate timestamp
|
|
* based process timing */
|
|
#define PR_GET_TIMING 13
|
|
#define PR_SET_TIMING 14
|
|
# define PR_TIMING_STATISTICAL 0 /* Normal, traditional,
|
|
statistical process timing */
|
|
# define PR_TIMING_TIMESTAMP 1 /* Accurate timestamp based
|
|
process timing */
|
|
|
|
#define PR_SET_NAME 15 /* Set process name */
|
|
#define PR_GET_NAME 16 /* Get process name */
|
|
|
|
/* Get/set process endian */
|
|
#define PR_GET_ENDIAN 19
|
|
#define PR_SET_ENDIAN 20
|
|
# define PR_ENDIAN_BIG 0
|
|
# define PR_ENDIAN_LITTLE 1 /* True little endian mode */
|
|
# define PR_ENDIAN_PPC_LITTLE 2 /* "PowerPC" pseudo little endian */
|
|
|
|
/* Get/set process seccomp mode */
|
|
#define PR_GET_SECCOMP 21
|
|
#define PR_SET_SECCOMP 22
|
|
|
|
/* Get/set the capability bounding set (as per security/commoncap.c) */
|
|
#define PR_CAPBSET_READ 23
|
|
#define PR_CAPBSET_DROP 24
|
|
|
|
/* Get/set the process' ability to use the timestamp counter instruction */
|
|
#define PR_GET_TSC 25
|
|
#define PR_SET_TSC 26
|
|
# define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */
|
|
# define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */
|
|
|
|
/* Get/set securebits (as per security/commoncap.c) */
|
|
#define PR_GET_SECUREBITS 27
|
|
#define PR_SET_SECUREBITS 28
|
|
|
|
/*
|
|
* Get/set the timerslack as used by poll/select/nanosleep
|
|
* A value of 0 means "use default"
|
|
*/
|
|
#define PR_SET_TIMERSLACK 29
|
|
#define PR_GET_TIMERSLACK 30
|
|
|
|
#define PR_TASK_PERF_EVENTS_DISABLE 31
|
|
#define PR_TASK_PERF_EVENTS_ENABLE 32
|
|
|
|
/*
|
|
* Set early/late kill mode for hwpoison memory corruption.
|
|
* This influences when the process gets killed on a memory corruption.
|
|
*/
|
|
#define PR_MCE_KILL 33
|
|
# define PR_MCE_KILL_CLEAR 0
|
|
# define PR_MCE_KILL_SET 1
|
|
|
|
# define PR_MCE_KILL_LATE 0
|
|
# define PR_MCE_KILL_EARLY 1
|
|
# define PR_MCE_KILL_DEFAULT 2
|
|
|
|
#define PR_MCE_KILL_GET 34
|
|
|
|
/*
|
|
* Tune up process memory map specifics.
|
|
*/
|
|
#define PR_SET_MM 35
|
|
# define PR_SET_MM_START_CODE 1
|
|
# define PR_SET_MM_END_CODE 2
|
|
# define PR_SET_MM_START_DATA 3
|
|
# define PR_SET_MM_END_DATA 4
|
|
# define PR_SET_MM_START_STACK 5
|
|
# define PR_SET_MM_START_BRK 6
|
|
# define PR_SET_MM_BRK 7
|
|
# define PR_SET_MM_ARG_START 8
|
|
# define PR_SET_MM_ARG_END 9
|
|
# define PR_SET_MM_ENV_START 10
|
|
# define PR_SET_MM_ENV_END 11
|
|
# define PR_SET_MM_AUXV 12
|
|
# define PR_SET_MM_EXE_FILE 13
|
|
# define PR_SET_MM_MAP 14
|
|
# define PR_SET_MM_MAP_SIZE 15
|
|
|
|
/*
|
|
* This structure provides new memory descriptor
|
|
* map which mostly modifies /proc/pid/stat[m]
|
|
* output for a task. This mostly done in a
|
|
* sake of checkpoint/restore functionality.
|
|
*/
|
|
struct prctl_mm_map {
|
|
__u64 start_code; /* code section bounds */
|
|
__u64 end_code;
|
|
__u64 start_data; /* data section bounds */
|
|
__u64 end_data;
|
|
__u64 start_brk; /* heap for brk() syscall */
|
|
__u64 brk;
|
|
__u64 start_stack; /* stack starts at */
|
|
__u64 arg_start; /* command line arguments bounds */
|
|
__u64 arg_end;
|
|
__u64 env_start; /* environment variables bounds */
|
|
__u64 env_end;
|
|
__u64 *auxv; /* auxiliary vector */
|
|
__u32 auxv_size; /* vector size */
|
|
__u32 exe_fd; /* /proc/$pid/exe link file */
|
|
};
|
|
|
|
/*
|
|
* Set specific pid that is allowed to ptrace the current task.
|
|
* A value of 0 mean "no process".
|
|
*/
|
|
#define PR_SET_PTRACER 0x59616d61
|
|
# define PR_SET_PTRACER_ANY ((unsigned long)-1)
|
|
|
|
#define PR_SET_CHILD_SUBREAPER 36
|
|
#define PR_GET_CHILD_SUBREAPER 37
|
|
|
|
/*
|
|
* If no_new_privs is set, then operations that grant new privileges (i.e.
|
|
* execve) will either fail or not grant them. This affects suid/sgid,
|
|
* file capabilities, and LSMs.
|
|
*
|
|
* Operations that merely manipulate or drop existing privileges (setresuid,
|
|
* capset, etc.) will still work. Drop those privileges if you want them gone.
|
|
*
|
|
* Changing LSM security domain is considered a new privilege. So, for example,
|
|
* asking selinux for a specific new context (e.g. with runcon) will result
|
|
* in execve returning -EPERM.
|
|
*
|
|
* See Documentation/userspace-api/no_new_privs.rst for more details.
|
|
*/
|
|
#define PR_SET_NO_NEW_PRIVS 38
|
|
#define PR_GET_NO_NEW_PRIVS 39
|
|
|
|
#define PR_GET_TID_ADDRESS 40
|
|
|
|
#define PR_SET_THP_DISABLE 41
|
|
#define PR_GET_THP_DISABLE 42
|
|
|
|
/*
|
|
* Tell the kernel to start/stop helping userspace manage bounds tables.
|
|
*/
|
|
#define PR_MPX_ENABLE_MANAGEMENT 43
|
|
#define PR_MPX_DISABLE_MANAGEMENT 44
|
|
|
|
#define PR_SET_FP_MODE 45
|
|
#define PR_GET_FP_MODE 46
|
|
# define PR_FP_MODE_FR (1 << 0) /* 64b FP registers */
|
|
# define PR_FP_MODE_FRE (1 << 1) /* 32b compatibility */
|
|
|
|
/* Control the ambient capability set */
|
|
#define PR_CAP_AMBIENT 47
|
|
# define PR_CAP_AMBIENT_IS_SET 1
|
|
# define PR_CAP_AMBIENT_RAISE 2
|
|
# define PR_CAP_AMBIENT_LOWER 3
|
|
# define PR_CAP_AMBIENT_CLEAR_ALL 4
|
|
|
|
/* arm64 Scalable Vector Extension controls */
|
|
/* Flag values must be kept in sync with ptrace NT_ARM_SVE interface */
|
|
#define PR_SVE_SET_VL 50 /* set task vector length */
|
|
# define PR_SVE_SET_VL_ONEXEC (1 << 18) /* defer effect until exec */
|
|
#define PR_SVE_GET_VL 51 /* get task vector length */
|
|
/* Bits common to PR_SVE_SET_VL and PR_SVE_GET_VL */
|
|
# define PR_SVE_VL_LEN_MASK 0xffff
|
|
# define PR_SVE_VL_INHERIT (1 << 17) /* inherit across exec */
|
|
|
|
/* Per task speculation control */
|
|
#define PR_GET_SPECULATION_CTRL 52
|
|
#define PR_SET_SPECULATION_CTRL 53
|
|
/* Speculation control variants */
|
|
# define PR_SPEC_STORE_BYPASS 0
|
|
# define PR_SPEC_INDIRECT_BRANCH 1
|
|
/* Return and control values for PR_SET/GET_SPECULATION_CTRL */
|
|
# define PR_SPEC_NOT_AFFECTED 0
|
|
# define PR_SPEC_PRCTL (1UL << 0)
|
|
# define PR_SPEC_ENABLE (1UL << 1)
|
|
# define PR_SPEC_DISABLE (1UL << 2)
|
|
# define PR_SPEC_FORCE_DISABLE (1UL << 3)
|
|
|
|
#define PR_SET_VMA 0x53564d41
|
|
# define PR_SET_VMA_ANON_NAME 0
|
|
|
|
#endif /* _LINUX_PRCTL_H */
|