A NOTE has been added to this issue. 
====================================================================== 
http://austingroupbugs.net/view.php?id=1274 
====================================================================== 
Reported By:                dannyniu
Assigned To:                
====================================================================== 
Project:                    1003.1(2016)/Issue7+TC2
Issue ID:                   1274
Category:                   Base Definitions and Headers
Type:                       Omission
Severity:                   Editorial
Priority:                   normal
Status:                     New
Name:                       DannyNiu/NJF 
Organization:               Individual 
User Reference:              
Section:                    <sys/types.h> header 
Page Number:                402-405 
Line Number:                13652-13746 
Interp Status:              --- 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2019-07-28 10:42 UTC
Last Modified:              2019-08-15 19:03 UTC
====================================================================== 
Summary:                    pid_t must fit in an int for definition of fcntl to
be consistent.
====================================================================== 

---------------------------------------------------------------------- 
 (0004527) shware_systems (reporter) - 2019-08-15 19:03
 http://austingroupbugs.net/view.php?id=1274#c4527 
---------------------------------------------------------------------- 
According to the linux kernel header <repo
URL>\include\uapi\asm-generic\fcntl.h, the definition is:
struct f_owner_ex {
        int     type;
        __kernel_pid_t  pid;
};

where __kernel_pid_t may not be assignment compatible with pid_t as defined
by a <sys/types.h> that non-kernel sources have access to. There is code
that establishes this compatibility when pid_t is expected to be typedef'd
as int by <sys/types.h>, but it can be overridden by source files with a
conflicting definition of __kernel_pid_t before the #include of that
<fcntl.h> header.

This is a conflict between the docs and the source, at the least. Whether a
bug report should be filed with the docs people or the source maintainers I
couldn't say for sure. It appears the source allows the redefinition for
backwards compatibility with processor specific optimizations for versions
of the kernel before LINUX deferred to POSIX for some interface
definitions. As such I lean to the docs being correct, the source has a
regression. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2019-07-28 10:42 dannyniu       New Issue                                    
2019-07-28 10:42 dannyniu       Name                      => DannyNiu/NJF    
2019-07-28 10:42 dannyniu       Organization              => Individual      
2019-07-28 10:42 dannyniu       Section                   => <sys/types.h>
header
2019-07-28 10:42 dannyniu       Page Number               => 402-405         
2019-07-28 10:42 dannyniu       Line Number               => 13652-13746     
2019-07-28 13:49 jilles         Note Added: 0004496                          
2019-07-29 00:52 shware_systems Note Added: 0004497                          
2019-07-29 09:08 geoffclare     Note Added: 0004498                          
2019-08-15 16:37 eblake         Note Added: 0004524                          
2019-08-15 16:52 shware_systems Note Added: 0004525                          
2019-08-15 16:58 eblake         Note Added: 0004526                          
2019-08-15 19:03 shware_systems Note Added: 0004527                          
======================================================================


Reply via email to