All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM64: enable CONFIG_KEYS_COMPAT in Kconfig
@ 2017-01-23 17:03 ` Bilal Amarni
  0 siblings, 0 replies; 14+ messages in thread
From: Bilal Amarni @ 2017-01-23 17:03 UTC (permalink / raw)
  To: catalin.marinas; +Cc: will.deacon, linux-arm-kernel, linux-kernel, Bilal Amarni

Currently in 32-bit userspace calling the keyctl syscall returns an ENOSYS error.

This makes sure the compatibility wrapper is registered.

Signed-off-by: Bilal Amarni <bilal.amarni@gmail.com>
---
 arch/arm64/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 1117421..d76f70b 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1030,6 +1030,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"
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] ARM64: enable CONFIG_KEYS_COMPAT in Kconfig
@ 2017-01-23 17:03 ` Bilal Amarni
  0 siblings, 0 replies; 14+ messages in thread
From: Bilal Amarni @ 2017-01-23 17:03 UTC (permalink / raw)
  To: linux-arm-kernel

Currently in 32-bit userspace calling the keyctl syscall returns an ENOSYS error.

This makes sure the compatibility wrapper is registered.

Signed-off-by: Bilal Amarni <bilal.amarni@gmail.com>
---
 arch/arm64/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 1117421..d76f70b 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1030,6 +1030,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"
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] ARM64: enable CONFIG_KEYS_COMPAT in Kconfig
  2017-01-23 17:03 ` Bilal Amarni
@ 2017-01-25 21:22   ` Arnd Bergmann
  -1 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2017-01-25 21:22 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Bilal Amarni, catalin.marinas, will.deacon, linux-kernel

On Monday, January 23, 2017 6:03:12 PM CET Bilal Amarni wrote:
> Currently in 32-bit userspace calling the keyctl syscall returns an ENOSYS error.
> 
> This makes sure the compatibility wrapper is registered.
> 
> Signed-off-by: Bilal Amarni <bilal.amarni@gmail.com>

While this looks technically correct, it doesn't seem very nice to the
other 64-bit architectures that may also be missing this.

> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 1117421..d76f70b 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -1030,6 +1030,10 @@ config SYSVIPC_COMPAT
>         def_bool y
>         depends on COMPAT && SYSVIPC
>  
> +config KEYS_COMPAT
> +       def_bool y
> +       depends on COMPAT && KEYS
> +

I see four copies of this in existing architectures, but none for
mips, parisc or tile. How about just moving this next to CONFIG_KEYS?

	Arnd

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] ARM64: enable CONFIG_KEYS_COMPAT in Kconfig
@ 2017-01-25 21:22   ` Arnd Bergmann
  0 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2017-01-25 21:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday, January 23, 2017 6:03:12 PM CET Bilal Amarni wrote:
> Currently in 32-bit userspace calling the keyctl syscall returns an ENOSYS error.
> 
> This makes sure the compatibility wrapper is registered.
> 
> Signed-off-by: Bilal Amarni <bilal.amarni@gmail.com>

While this looks technically correct, it doesn't seem very nice to the
other 64-bit architectures that may also be missing this.

> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 1117421..d76f70b 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -1030,6 +1030,10 @@ config SYSVIPC_COMPAT
>         def_bool y
>         depends on COMPAT && SYSVIPC
>  
> +config KEYS_COMPAT
> +       def_bool y
> +       depends on COMPAT && KEYS
> +

I see four copies of this in existing architectures, but none for
mips, parisc or tile. How about just moving this next to CONFIG_KEYS?

	Arnd

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] security/keys: add CONFIG_KEYS_COMPAT to Kconfig
  2017-01-25 21:22   ` Arnd Bergmann
