// SPDX-License-Identifier: GPL-2.0 /* * 32 bit compatibility code for System V IPC * * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1999 Arun Sharma * Copyright (C) 2000 VA Linux Co * Copyright (C) 2000 Don Dugger * Copyright (C) 2000 Hewlett-Packard Co. * Copyright (C) 2000 David Mosberger-Tang * Copyright (C) 2000 Gerhard Tonn (ton@de.ibm.com) * Copyright (C) 2000-2002 Andi Kleen, SuSE Labs (x86-64 port) * Copyright (C) 2000 Silicon Graphics, Inc. * Copyright (C) 2001 IBM * Copyright (C) 2004 IBM Deutschland Entwicklung GmbH, IBM Corporation * Copyright (C) 2004 Arnd Bergmann (arnd@arndb.de) * * This code is collected from the versions for sparc64, mips64, s390x, ia64, * ppc64 and x86_64, all of which are based on the original sparc64 version * by Jakub Jelinek. * */ #include #include #include #include #include #include #include #include #include #include #include "util.h" int get_compat_ipc64_perm(struct ipc64_perm *to, struct compat_ipc64_perm __user *from) { struct compat_ipc64_perm v; if (copy_from_user(&v, from, sizeof(v))) return -EFAULT; to->uid = v.uid; to->gid = v.gid; to->mode = v.mode; return 0; } int get_compat_ipc_perm(struct ipc64_perm *to, struct compat_ipc_perm __user *from) { struct compat_ipc_perm v; if (copy_from_user(&v, from, sizeof(v))) return -EFAULT; to->uid = v.uid; to->gid = v.gid; to->mode = v.mode; return 0; } void to_compat_ipc64_perm(struct compat_ipc64_perm *to, struct ipc64_perm *from) { to->key = from->key; to->uid = from->uid; to->gid = from->gid; to->cuid = from->cuid; to->cgid = from->cgid; to->mode = from->mode; to->seq = from->seq; } void to_compat_ipc_perm(struct compat_ipc_perm *to, struct ipc64_perm *from) { to->key = from->key; SET_UID(to->uid, from->uid); SET_GID(to->gid, from->gid); SET_UID(to->cuid, from->cuid); SET_GID(to->cgid, from->cgid); to->mode = from->mode; to->seq = from->seq; } />
AgeCommit message (Expand)AuthorFilesLines
2024-09-28hardening: Adjust dependencies in selection of MODVERSIONSNathan Chancellor1-2/+2
2024-06-15Revert "mm: init_mlocked_on_free_v3"David Hildenbrand1-15/+0
2024-04-25mm: init_mlocked_on_free_v3York Jasper Niebuhr1-0/+15
2023-08-15hardening: Move BUG_ON_DATA_CORRUPTION to hardening optionsMarco Elver1-0/+10
2023-08-15list: Introduce CONFIG_LIST_HARDENEDMarco Elver1-0/+13
2023-02-08randstruct: disable Clang 15 supportEric Biggers1-0/+3
2022-12-14security: Restrict CONFIG_ZERO_CALL_USED_REGS to gcc or clang > 15.0.6Nathan Chancellor1-0/+3
2022-10-10Merge tag 'mm-stable-2022-10-08' of git://git.kernel.org/pub/scm/linux/kernel...Linus Torvalds1-0/+4
2022-10-03security: kmsan: fix interoperability with auto-initializationAlexander Potapenko1-0/+4
2022-09-29hardening: Remove Clang's enable flag for -ftrivial-auto-var-init=zeroKees Cook1-4/+10
2022-05-08randstruct: Enable Clang supportKees Cook1-2/+12
2022-05-08randstruct: Move seed generation into scripts/basic/Kees Cook1-4/+5
2022-05-08randstruct: Reorganize Kconfigs and attribute macrosKees Cook1-0/+62
2022-02-06gcc-plugins/stackleak: Provide verbose modeKees Cook1-0/+10
2021-10-21gcc-plugins: Explicitly document purpose and deprecation scheduleKees Cook1-3/+6
2021-09-25hardening: Avoid harmless Clang option under CONFIG_INIT_STACK_ALL_ZEROKees Cook1-1/+4
2021-07-20hardening: Clarify Kconfig text for auto-var-initKees Cook1-20/+32
2021-07-20hardening: Introduce CONFIG_ZERO_CALL_USED_REGSKees Cook1-0/+19
2021-04-16kasan: remove redundant config optionWalter Wu1-2/+2
2020-06-16security: allow using Clang's zero initialization for stack variablesglider@google.com1-4/+25
2019-07-28Merge tag 'meminit-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...Linus Torvalds1-0/+7
2019-07-25structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACKArnd Bergmann1-0/+7
2019-07-12mm: security: introduce init_on_alloc=1 and init_on_free=1 boot optionsAlexander Potapenko1-0/+29
2019-05-21treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner1-0/+1
2019-04-24security: Implement Clang's stack initializationKees Cook1-0/+14
2019-04-24security: Move stackleak config to Kconfig.hardeningKees Cook1-0/+57
2019-04-24security: Create "kernel hardening" config areaKees Cook1-0/+93