This patch series fixes shmctl, shmat and structs they use for compat64.
Update the arm64/Kconfig as we only use ipc_parse_version in compat32.
You can also find the patches at https://git.morello-project.org/Teo-CD/linux/-/tree/review/teo/shm-compat
---
v1: Initial shmctl patch
v2: Split patch between generic and arm64, shmat fix and Kconfig update
v3: Small nits
Teo Couprie Diaz (4):
ipc/shm: Adapt shmctl for compat64
arm64: compat: Fix structs for compat64
arm64: compat: Only use legacy SHMLBA in compat32
arm64: Kconfig: ipc_parse_version depends on COMPAT32
arch/arm64/Kconfig | 2 +-
arch/arm64/include/asm/compat.h | 10 ++++++++++
arch/arm64/include/asm/shmparam.h | 2 ++
ipc/shm.c | 8 ++++++++
4 files changed, 21 insertions(+), 1 deletion(-)
--
2.25.1
Hi,
This series adapts semctl/msgctl for compat64. This depends on Teo's
work on shmctl.
These patches can also be found on this location [1].
Thanks,
Amit
[1]: https://git.morello-project.org/amitdaniel/linux.git review/semctl_msgctl_v1
Amit Daniel Kachhap (3):
ipc/sem: Adapt semctl syscall for compat64
ipc/msg: Adapt msgctl syscall for compat64
arm64: compat: Fix structs compat_semid64_ds/compat_msqid64_ds
arch/arm64/include/asm/compat.h | 11 +++++++++++
ipc/msg.c | 6 ++++++
ipc/sem.c | 9 +++++++--
3 files changed, 24 insertions(+), 2 deletions(-)
--
2.17.1
On arm64 compat uses a 16k legacy alignment for shmat rather than the page
size. Only set it when in compat32.
Signed-off-by: Teo Couprie Diaz <teo.coupriediaz(a)arm.com>
---
arch/arm64/include/asm/shmparam.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/include/asm/shmparam.h b/arch/arm64/include/asm/shmparam.h
index f920e22ec677..804de90c7931 100644
--- a/arch/arm64/include/asm/shmparam.h
+++ b/arch/arm64/include/asm/shmparam.h
@@ -10,7 +10,9 @@
* alignment value. Since we don't have aliasing D-caches, the rest of
* the time we can safely use PAGE_SIZE.
*/
+#ifdef CONFIG_COMPAT32
#define COMPAT_SHMLBA (4 * PAGE_SIZE)
+#endif
#include <asm-generic/shmparam.h>
--
2.25.1