@ 2017-01-26 11:49     ` Bilal Amarni
  -1 siblings, 0 replies; 14+ messages in thread
From: Bilal Amarni @ 2017-01-26 11:49 UTC (permalink / raw)
  To: arnd
  Cc: bilal.amarni, catalin.marinas, will.deacon, linux-kernel,
	linux-arm-kernel

CONFIG_KEYS_COMPAT is defined in arch-specific Kconfigs and is missing for
several 64-bit architectures : arm64, 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.

Signed-off-by: Bilal Amarni <bilal.amarni@gmail.com>
---
 arch/powerpc/Kconfig  | 5 -----
 arch/s390/Kconfig     | 3 ---
 arch/sparc/Kconfig    | 3 ---
 arch/x86/Kconfig      | 5 -----
 security/keys/Kconfig | 4 ++++
 5 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a8ee573..5947ea2 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -1128,11 +1128,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
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index c6722112..633f553 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -362,9 +362,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"
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index cf4034c..2b07f0a 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -571,9 +571,6 @@ config SYSVIPC_COMPAT
 	depends on COMPAT && SYSVIPC
 	default y
 
-config KEYS_COMPAT
-	def_bool y if COMPAT && KEYS
-
 endmenu
 
 source "net/Kconfig"
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index e487493..e92b62b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2769,11 +2769,6 @@ config SYSVIPC_COMPAT
 	def_bool y
 	depends on SYSVIPC
 
-config KEYS_COMPAT
-	def_bool y
-	depends on KEYS
-endif
-
 endmenu
 
 
diff --git a/security/keys/Kconfig b/security/keys/Kconfig
index d942c7c..f44d8be 100644
--- 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
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] security/keys: add CONFIG_KEYS_COMPAT to Kconfig
@ 2017-01-26 11:49     ` Bilal Amarni
  0 siblings, 0 replies; 14+ messages in thread
From: Bilal Amarni @ 2017-01-26 11:49 UTC (permalink / raw)
  To: linux-arm-kernel

CONFIG_KEYS_COMPAT is defined in arch-specific Kconfigs and is missing for
several 64-bit architectures : arm64, 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.

Signed-off-by: Bilal Amarni <bilal.amarni@gmail.com>
---
 arch/powerpc/Kconfig  | 5 -----
 arch/s390/Kconfig     | 3 ---
 arch/sparc/Kconfig    | 3 ---
 arch/x86/Kconfig      | 5 -----
 security/keys/Kconfig | 4 ++++
 5 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a8ee573..5947ea2 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -1128,11 +1128,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
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index c6722112..633f553 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -362,9 +362,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"
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index cf4034c..2b07f0a 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -571,9 +571,6 @@ config SYSVIPC_COMPAT
 	depends on COMPAT && SYSVIPC
 	default y
 
-config KEYS_COMPAT
-	def_bool y if COMPAT && KEYS
-
 endmenu
 
 source "net/Kconfig"
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index e487493..e92b62b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2769,11 +2769,6 @@ config SYSVIPC_COMPAT
 	def_bool y
 	depends on SYSVIPC
 
-config KEYS_COMPAT
-	def_bool y
-	depends on KEYS
-endif
-
 endmenu
 
 
diff --git a/security/keys/Kconfig b/security/keys/Kconfig
index d942c7c..f44d8be 100644
--- 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
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] security/keys: add CONFIG_KEYS_COMPAT to Kconfig
  2017-01-26 11:49     ` Bilal Amarni
@ 2017-01-26 12:55       ` kbuild test robot
  -1 siblings, 0 replies; 14+ messages in thread
From: kbuild test robot @ 2017-01-26 12:55 UTC (permalink / raw)
  To: Bilal Amarni
  Cc: kbuild-all, arnd, bilal.amarni, catalin.marinas, will.deacon,
	linux-kernel, linux-arm-kernel

Hi Bilal,

[auto build test ERROR on arm-soc/for-next]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Bilal-Amarni/security-keys-add-CONFIG_KEYS_COMPAT-to-Kconfig/20170126-195458
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git for-next
config: x86_64-randconfig-x014-201704
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        make ARCH=x86_64  randconfig
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> arch/x86/Kconfig:2772: unexpected 'endmenu' within if block
>> lib/Kconfig:554: syntax error
>> arch/x86/Kconfig:2719: missing end statement for this entry
   make[2]: *** [oldconfig] Error 1
   make[1]: *** [oldconfig] Error 2
   make: *** [sub-make] Error 2
--
>> arch/x86/Kconfig:2772: unexpected 'endmenu' within if block
>> lib/Kconfig:554: syntax error
>> arch/x86/Kconfig:2719: missing end statement for this entry
   make[2]: *** [olddefconfig] Error 1
   make[2]: Target 'oldnoconfig' not remade because of errors.
   make[1]: *** [oldnoconfig] Error 2
   make: *** [sub-make] Error 2

vim +/endmenu +2772 arch/x86/Kconfig

e3263ab38 David Herrmann  2013-08-02  2713  
e3263ab38 David Herrmann  2013-08-02  2714  	  If unsure, say Y.
e3263ab38 David Herrmann  2013-08-02  2715  
e279b6c1d Sam Ravnborg    2007-11-06  2716  endmenu
e279b6c1d Sam Ravnborg    2007-11-06  2717  
e279b6c1d Sam Ravnborg    2007-11-06  2718  
e279b6c1d Sam Ravnborg    2007-11-06 @2719  menu "Executable file formats / Emulations"
e279b6c1d Sam Ravnborg    2007-11-06  2720  
e279b6c1d Sam Ravnborg    2007-11-06  2721  source "fs/Kconfig.binfmt"
e279b6c1d Sam Ravnborg    2007-11-06  2722  
e279b6c1d Sam Ravnborg    2007-11-06  2723  config IA32_EMULATION
e279b6c1d Sam Ravnborg    2007-11-06  2724  	bool "IA32 Emulation"
e279b6c1d Sam Ravnborg    2007-11-06  2725  	depends on X86_64
39f88911b Ingo Molnar     2016-11-15  2726  	select ARCH_WANT_OLD_COMPAT_IPC
d1603990e Randy Dunlap    2013-06-18  2727  	select BINFMT_ELF
a97f52e67 Roland McGrath  2008-01-30  2728  	select COMPAT_BINFMT_ELF
39f88911b Ingo Molnar     2016-11-15  2729  	select COMPAT_OLD_SIGACTION
8f9ca475c Ingo Molnar     2009-02-05  2730  	---help---
5fd92e65a H. J. Lu        2012-02-19  2731  	  Include code to run legacy 32-bit programs under a
5fd92e65a H. J. Lu        2012-02-19  2732  	  64-bit kernel. You should likely turn this on, unless you're
5fd92e65a H. J. Lu        2012-02-19  2733  	  100% sure that you don't have any 32-bit programs left.
e279b6c1d Sam Ravnborg    2007-11-06  2734  
e279b6c1d Sam Ravnborg    2007-11-06  2735  config IA32_AOUT
e279b6c1d Sam Ravnborg    2007-11-06  2736  	tristate "IA32 a.out support"
6b213e1bc David Woodhouse 2008-06-16  2737  	depends on IA32_EMULATION
8f9ca475c Ingo Molnar     2009-02-05  2738  	---help---
e279b6c1d Sam Ravnborg    2007-11-06  2739  	  Support old a.out binaries in the 32bit emulation.
e279b6c1d Sam Ravnborg    2007-11-06  2740  
0bf627639 H. Peter Anvin  2012-02-27  2741  config X86_X32
6ea303864 Kees Cook       2012-10-02  2742  	bool "x32 ABI for 64-bit mode"
9b54050bf Brian Gerst     2015-06-22  2743  	depends on X86_64
5fd92e65a H. J. Lu        2012-02-19  2744  	---help---
5fd92e65a H. J. Lu        2012-02-19  2745  	  Include code to run binaries for the x32 native 32-bit ABI
5fd92e65a H. J. Lu        2012-02-19  2746  	  for 64-bit processors.  An x32 process gets access to the
5fd92e65a H. J. Lu        2012-02-19  2747  	  full 64-bit register file and wide data path while leaving
5fd92e65a H. J. Lu        2012-02-19  2748  	  pointers at 32 bits for smaller memory footprint.
5fd92e65a H. J. Lu        2012-02-19  2749  
5fd92e65a H. J. Lu        2012-02-19  2750  	  You will need a recent binutils (2.22 or later) with
5fd92e65a H. J. Lu        2012-02-19  2751  	  elf32_x86_64 support enabled to compile a kernel with this
5fd92e65a H. J. Lu        2012-02-19  2752  	  option set.
5fd92e65a H. J. Lu        2012-02-19  2753  
953fee1d8 Ingo Molnar     2016-11-15  2754  config COMPAT_32
953fee1d8 Ingo Molnar     2016-11-15  2755  	def_bool y
953fee1d8 Ingo Molnar     2016-11-15  2756  	depends on IA32_EMULATION || X86_32
953fee1d8 Ingo Molnar     2016-11-15  2757  	select HAVE_UID16
953fee1d8 Ingo Molnar     2016-11-15  2758  	select OLD_SIGSUSPEND3
953fee1d8 Ingo Molnar     2016-11-15  2759  
e279b6c1d Sam Ravnborg    2007-11-06  2760  config COMPAT
3c2362e62 Harvey Harrison 2008-01-30  2761  	def_bool y
0bf627639 H. Peter Anvin  2012-02-27  2762  	depends on IA32_EMULATION || X86_X32
e279b6c1d Sam Ravnborg    2007-11-06  2763  
3120e25ef Jan Beulich     2012-09-10  2764  if COMPAT
e279b6c1d Sam Ravnborg    2007-11-06  2765  config COMPAT_FOR_U64_ALIGNMENT
3120e25ef Jan Beulich     2012-09-10  2766  	def_bool y
e279b6c1d Sam Ravnborg    2007-11-06  2767  
e279b6c1d Sam Ravnborg    2007-11-06  2768  config SYSVIPC_COMPAT
3c2362e62 Harvey Harrison 2008-01-30  2769  	def_bool y
3120e25ef Jan Beulich     2012-09-10  2770  	depends on SYSVIPC
e279b6c1d Sam Ravnborg    2007-11-06  2771  
e279b6c1d Sam Ravnborg    2007-11-06 @2772  endmenu
e279b6c1d Sam Ravnborg    2007-11-06  2773  
e279b6c1d Sam Ravnborg    2007-11-06  2774  
e5beae169 Keith Packard   2008-11-03  2775  config HAVE_ATOMIC_IOMAP

:::::: The code at line 2772 was first introduced by commit
:::::: e279b6c1d329e50b766bce96aacc197eae8a053b x86: start unification of arch/x86/Kconfig.*

:::::: TO: Sam Ravnborg <sam@ravnborg.org>
:::::: CC: Sam Ravnborg <sam@ravnborg.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] security/keys: add CONFIG_KEYS_COMPAT to Kconfig
@ 2017-01-26 12:55       ` kbuild test robot
  0 siblings, 0 replies; 14+ messages in thread
From: kbuild test robot @ 2017-01-26 12:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Bilal,

[auto build test ERROR on arm-soc/for-next]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Bilal-Amarni/security-keys-add-CONFIG_KEYS_COMPAT-to-Kconfig/20170126-195458
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git for-next
config: x86_64-randconfig-x014-201704
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        make ARCH=x86_64  randconfig
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> arch/x86/Kconfig:2772: unexpected 'endmenu' within if block
>> lib/Kconfig:554: syntax error
>> arch/x86/Kconfig:2719: missing end statement for this entry
   make[2]: *** [oldconfig] Error 1
   make[1]: *** [oldconfig] Error 2
   make: *** [sub-make] Error 2
--
>> arch/x86/Kconfig:2772: unexpected 'endmenu' within if block
>> lib/Kconfig:554: syntax error
>> arch/x86/Kconfig:2719: missing end statement for this entry
   make[2]: *** [olddefconfig] Error 1
   make[2]: Target 'oldnoconfig' not remade because of errors.
   make[1]: *** [oldnoconfig] Error 2
   make: *** [sub-make] Error 2

vim +/endmenu +2772 arch/x86/Kconfig

e3263ab38 David Herrmann  2013-08-02  2713  
e3263ab38 David Herrmann  2013-08-02  2714  	  If unsure, say Y.
e3263ab38 David Herrmann  2013-08-02  2715  
e279b6c1d Sam Ravnborg    2007-11-06  2716  endmenu
e279b6c1d Sam Ravnborg    2007-11-06  2717  
e279b6c1d Sam Ravnborg    2007-11-06  2718  
e279b6c1d Sam Ravnborg    2007-11-06 @2719  menu "Executable file formats / Emulations"
e279b6c1d Sam Ravnborg    2007-11-06  2720  
e279b6c1d Sam Ravnborg    2007-11-06  2721  source "fs/Kconfig.binfmt"
e279b6c1d Sam Ravnborg    2007-11-06  2722  
e279b6c1d Sam Ravnborg    2007-11-06  2723  config IA32_EMULATION
e279b6c1d Sam Ravnborg    2007-11-06  2724  	bool "IA32 Emulation"
e279b6c1d Sam Ravnborg    2007-11-06  2725  	depends on X86_64
39f88911b Ingo Molnar     2016-11-15  2726  	select ARCH_WANT_OLD_COMPAT_IPC
d1603990e Randy Dunlap    2013-06-18  2727  	select BINFMT_ELF
a97f52e67 Roland McGrath  2008-01-30  2728  	select COMPAT_BINFMT_ELF
39f88911b Ingo Molnar     2016-11-15  2729  	select COMPAT_OLD_SIGACTION
8f9ca475c Ingo Molnar     2009-02-05  2730  	---help---
5fd92e65a H. J. Lu        2012-02-19  2731  	  Include code to run legacy 32-bit programs under a
5fd92e65a H. J. Lu        2012-02-19  2732  	  64-bit kernel. You should likely turn this on, unless you're
5fd92e65a H. J. Lu        2012-02-19  2733  	  100% sure that you don't have any 32-bit programs left.
e279b6c1d Sam Ravnborg    2007-11-06  2734  
e279b6c1d Sam Ravnborg    2007-11-06  2735  config IA32_AOUT
e279b6c1d Sam Ravnborg    2007-11-06  2736  	tristate "IA32 a.out support"
6b213e1bc David Woodhouse 2008-06-16  2737  	depends on IA32_EMULATION
8f9ca475c Ingo Molnar     2009-02-05  2738  	---help---
e279b6c1d Sam Ravnborg    2007-11-06  2739  	  Support old a.out binaries in the 32bit emulation.
e279b6c1d Sam Ravnborg    2007-11-06  2740  
0bf627639 H. Peter Anvin  2012-02-27  2741  config X86_X32
6ea303864 Kees Cook       2012-10-02  2742  	bool "x32 ABI for 64-bit mode"
9b54050bf Brian Gerst     2015-06-22  2743  	depends on X86_64
5fd92e65a H. J. Lu        2012-02-19  2744  	---help---
5fd92e65a H. J. Lu        2012-02-19  2745  	  Include code to run binaries for the x32 native 32-bit ABI
5fd92e65a H. J. Lu        2012-02-19  2746  	  for 64-bit processors.  An x32 process gets access to the
5fd92e65a H. J. Lu        2012-02-19  2747  	  full 64-bit register file and wide data path while leaving
5fd92e65a H. J. Lu        2012-02-19  2748  	  pointers at 32 bits for smaller memory footprint.
5fd92e65a H. J. Lu        2012-02-19  2749  
5fd92e65a H. J. Lu        2012-02-19  2750  	  You will need a recent binutils (2.22 or later) with
5fd92e65a H. J. Lu        2012-02-19  2751  	  elf32_x86_64 support enabled to compile a kernel with this
5fd92e65a H. J. Lu        2012-02-19  2752  	  option set.
5fd92e65a H. J. Lu        2012-02-19  2753  
953fee1d8 Ingo Molnar     2016-11-15  2754  config COMPAT_32
953fee1d8 Ingo Molnar     2016-11-15  2755  	def_bool y
953fee1d8 Ingo Molnar     2016-11-15  2756  	depends on IA32_EMULATION || X86_32
953fee1d8 Ingo Molnar     2016-11-15  2757  	select HAVE_UID16
953fee1d8 Ingo Molnar     2016-11-15  2758  	select OLD_SIGSUSPEND3
953fee1d8 Ingo Molnar     2016-11-15  2759  
e279b6c1d Sam Ravnborg    2007-11-06  2760  config COMPAT
3c2362e62 Harvey Harrison 2008-01-30  2761  	def_bool y
0bf627639 H. Peter Anvin  2012-02-27  2762  	depends on IA32_EMULATION || X86_X32
e279b6c1d Sam Ravnborg    2007-11-06  2763  
3120e25ef Jan Beulich     2012-09-10  2764  if COMPAT
e279b6c1d Sam Ravnborg    2007-11-06  2765  config COMPAT_FOR_U64_ALIGNMENT
3120e25ef Jan Beulich     2012-09-10  2766  	def_bool y
e279b6c1d Sam Ravnborg    2007-11-06  2767  
e279b6c1d Sam Ravnborg    2007-11-06  2768  config SYSVIPC_COMPAT
3c2362e62 Harvey Harrison 2008-01-30  2769  	def_bool y
3120e25ef Jan Beulich     2012-09-10  2770  	depends on SYSVIPC
e279b6c1d Sam Ravnborg    2007-11-06  2771  
e279b6c1d Sam Ravnborg    2007-11-06 @2772  endmenu
e279b6c1d Sam Ravnborg    2007-11-06  2773  
e279b6c1d Sam Ravnborg    2007-11-06  2774  
e5beae169 Keith Packard   2008-11-03  2775  config HAVE_ATOMIC_IOMAP

:::::: The code at line 2772 was first introduced by commit
:::::: e279b6c1d329e50b766bce96aacc197eae8a053b x86: start unification of arch/x86/Kconfig.*

:::::: TO: Sam Ravnborg <sam@ravnborg.org>
:::::: CC: Sam Ravnborg <sam@ravnborg.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] security/keys: add CONFIG_KEYS_COMPAT to Kconfig
  2017-01-26 12:55       ` kbuild test robot
@ 2017-01-26 13:27         ` Bilal Amarni
  -1 siblings, 0 replies; 14+ messages in thread
From: Bilal Amarni @ 2017-01-26 13:27 UTC (permalink / raw)
  To: fengguang.wu
  Cc: arnd, bilal.amarni, catalin.marinas, will.deacon, linux-kernel,
	linux-arm-kernel

CONFIG_KEYS_COMPAT is defined in arch-specific Kconfigs and is missing for
several 64-bit architectures : arm64, 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.

Signed-off-by: Bilal Amarni <bilal.amarni@gmail.com>
---
 arch/powerpc/Kconfig  | 5 -----
 arch/s390/Kconfig     | 3 ---
 arch/sparc/Kconfig    | 3 ---
 arch/x86/Kconfig      | 4 ----
 security/keys/Kconfig | 4 ++++
 5 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a8ee573..5947ea2 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -1128,11 +1128,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
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index c6722112..633f553 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -362,9 +362,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"
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index cf4034c..2b07f0a 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -571,9 +571,6 @@ config SYSVIPC_COMPAT
 	depends on COMPAT && SYSVIPC
 	default y
 
-config KEYS_COMPAT
-	def_bool y if COMPAT && KEYS
-
 endmenu
 
 source "net/Kconfig"
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index e487493..f93b6ba 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2768,10 +2768,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
diff --git a/security/keys/Kconfig b/security/keys/Kconfig
index d942c7c..f44d8be 100644
--- 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
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] security/keys: add CONFIG_KEYS_COMPAT to Kconfig
@ 2017-01-26 13:27         ` Bilal Amarni
  0 siblings, 0 replies; 14+ messages in thread
