Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1417205 - Missing AF_VSOCK <sys/socket.h> constant
Missing AF_VSOCK <sys/socket.h> constant
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: glibc (Show other bugs)
7.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Florian Weimer
Sergey Kolosov
: Patch
Depends On:
Blocks: 1413146
  Show dependency treegraph
 
Reported: 2017-01-27 09:23 EST by Stefan Hajnoczi
Modified: 2017-08-01 14:09 EDT (History)
10 users (show)

See Also:
Fixed In Version: glibc-2.17-170.el7
Doc Type: Enhancement
Doc Text:
glibc now provides definitions for the AF_VSOCK, PF_VSOCK, and TCP_TIMESTAMP constants. These definitions correspond to features in the current Red Hat Enterprise Linux 7 kernel.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 14:09:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1916 normal SHIPPED_LIVE Moderate: glibc security, bug fix, and enhancement update 2017-08-01 14:05:43 EDT

  None (edit)
Description Stefan Hajnoczi 2017-01-27 09:23:54 EST
Description of problem:

bz#1291282 adds the virtio-vsock kernel drivers.  The AF_VSOCK constant that applications need for this new feature is provided by the glibc-headers package /usr/include/bits/socket.h header file.

The following glibc 2.18 commit is missing downstream:

commit 164fd39d05925717e75715929c7ced14a2c1505e
Author: Andreas Jaeger <aj@suse.de>
Date:   Fri May 3 20:51:27 2013 +0200

    Sync with Linux 3.9
    
            * sysdeps/gnu/netinet/tcp.h (TCP_TIMESTAMP): New value, from
            Linux 3.9.
            * sysdeps/unix/sysv/linux/bits/socket.h (PF_VSOCK, AF_VSOCK):
            Add.
            (PF_MAX): Adjust for VSOCK change.

As noted in the commit message, it also defines TCP_TIMESTAMP.  The kernel code for TCP_TIMESTAMP exists downstream so it seems reasonable to backport this commit wholesale.

Actual results:

$ grep -c AF_VSOCK /usr/include/bits/socket.h
0

Expected results:

$ grep -c AF_VSOCK /usr/include/bits/socket.h
1
Comment 1 Florian Weimer 2017-01-27 09:30:12 EST
We have not changed the value of PF_MAX in a y-stream release before, so I'm slightly worried by the upstream patch.

On the other hand, I have not heard anything about problems from such changes upstream.
Comment 2 Carlos O'Donell 2017-01-27 11:49:37 EST
(In reply to Florian Weimer from comment #1)
> We have not changed the value of PF_MAX in a y-stream release before, so I'm
> slightly worried by the upstream patch.
> 
> On the other hand, I have not heard anything about problems from such
> changes upstream.

Yes, we have never changed a value like PF_MAX in a y-stream release before. It could lead to a mismatch between library and application expectations.

However, given that PF_MAX grows with each addition of a new AF_* entry it would seem less than robust for an application to assume a PF_MAX value and use that to size an array passed to a library compiled with a different PF_MAX value. 

The other scenario is code that refuses to use the new value because it is larger than the old PF_MAX it knows about, and that's OK. That's a plausible safeguard against unknown AF_* values.

We have incremented PF_MAX in upstream and I have also never seen a problem upstream for this.
Comment 6 Sayan Saha 2017-02-03 09:09:38 EST
Agree with Brett's statement above. We need this in RHEL 7.4.
Comment 14 errata-xmlrpc 2017-08-01 14:09:25 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:1916

Note You need to log in before you can comment on or make changes to this bug.