[AFS3-std] Re: XDR extensible union type

Tom Keiser tkeiser@sinenomine.net
Mon, 19 Sep 2011 21:48:26 -0400


Hi all,

This is a second call for review of draft-keiser-afs3-xdr-union-03.

Recently, Andrew and I discussed an implementation issue.  We both
concluded that it is orthogonal to the specification.  Nonetheless, I
wanted to bring it up on list to ask whether anyone feels that it
warrants a paragraph in the i-d.  Briefly, the issue is that the
ext-union specification does not provide any way to specify a max leg
length.  Hence, a client could send a 4GB leg without breaking the
specification.

To a large extent, this is practically the same behavior as sending an
enormous XDR octet stream to an Rx service endpoint before bothering
to assert the RX_LAST_PACKET header flag.  However, I think there is a
subtle difference: with the existing mechanisms, our XDR
specifications allow us to specify, and hence detect at run-time,
exceedingly long xdr variable-length arrays, thus permitting an
endpoint to send an abort packet to the caller as soon as the illegal
behavior is detected.  In the ext-union case, we would dutifully
ignore and swallow all 4GB of (unknown) implied leg.  I suspect there
are cases where the server would like to send an abort to the caller
as soon as it detects the implied leg length is absurd, rather than
spinning and processing the rx data packets until the entire leg is
received.

I think this also begs the question: is the above sufficient
motivation to revise the ext-union RPC-L grammar to include an
optional max-leg-length specification, e.g., the following:


       ext-union-type-spec:
          "ext-union" ext-union-body
+       | "ext-union" ext-union-options ext-union-body
+      ext-union-options:
+         "[" ext-union-options-body "]"
+      ext-union-options-body:
+         ext-union-option
+       | ext-union-options-body "," ext-union-option
+      ext-union-option:
+         ext-union-opt-max-leg-length
+      ext-union-opt-max-leg-length:
+         "max-leg-length" "=3D" value
       ext-union-body:
          "switch" "(" declaration ")" "{"
             case-spec
             case-spec *
          "}"


Cheers,

-Tom


On Sun, Jul 31, 2011 at 7:53 PM, Tom Keiser <tkeiser@sinenomine.net> wrote:
> I pushed draft-keiser-afs3-xdr-union-03 (incorporating Derrick's grammati=
cal
> corrections) to the IETF last week.=A0 Comments are hereby solicited.
>
> http://tools.ietf.org/html/draft-keiser-afs3-xdr-union-03
>
> Cheers,
>
> -Tom
>
> On Jul 20, 2011 8:46 PM, "Tom Keiser" <tkeiser@sinenomine.net> wrote:
>> Hi Derrick,
>>
>> Thanks very much for the review; I'll incorporate those edits.
>>
>> I'd like to publish -03 on Tuesday. If any interested party can find tim=
e
>> to send comments by Monday, it would be greatly appreciated.
>>
>> Cheers,
>>
>> -Tom
>>
>> Sent from my phone; please excuse any typographic or grammatical errors.
>>
>> -----Original Message-----
>> From: Derrick Brashear [shadow@gmail.com]
>> Received: Wednesday, 20 Jul 2011, 9:33am
>> To: Tom Keiser [tkeiser@sinenomine.net]
>> Subject: Re: [AFS3-std] Re: XDR extensible union type
>>
>> i lie
>>
>> "1. Lookup the discriminant"
>>
>> I believe that should be, as an operation, "look up"
>>
>>
>> On Wed, Jul 20, 2011 at 9:31 AM, Derrick Brashear <shadow@gmail.com>
>> wrote:
>>> 6. AFS Assign Numbers Registrar Considerations
>>>
>>> "Assigned"
>>>
>>> the actual content is fine and i see no issues.
>>>
>>> On Tue, Jul 19, 2011 at 6:02 PM, Tom Keiser <tkeiser@sinenomine.net>
>>> wrote:
>>>> On Jun 20, 2011 2:41 PM, "Tom Keiser" <tkeiser@sinenomine.net> wrote:
>>>>> Hi all,
>>>>>
>>>>> I pushed a new revision of draft-keiser-afs3-xdr-union:
>>>>>
>>>>> http://tools.ietf.org/html/draft-keiser-afs3-xdr-union-02
>>>>>
>>>>> This revision incorporates the following two changes:
>>>>>
>>>>> * modify section on error handling (3.4.1) to make length mismatches =
a
>>>>> fatal error
>>>>> * add a "use case" section (1.1) to discuss trade-offs associated wit=
h
>>>>> using this type
>>>>>
>>>>> Any comments are welcome.
>>>>>
>>>>> -Tom
>>>>
>>>> This is a second call for review of draft-keiser-afs3-xdr-union-02; al=
l
>>>> comments are welcome.
>>>>
>>>> Cheers,
>>>>
>>>> -Tom
>>>
>>>
>>>
>>> --
>>> Derrick
>>>
>>
>>
>>
>> --
>> Derrick
>



--=20
Tom Keiser
tkeiser@gmail.com