From: Bilal Amarni @ 2017-01-26 13:27 UTC (permalink / raw)
  To: linux-arm-kernel

CONFIG_KEYS_COMPAT is defined in arch-specific Kconfigs and is missing for
several 64-bit architectures : arm64, 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.

Signed-off-by: Bilal Amarni <bilal.amarni@gmail.com>
---
 arch/powerpc/Kconfig  | 5 -----
 arch/s390/Kconfig     | 3 ---
 arch/sparc/Kconfig    | 3 ---
 arch/x86/Kconfig      | 4 ----
 security/keys/Kconfig | 4 ++++
 5 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a8ee573..5947ea2 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -1128,11 +1128,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
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index c6722112..633f553 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -362,9 +362,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"
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index cf4034c..2b07f0a 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -571,9 +571,6 @@ config SYSVIPC_COMPAT
 	depends on COMPAT && SYSVIPC
 	default y
 
-config KEYS_COMPAT
-	def_bool y if COMPAT && KEYS
-
 endmenu
 
 source "net/Kconfig"
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index e487493..f93b6ba 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2768,10 +2768,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
diff --git a/security/keys/Kconfig b/security/keys/Kconfig
index d942c7c..f44d8be 100644
--- 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
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] security/keys: add CONFIG_KEYS_COMPAT to Kconfig
  2017-01-26 13:27         ` Bilal Amarni
@ 2017-02-08 13:01           ` Bilal Amarni
  -1 siblings, 0 replies; 14+ messages in thread
