Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

security/keys/Kconfig: add KEYS_COMPAT option for keyctl tool #59

Open
wants to merge 1 commit into
base: rpi3-optee-4.6
Choose a base branch
from

Conversation

kkamagui
Copy link

The Keyctl tool of Raspbian OS doesn't work because Linux kernel of the rpi3
branch doesn't have compat_key functions.

To solve this problem, KEYS_COMPAT option is added to security/keys/Kconfig
file.

Signed-off-by: Seunghun Han kkamagui@gmail.com

@jbech-linaro
Copy link

Acked-by: Joakim Bech <joakim.bech@linaro.org>

@jenswi-linaro
Copy link

How does this relate to upstream? Is it possible to cherry-pick a few commits to achieve the same purpose?

@kkamagui
Copy link
Author

It seems that the commit torvalds@47b2c3f is related to my pull-request in Linux kernel source tree.

@jenswi-linaro
Copy link

Can we use torvalds/linux@47b2c3f instead then?
It makes it easier to tell what's from upstream and what's to try to upstream.

@kkamagui
Copy link
Author

Oh, that's good point. I will check that and update the progress about it.

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@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
cc: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Link: https://patchwork.kernel.org/patch/9565609/
(cherry picked from commit 47b2c3f)
Tested-by: Seunghun Han <kkamagui@gmail.com>
@kkamagui
Copy link
Author

kkamagui commented Apr 12, 2018

I cherry-picked the torvalds@47b2c3f commit from Linux kernel repository instead of my commit and tested it.
Thank you for your advice and please check the commit (4370eff) in my pull-request.

@jenswi-linaro
Copy link

Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants