Re: KITTEN: IETF 75 - 76

Nicolas Williams <Nicolas.Williams@sun.com> Mon, 17 August 2009 23:31 UTC

Return-Path: <Nicolas.Williams@sun.com>
X-Original-To: kitten@core3.amsl.com
Delivered-To: kitten@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id CE71E3A6D90 for <kitten@core3.amsl.com>; Mon, 17 Aug 2009 16:31:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.902
X-Spam-Level:
X-Spam-Status: No, score=-5.902 tagged_above=-999 required=5 tests=[AWL=0.144, BAYES_00=-2.599, HELO_MISMATCH_COM=0.553, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fasXg-GLoG3n for <kitten@core3.amsl.com>; Mon, 17 Aug 2009 16:31:46 -0700 (PDT)
Received: from brmea-mail-4.sun.com (brmea-mail-4.Sun.COM [192.18.98.36]) by core3.amsl.com (Postfix) with ESMTP id F3CF53A682F for <kitten@ietf.org>; Mon, 17 Aug 2009 16:31:45 -0700 (PDT)
Received: from dm-central-01.central.sun.com ([129.147.62.4]) by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n7HNVpfa002906 for <kitten@ietf.org>; Mon, 17 Aug 2009 23:31:51 GMT
Received: from binky.Central.Sun.COM (binky.Central.Sun.COM [129.153.128.104]) by dm-central-01.central.sun.com (8.13.8+Sun/8.13.8/ENSMAIL, v2.2) with ESMTP id n7HNVmKN051039 for <kitten@ietf.org>; Mon, 17 Aug 2009 17:31:48 -0600 (MDT)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1]) by binky.Central.Sun.COM (8.14.3+Sun/8.14.3) with ESMTP id n7HNL6N2003273; Mon, 17 Aug 2009 18:21:06 -0500 (CDT)
Received: (from nw141292@localhost) by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id n7HNL6RM003272; Mon, 17 Aug 2009 18:21:06 -0500 (CDT)
X-Authentication-Warning: binky.Central.Sun.COM: nw141292 set sender to Nicolas.Williams@sun.com using -f
Date: Mon, 17 Aug 2009 18:21:06 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: Martin Rex <Martin.Rex@sap.com>
Subject: Re: KITTEN: IETF 75 - 76
Message-ID: <20090817232106.GH1043@Sun.COM>
References: <20090817222500.GC1043@Sun.COM> <200908172310.n7HNA875008595@fs4113.wdf.sap.corp>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <200908172310.n7HNA875008595@fs4113.wdf.sap.corp>
User-Agent: Mutt/1.5.7i
Cc: kitten@ietf.org, Shawn.Emery@sun.com
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Common Authentication Technologies - Next Generation <kitten.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/kitten>, <mailto:kitten-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/kitten>
List-Post: <mailto:kitten@ietf.org>
List-Help: <mailto:kitten-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/kitten>, <mailto:kitten-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 17 Aug 2009 23:31:46 -0000

On Tue, Aug 18, 2009 at 01:10:08AM +0200, Martin Rex wrote:
> > > hmm, is asynchronous calls related to exportable contexts perhaps...?
> 
> To me that sounds like barking up the wrong tree.
> 
> If an application does not want to get blocked, it should use
> seperate threads for the UI and other events that it does want
> to do in parallel.  The application should take care about
> and have control over each an every thread in a process.
> Having service APIs create additional threads invisible to
> the application will open a huge can of worms.

Of course that can be done, and that was my first response to Love.
However, implementors can well do better, in terms of efficiency, if
there are actual standard async variants of these.

To see why consider this: default stack sizes for threads can be quite
sizeable (e.g., 1MB in Solaris 32-bit, or 2MB in 64-bit).  An
application might have no idea how much stack space
gss_init/accept_sec_context() might need.

To be fair, a mechglue implementor who does the background thread thing
wouldn't necessarily know either, but chances are they will (one way or
another).  A mechglue and mechanism implementation where both support
the async functions might not even need anything more than a thread to
run a small I/O event loop, with tiny stack needs since all it'd do is
wait for I/O and call the application callback (which should probably
post an event to the application I/O loop).

> Maybe you want an API to specify timeouts after which a
> gssapi call should give up and return an error?  Ideally,
> that should already be configurable in an implementation specific
> fashion (but often is not).

That's not enough.  Nor is it necessary in the case where mechglue and
mechanisms support thread cancellation.  Of course, that's a very
OS-specific feature that the C bindings don't remotely address.  So yes,
a timeout parameter would be nice, but it's still not enough.