Subject: [nfsv4] rfc3530bis-18: How to treat undefined bits?

From: Marcel Telka <[email-masked]>
Date: Fri, 10 Aug 2012 14:27:13 +0200

Hi,

Let say we hava a bitmap field, for example aceflag4:

---------------------------------------------------------------------
6.2.1.  Attribute 12: acl

...

   typedef uint32_t aceflag4;

...

6.2.1.4.  ACE flag

   The bitmask constants used for the flag field are as follows:

   const ACE4_FILE_INHERIT_ACE             = 0x00000001;
   const ACE4_DIRECTORY_INHERIT_ACE        = 0x00000002;
   const ACE4_NO_PROPAGATE_INHERIT_ACE     = 0x00000004;
   const ACE4_INHERIT_ONLY_ACE             = 0x00000008;
   const ACE4_SUCCESSFUL_ACCESS_ACE_FLAG   = 0x00000010;
   const ACE4_FAILED_ACCESS_ACE_FLAG       = 0x00000020;
   const ACE4_IDENTIFIER_GROUP             = 0x00000040;
---------------------------------------------------------------------

It means that only 7 lower bits of the flag are defined. What about the upper
25 bits? Should they be zero? Can they be ones?

For example if I (as an NFS client) receive the aceflag4 field with value 0xff
from the NFS server, should this be considered as the protocol violation?

What should the NFS client do? Should the NFS client ignore all undefined bits,
so should the client just do aceflag4 & 0x7f and voila? Or, should the NFS
client report the undefined bits set to one as an issue and ignore the received
ACLs?

Is somewhere specified wht should be in the "undefined" bits?

Thanks.

-- 
Marcel Telka
RPE, Systems

---

From: "Haynes, Tom" <[email-masked]>
Date: Mon, 13 Aug 2012 16:57:25 +0000

> Let say we hava a bitmap field, for example aceflag4:

Marcel,

The spec defines all of the allowed constants for the minor version. So any other
values are protocol violations for the given minor version.

Say that a server which supports 4.1 as well as 4.0 sends back on a 4.0
request  ACE4_INHERITED_ACE:

  const ACE4_INHERITED_ACE                = 0x00000080;

That is clearly an error and IMHO should be both reported and the
compound failed on the client. If it is mixing minor versions in replies,
who knows what else it is doing.

Is all of this specified? Explicitly - no. Implicitly, yes - unless we define that
the allowed values have to be registered with IANA, they MUST be defined
in the spec to be valid.

Tom

> _______________________________________________
> nfsv4 mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/nfsv4

---

From: "Haynes, Tom" <[email-masked]>
Date: Mon, 13 Aug 2012 19:47:24 +0000

> the allowed values have to be registered with IANA, they MUST be defined

invalid!

---

From: Marcel Telka <[email-masked]>
Date: Mon, 13 Aug 2012 23:06:40 +0200

Hi Tom,

Thanks for the explanation and confirmation.

-- 
Marcel Telka
RPE, Systems