Austin Group Defect Tracker

Aardvark Mark III


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000834 [1003.1(2013)/Issue7+TC1] Base Definitions and Headers Objection Clarification Requested 2014-04-21 20:47 2014-04-24 15:48
Reporter jilles View Status public  
Assigned To
Priority normal Resolution Accepted As Marked  
Status Resolved  
Name Jilles Tjoelker
Organization FreeBSD
User Reference
Section 3.168 File Mode
Page Number 60
Line Number 1780-1781
Interp Status ---
Final Accepted Text Note: 0002234
Summary 0000834: definition of file mode is too restrictive
Description Some of the newer file types such as shared memory objects have to be tested using macros like S_TYPEISSHM(buf) which take a pointer to the whole struct stat instead of the st_mode field. This seems intended to allow the newer file types to be distinguished from each other using other fields in struct stat (such as st_rdev, st_ino or implementation-specific fields), and is important because a 16-bit mode_t only has 4 bits to encode the file type.

However, the definition of file mode in XBD 3.168 defines a file mode as "An object containing the file mode bits and file type of a file."

The definitions of mode_t and st_mode appear sufficiently vague that it is permitted to store parts of the file type elsewhere.
Desired Action Change XBD 3.168 from

An object containing the file mode bits and file type of a file.

to

An object containing the file mode bits and some information about the file type of a file.

Some rationale addition may be useful here to state that only the file types for which S_ISxxx macros exist need be detectable using the file mode.
Tags tc2-2008
Attached Files

- Relationships
related to 0000732Under Reviewajosey 1003.1(2008)/Issue 7 Change parameter description of S_IS_XXX macros? 

-  Notes
(0002231)
shware_systems (reporter)
2014-04-24 15:10

This is related to Bug #732, if not a duplicate...

As POSIX systems require at least 18 bits for st_mode, to handle permissions, flags, and the required device types, those systems that just store device type and permissions in 16 bits are obsolete systems. In byte granularity, a st_mode field is at least 24 bits and more likely 32.
(0002233)
shware_systems (reporter)
2014-04-24 15:34
edited on: 2014-04-24 15:48

During the phone call of 04-24-2014 it was pointed out that one bit per file type was not required, so that only 15 bits was needed for current requirements if file type is an enumeration. So, 16 bits is plausible, but still leaves just one bit for expansion.

(0002234)
geoffclare (manager)
2014-04-24 15:48

Change XBD 3.168 from

An object containing the file mode bits and file type of a file.

to

An object containing the file mode bits and some information about the file type of a file.

- Issue History
Date Modified Username Field Change
2014-04-21 20:47 jilles New Issue
2014-04-21 20:47 jilles Name => Jilles Tjoelker
2014-04-21 20:47 jilles Organization => FreeBSD
2014-04-21 20:47 jilles Section => 3.168 File Mode
2014-04-21 20:47 jilles Page Number => 60
2014-04-21 20:47 jilles Line Number => 1780-1781
2014-04-24 15:10 shware_systems Note Added: 0002231
2014-04-24 15:25 eblake Relationship added related to 0000732
2014-04-24 15:34 shware_systems Note Added: 0002233
2014-04-24 15:35 shware_systems Note Edited: 0002233
2014-04-24 15:48 geoffclare Interp Status => ---
2014-04-24 15:48 geoffclare Note Added: 0002234
2014-04-24 15:48 geoffclare Status New => Resolved
2014-04-24 15:48 geoffclare Resolution Open => Accepted As Marked
2014-04-24 15:48 Don Cragun Note Edited: 0002233
2014-04-24 15:48 geoffclare Final Accepted Text => Note: 0002234
2014-04-24 15:49 geoffclare Tag Attached: tc2-2008


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker