All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	herbert.xu@redhat.com, linux-kernel@vger.kernel.org,
	arjan@infradead.org
Subject: Re: [PATCH 4/5] AF_RXRPC: Key facility changes for AF_RXRPC [try #2]
Date: Fri, 16 Mar 2007 14:15:46 +0000	[thread overview]
Message-ID: <25410.1174054546@redhat.com> (raw)
In-Reply-To: <20070316133824.GC2173@infradead.org>

Christoph Hellwig <hch@infradead.org> wrote:

> You wrote the code so there must be some reason for this, but these
> changes look rather odd to me :)

The union is for use by the type in any way it sees fit, but it may not want to
use it as a list_head.  So all I've done is to make it available as a pair of
arbitrary pointers or a pair of arbitrary numbers.

Maybe a better way would be to have an overlay struct that's private to the
type, sort of how sk_buff::cb works.

> Having a type exported is really odd, how is this supposed to be a public API?

Keyrings are a special type.

It occurred to me whilst doing this that the best way to achieve what I wanted
was by dealing with rings of keys.  What I needed was for the server app to
give the kernel a key for each security type it wanted to support, which the
kernel would then have to retain.  It seems natural to use a keyring to do the
retension as that's its purpose.

Another way to look at it is that in the client I need just one key at once,
and I can get that from the process as it's setting up the connection.
However, in the server I need to have several keys, and I need them available
up front because the server app doesn't set up a connection, the kernel does,
and it needs the keys immediately.

I'll add a mention to Documentation/keys.txt to record this exportation.

David

  reply	other threads:[~2007-03-16 14:16 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-16 12:50 [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #2] David Howells
2007-03-16 12:50 ` [PATCH 1/5] AF_RXRPC: Add blkcipher accessors for using kernel data directly " David Howells
2007-03-16 13:32   ` Christoph Hellwig
2007-03-16 13:57     ` David Howells
2007-03-16 15:12       ` Alan Cox
2007-03-16 14:19         ` David Howells
2007-03-16 12:50 ` [PATCH 2/5] AF_RXRPC: Move generic skbuff stuff from XFRM code to generic code " David Howells
2007-03-16 13:36   ` Christoph Hellwig
2007-03-16 12:50 ` [PATCH 3/5] AF_RXRPC: Make it possible to merely try to cancel timers and delayed work " David Howells
2007-03-16 15:07   ` Alan Cox
2007-03-16 14:22     ` David Howells
2007-03-16 12:50 ` [PATCH 4/5] AF_RXRPC: Key facility changes for AF_RXRPC " David Howells
2007-03-16 13:38   ` Christoph Hellwig
2007-03-16 14:15     ` David Howells [this message]
2007-03-16 13:40 ` [PATCH 0/5] [RFC] AF_RXRPC socket family implementation " Christoph Hellwig
2007-03-16 15:13 ` Alan Cox
2007-03-16 14:23   ` David Howells
2007-03-16 15:34     ` Alan Cox
2007-03-16 15:14       ` David Howells
2007-03-16 17:11         ` Alan Cox
2007-03-18  6:32           ` Kyle Moffett
2007-03-18 14:23             ` Alan Cox
2007-03-19 11:56               ` David Howells
2007-03-19 13:04                 ` Alan Cox
2007-03-19 12:59                   ` David Howells
2007-03-19 15:29                     ` Alan Cox
2007-03-19 15:41                       ` David Howells
2007-03-19 19:03                         ` Alan Cox
2007-03-20 11:16                           ` David Howells
2007-03-19 19:19                         ` David Miller
2007-03-20 13:16                           ` David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25410.1174054546@redhat.com \
    --to=dhowells@redhat.com \
    --cc=arjan@infradead.org \
    --cc=davem@davemloft.net \
    --cc=hch@infradead.org \
    --cc=herbert.xu@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.