Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1380541

Re: [RFC PATCH] KEYS: Provide keyctls to do public key operations

From David Howells <dhowells@redhat.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] KEYS: Provide keyctls to do public key operations
Date 2016-04-16 13:40 +0200
Message-ID <rowJX-2J1-3@gated-at.bofh.it> (permalink)
References <rok66-1C3-7@gated-at.bofh.it> <rnXCz-QG-5@gated-at.bofh.it> <rok66-1C3-7@gated-at.bofh.it>
Organization Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903

Show all headers | View raw


Mat Martineau <mathew.j.martineau@linux.intel.com> wrote:

> > The interface for the active ops is a bit clunky as the syscall interface
> > doesn't provide sufficient argument space to pass everything I need to
> > specify.  Some basic integer arguments are specified in a struct and more
> > complex options through a string of key=val pairs - just so I don't have to
> > deal with the compat code for dealing with a struct containing pointers
> > (but I can change to that if it's preferable).
>
> It sounds like the struct would still have pointers to strings that would
> need parsing,

It doesn't:

	struct keyctl_pkey_params {
		__s32		key_id;
		__s32		password_id;
		__u32		data_len;
		__u32		enc_len;
		__u32		__spare[4];
	};

because I have sufficient syscall arguments to pass four pointers - the struct
above, one info string and two buffer pointers.

> so I'm not sure it's that much overhead to handle the short
> strings of key=val pairs. But I'll agree that it feels clunky.

... fixes applied ...

> > +	info->supported_ops = KEYCTL_SUPPORTS_VERIFY;
> 
> Did you intend to include encrypt/decrypt/sign here?

When they're implemented there.

David

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [RFC PATCH] KEYS: Provide keyctls to do public key operations Mat Martineau <mathew.j.martineau@linux.intel.com> - 2016-04-16 00:10 +0200
  Re: [RFC PATCH] KEYS: Provide keyctls to do public key operations David Howells <dhowells@redhat.com> - 2016-04-16 13:40 +0200

csiph-web