Bug 205583 - vsock(7): description of 'struct sockaddr_vm' is incorrect
Summary: vsock(7): description of 'struct sockaddr_vm' is incorrect
Status: RESOLVED CODE_FIX
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-19 16:56 UTC by Mikhail
Modified: 2020-05-04 07:25 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Mikhail 2019-11-19 16:56:47 UTC
'man 7 vsock' has the following inconsistency with kernel:

The structure 'struct sockaddr_vm' is defined (up to the current master edca87323936e0ffb739ebf83a4d9d8e68800172) as the following:

struct sockaddr_vm {
  sa_family_t    svm_family;     /* Address family: AF_VSOCK */
  unsigned short svm_reserved1;
  unsigned int   svm_port;       /* Port # in host byte order */
  unsigned int   svm_cid;        /* Address in host byte order */
};

In reality it has additional 'unsigned char svm_zero[]' element to for the struct to have the same size as 'struct sockaddr'. This element is not mentioned and it is not mentioned that it must be zeroed. The check is in the kernel: https://elixir.bootlin.com/linux/v5.3.11/source/net/vmw_vsock/vsock_addr.c#L31
Comment 1 Michael Kerrisk 2020-05-04 07:25:18 UTC
Closing, since this issue was resolved by man-pages commits552c1210136b37d69456490d8ebadb9bcb3acf0d and cf4e631c960d3e59c83069830335700f4b112cbd

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