[linux] 01/04: [arm64, mips*] security/keys: Enable keyctl() system call in 32-bit compat mode

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Wed Nov 29 21:57:09 UTC 2017


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch stretch
in repository linux.

commit f6cff293f779f8d9b512979ff8ed69b7fdcd8bd8
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Thu Nov 16 19:00:25 2017 +0000

    [arm64,mips*] security/keys: Enable keyctl() system call in 32-bit compat mode
    
    Closes: #881830
---
 debian/changelog                                   |   2 +
 ...support-keyctl-system-call-in-32-bit-mode.patch |  30 ++++++
 ...ty-keys-add-config_keys_compat-to-kconfig.patch | 110 +++++++++++++++++++++
 debian/patches/series                              |   2 +
 4 files changed, 144 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 6457be1..69b39ae 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ linux (4.9.51-2) UNRELEASED; urgency=medium
   * [mips*] Remove pt_regs adjustments in indirect syscall handler
     (Closes: #867358)
   * [arm64] brcmfmac: Enable BRCMFMAC_SDIO (Closes: #877911)
+  * [arm64,mips*] security/keys: Enable keyctl() system call in 32-bit compat
+    mode (Closes: #881830)
 
   [ Salvatore Bonaccorso ]
   * cifs: check MaxPathNameComponentLength != 0 before using it.
diff --git a/debian/patches/bugfix/arm64/arm64-support-keyctl-system-call-in-32-bit-mode.patch b/debian/patches/bugfix/arm64/arm64-support-keyctl-system-call-in-32-bit-mode.patch
new file mode 100644
index 0000000..1d1fbce
--- /dev/null
+++ b/debian/patches/bugfix/arm64/arm64-support-keyctl-system-call-in-32-bit-mode.patch
@@ -0,0 +1,30 @@
+From: Eric Biggers <ebiggers at google.com>
+Date: Wed, 8 Mar 2017 16:27:04 -0800
+Subject: arm64: support keyctl() system call in 32-bit mode
+Origin: https://git.kernel.org/linus/5c2a625937ba49bc691089370638223d310cda9a
+Bug-Debian: https://bugs.debian.org/881830
+
+As is the case for a number of other architectures that have a 32-bit
+compat mode, enable KEYS_COMPAT if both COMPAT and KEYS are enabled.
+This allows AArch32 programs to use the keyctl() system call when
+running on an AArch64 kernel.
+
+Signed-off-by: Eric Biggers <ebiggers at google.com>
+Signed-off-by: Will Deacon <will.deacon at arm.com>
+---
+ arch/arm64/Kconfig | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/arch/arm64/Kconfig
++++ b/arch/arm64/Kconfig
+@@ -1027,6 +1027,10 @@ config SYSVIPC_COMPAT
+ 	def_bool y
+ 	depends on COMPAT && SYSVIPC
+ 
++config KEYS_COMPAT
++	def_bool y
++	depends on COMPAT && KEYS
++
+ endmenu
+ 
+ menu "Power management options"
diff --git a/debian/patches/bugfix/mips/security-keys-add-config_keys_compat-to-kconfig.patch b/debian/patches/bugfix/mips/security-keys-add-config_keys_compat-to-kconfig.patch
new file mode 100644
index 0000000..4f45cd6
--- /dev/null
+++ b/debian/patches/bugfix/mips/security-keys-add-config_keys_compat-to-kconfig.patch
@@ -0,0 +1,110 @@
+From: Bilal Amarni <bilal.amarni at gmail.com>
+Date: Thu, 8 Jun 2017 14:47:26 +0100
+Subject: security/keys: add CONFIG_KEYS_COMPAT to Kconfig
+Origin: https://git.kernel.org/linus/47b2c3fff4932e6fc17ce13d51a43c6969714e20
+Bug-Debian: https://bugs.debian.org/881830
+
+CONFIG_KEYS_COMPAT is defined in arch-specific Kconfigs and is missing for
+several 64-bit architectures : mips, parisc, tile.
+
+At the moment and for those architectures, calling in 32-bit userspace the
+keyctl syscall would return an ENOSYS error.
+
+This patch moves the CONFIG_KEYS_COMPAT option to security/keys/Kconfig, to
+make sure the compatibility wrapper is registered by default for any 64-bit
+architecture as long as it is configured with CONFIG_COMPAT.
+
+[DH: Modified to remove arm64 compat enablement also as requested by Eric
+ Biggers]
+
+Signed-off-by: Bilal Amarni <bilal.amarni at gmail.com>
+Signed-off-by: David Howells <dhowells at redhat.com>
+Reviewed-by: Arnd Bergmann <arnd at arndb.de>
+cc: Eric Biggers <ebiggers3 at gmail.com>
+Signed-off-by: James Morris <james.l.morris at oracle.com>
+---
+ arch/arm64/Kconfig    | 4 ----
+ arch/powerpc/Kconfig  | 5 -----
+ arch/s390/Kconfig     | 3 ---
+ arch/sparc/Kconfig    | 3 ---
+ arch/x86/Kconfig      | 4 ----
+ security/keys/Kconfig | 4 ++++
+ 6 files changed, 4 insertions(+), 19 deletions(-)
+
+--- a/arch/arm64/Kconfig
++++ b/arch/arm64/Kconfig
+@@ -1027,10 +1027,6 @@ config SYSVIPC_COMPAT
+ 	def_bool y
+ 	depends on COMPAT && SYSVIPC
+ 
+-config KEYS_COMPAT
+-	def_bool y
+-	depends on COMPAT && KEYS
+-
+ endmenu
+ 
+ menu "Power management options"
+--- a/arch/powerpc/Kconfig
++++ b/arch/powerpc/Kconfig
+@@ -1087,11 +1087,6 @@ source "arch/powerpc/Kconfig.debug"
+ 
+ source "security/Kconfig"
+ 
+-config KEYS_COMPAT
+-	bool
+-	depends on COMPAT && KEYS
+-	default y
+-
+ source "crypto/Kconfig"
+ 
+ config PPC_LIB_RHEAP
+--- a/arch/s390/Kconfig
++++ b/arch/s390/Kconfig
+@@ -359,9 +359,6 @@ config COMPAT
+ config SYSVIPC_COMPAT
+ 	def_bool y if COMPAT && SYSVIPC
+ 
+-config KEYS_COMPAT
+-	def_bool y if COMPAT && KEYS
+-
+ config SMP
+ 	def_bool y
+ 	prompt "Symmetric multi-processing support"
+--- a/arch/sparc/Kconfig
++++ b/arch/sparc/Kconfig
+@@ -568,9 +568,6 @@ config SYSVIPC_COMPAT
+ 	depends on COMPAT && SYSVIPC
+ 	default y
+ 
+-config KEYS_COMPAT
+-	def_bool y if COMPAT && KEYS
+-
+ endmenu
+ 
+ source "net/Kconfig"
+--- a/arch/x86/Kconfig
++++ b/arch/x86/Kconfig
+@@ -2732,10 +2732,6 @@ config COMPAT_FOR_U64_ALIGNMENT
+ config SYSVIPC_COMPAT
+ 	def_bool y
+ 	depends on SYSVIPC
+-
+-config KEYS_COMPAT
+-	def_bool y
+-	depends on KEYS
+ endif
+ 
+ endmenu
+--- a/security/keys/Kconfig
++++ b/security/keys/Kconfig
+@@ -20,6 +20,10 @@ config KEYS
+ 
+ 	  If you are unsure as to whether this is required, answer N.
+ 
++config KEYS_COMPAT
++	def_bool y
++	depends on COMPAT && KEYS
++
+ config PERSISTENT_KEYRINGS
+ 	bool "Enable register of persistent per-UID keyrings"
+ 	depends on KEYS
diff --git a/debian/patches/series b/debian/patches/series
index 5dfeb5c..ba448be 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -65,6 +65,8 @@ bugfix/x86/platform-x86-ideapad-laptop-add-several-models-to-no.patch
 bugfix/powerpc/powerpc-invalidate-erat-on-powersave-wakeup-for-power9.patch
 bugfix/arm/arm-dts-exynos-add-dwc3-susphy-quirk.patch
 bugfix/mips/mips-remove-pt_regs-adjustments-in-indirect-syscall-.patch
+bugfix/arm64/arm64-support-keyctl-system-call-in-32-bit-mode.patch
+bugfix/mips/security-keys-add-config_keys_compat-to-kconfig.patch
 
 # Arch features
 features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list