[prev in list] [next in list] [prev in thread] [next in thread] 

List:       krb5-bugs
Subject:    [krbdev.mit.edu #8474] gnu libc OFD lock bug affects krb5
From:       "Greg Hudson via RT" <rt-comment () krbdev ! mit ! edu>
Date:       2016-08-14 15:20:27
Message-ID: rt-8474-46313.0.439902693799681 () krbdev ! mit ! edu
[Download RAW message or body]

It does not appear that there is a fcntl64() function in glibc, so I 
think the workaround would have to use syscall().

There is a struct flock64 in the header files (for use with F_SETLK64 and 
friends, I think).  Passing this to unmodified fcntl() currently works on 
32-bit Linux, but that seems like a bad workaround because it depends on 
the buggy behavior.  If the glibc bug is fixed in the future, glibc would 
be committing an aliasing violation reading values from a struct flock64 
as a struct flock.  In practice it would probably just read the same zero 
offsets as we want to set in the first place, though.

As an alternative, we could disable OFD locking on 32-bit Linux, and 
later re-enable it with a __GLIBC_PREREQ() check when there a fixed 
version.  But there's a chance that the upstream bug will never be fixed 
because of compatibility concerns, and it would be a shame to never get 
OFD locking on 32-bit Linux.
_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
https://mailman.mit.edu/mailman/listinfo/krb5-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic