[PATCH] Add key management syscalls to non-i386 archs

Arnd Bergmann arnd at arndb.de
Thu Oct 21 03:08:17 EST 2004


On Middeweken 20 Oktober 2004 16:44, David Howells wrote:

> diff -uNrp linux-2.6.9-bk4/arch/s390/kernel/compat_wrapper.S linux-2.6.9-bk4-keys/arch/s390/kernel/compat_wrapper.S
> --- linux-2.6.9-bk4/arch/s390/kernel/compat_wrapper.S	2004-06-18 13:43:49.000000000 +0100
> +++ linux-2.6.9-bk4-keys/arch/s390/kernel/compat_wrapper.S	2004-10-20 15:08:00.071403677 +0100
> @@ -1406,3 +1406,29 @@ compat_sys_mq_getsetattr_wrapper:
>  	llgtr	%r3,%r3			# struct compat_mq_attr *
>  	llgtr	%r4,%r4			# struct compat_mq_attr *
>  	jg	compat_sys_mq_getsetattr
> +
> +	.globl  sys32_add_key_wrapper
> +sys32_add_key_wrapper:
> +	lgfr	%r2,%r2			# const char *
> +	llgfr	%r3,%r3			# const char *
> +	llgfr	%r4,%r4			# const void *
> +	llgfr	%r5,%r5			# size_t
> +	llgfr	%r6,%r6			# key_serial_t
> +	jg	sys_add_key		# branch to system call
> +
> +	.globl  sys32_request_key_wrapper
> +sys32_request_key_wrapper:
> +	lgfr	%r2,%r2			# const char *
> +	llgfr	%r3,%r3			# const char *
> +	llgfr	%r4,%r4			# const char *
> +	llgfr	%r5,%r5			# key_serial_t
> +	jg	sys_request_key		# branch to system call
> +
> +	.globl  sys32_keyctl_wrapper
> +sys32_keyctl_wrapper:
> +	lgfr	%r2,%r2			# int
> +	llgfr	%r3,%r3			# unsigned long
> +	llgfr	%r4,%r4			# unsigned long
> +	llgfr	%r5,%r5			# unsigned long
> +	llgfr	%r6,%r6			# unsigned long
> +	jg	sys_keyctl		# branch to system call

The comments don't match with the code. Please use the correct
lgfr/llgfr/llgtr opcodes for signed/unsigned/pointer extension.
Note that for keyctl_wrapper, the actual conversion is not static
but depends on the value of %r2. You probably want to code that
conversion in C.

	Arnd <><
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20041020/2a01c183/attachment.pgp 


More information about the Linuxppc64-dev mailing list