From: Bilal Amarni @ 2017-02-08 13:01 UTC (permalink / raw)
  To: fengguang.wu
  Cc: Arnd Bergmann, Bilal Amarni, catalin.marinas, will.deacon,
	linux-kernel, linux-arm-kernel

Hi Arnd,

I've made the patch more generic as requested. As the patch affects
now other architectures, is it still able to go through arm mailing
list?

Thanks,
Bilal

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] security/keys: add CONFIG_KEYS_COMPAT to Kconfig
@ 2017-02-08 13:01           ` Bilal Amarni
  0 siblings, 0 replies; 14+ messages in thread
From: Bilal Amarni @ 2017-02-08 13:01 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd,

I've made the patch more generic as requested. As the patch affects
now other architectures, is it still able to go through arm mailing
list?

Thanks,
Bilal

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] security/keys: add CONFIG_KEYS_COMPAT to Kconfig
  2017-02-08 13:01           ` Bilal Amarni
@ 2017-02-08 13:25             ` Arnd Bergmann
  -1 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2017-02-08 13:25 UTC (permalink / raw)
  To: Bilal Amarni
  Cc: fengguang.wu, Catalin Marinas, Will Deacon,
	Linux Kernel Mailing List, Linux ARM

On Wed, Feb 8, 2017 at 2:01 PM, Bilal Amarni <bilal.amarni@gmail.com> wrote:
> Hi Arnd,
>
> I've made the patch more generic as requested. As the patch affects
> now other architectures, is it still able to go through arm mailing
> list?

It would be good to get an Ack from the other architecture maintainers, you
need to add them to Cc in the submission. The best person to merge the
combined patch would be  the keyring maintainer, so send the patch 'To'
him (from MAINTAINERS file):

KEYS/KEYRINGS:
M:      David Howells <dhowells@redhat.com>
L:      keyrings@vger.kernel.org
S:      Maintained

   Arnd

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] security/keys: add CONFIG_KEYS_COMPAT to Kconfig
@ 2017-02-08 13:25             ` Arnd Bergmann
  0 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2017-02-08 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Feb 8, 2017 at 2:01 PM, Bilal Amarni <bilal.amarni@gmail.com> wrote:
> Hi Arnd,
>
> I've made the patch more generic as requested. As the patch affects
> now other architectures, is it still able to go through arm mailing
> list?

It would be good to get an Ack from the other architecture maintainers, you
need to add them to Cc in the submission. The best person to merge the
combined patch would be  the keyring maintainer, so send the patch 'To'
him (from MAINTAINERS file):

KEYS/KEYRINGS:
M:      David Howells <dhowells@redhat.com>
L:      keyrings at vger.kernel.org
S:      Maintained

   Arnd

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-02-08 13:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-23 17:03 [PATCH] ARM64: enable CONFIG_KEYS_COMPAT in Kconfig Bilal Amarni
2017-01-23 17:03 ` Bilal Amarni
2017-01-25 21:22 ` Arnd Bergmann
2017-01-25 21:22   ` Arnd Bergmann
2017-01-26 11:49   ` [PATCH] security/keys: add CONFIG_KEYS_COMPAT to Kconfig Bilal Amarni
2017-01-26 11:49     ` Bilal Amarni
2017-01-26 12:55     ` kbuild test robot
2017-01-26 12:55       ` kbuild test robot
2017-01-26 13:27       ` Bilal Amarni
2017-01-26 13:27         ` Bilal Amarni
2017-02-08 13:01         ` Bilal Amarni
2017-02-08 13:01           ` Bilal Amarni
2017-02-08 13:25           ` Arnd Bergmann
2017-02-08 13:25             ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.