|
Bugzilla – Full Text Bug Listing |
| Summary: | libbtrfs-devel 4.5.1 breaks Docker build | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Tumbleweed | Reporter: | Aleksa Sarai <asarai> |
| Component: | Basesystem | Assignee: | David Sterba <dsterba> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Major | ||
| Priority: | P5 - None | CC: | mpluskal |
| Version: | Current | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Aleksa Sarai
2016-04-06 08:41:29 UTC
It appears that the change to /usr/include/btrfs/ioctl.h is to blame. Specifically, the btrfs_ioctl_vol_args_v2 structure now has the name field inside a union. cgo (and Go in general) doesn't support unions, so this is a breaking change for us.
For comparison, here's the definition of the structure in btrfs/ioctl.h:
#define BTRFS_SUBVOL_NAME_MAX 4039
struct btrfs_ioctl_vol_args_v2 {
__s64 fd;
__u64 transid;
__u64 flags;
union {
struct {
__u64 size;
struct btrfs_qgroup_inherit __user *qgroup_inherit;
};
__u64 unused[4];
};
union {
char name[BTRFS_SUBVOL_NAME_MAX + 1];
__u64 devid;
};
};
And here's the definition in linux/btrfs.h:
#define BTRFS_SUBVOL_NAME_MAX 4039
struct btrfs_ioctl_vol_args_v2 {
__s64 fd;
__u64 transid;
__u64 flags;
union {
struct {
__u64 size;
struct btrfs_qgroup_inherit *qgroup_inherit;
};
__u64 unused[4];
};
char name[BTRFS_SUBVOL_NAME_MAX + 1];
};
I'm investigating just using linux/btrfs.h, but that'll be a no-go if we have any requirements on any functions defined by libbtrfs-devel.
This was fixed by defining a C function that would fill the name field. The fix is also upstream (https://github.com/docker/docker/pull/21723). Closing. Good to see you found a fix. The anonymous union inside struct is a common and convenient way of reusing existing bytes. We won't change that back and can extend other structures the same way in the future. I'm doing release candidates before a major version, so it would be good time to identify and catch such issues in advance. SUSE-RU-2016:2158-1: An update that has 10 recommended fixes can now be installed. Category: recommended (low) Bug References: 974208,978260,980555,983015,984942,987198,988707,989566,993847,994568 CVE References: Sources used: SUSE OpenStack Cloud 6 (src): containerd-0.2.2-4.1, docker-1.11.2-76.1, runc-0.1.1-4.1 SUSE Linux Enterprise Module for Containers 12 (src): containerd-0.2.2-4.1, docker-1.11.2-76.1, runc-0.1.1-4.1 SUSE-SU-2016:3084-1: An update that solves one vulnerability and has 14 fixes is now available. Category: security (moderate) Bug References: 1004490,1006368,1007249,1009961,974208,978260,983015,987198,988408,989566,995058,995102,995620,996015,999582 CVE References: CVE-2016-8867 Sources used: SUSE OpenStack Cloud 6 (src): containerd-0.2.4+gitr565_0366d7e-9.1, docker-1.12.3-81.2, runc-0.1.1+gitr2816_02f8fa7-9.1 SUSE Linux Enterprise Module for Containers 12 (src): containerd-0.2.4+gitr565_0366d7e-9.1, docker-1.12.3-81.2, rubygem-docker-api-1.31.0-11.2, rubygem-excon-0.52.0-9.1, runc-0.1.1+gitr2816_02f8fa7-9.1 |