Skip to content

Commit

Permalink
Update to 4.4.206 and prefer backported upstream commits when possible
Browse files Browse the repository at this point in the history
The latest release of the 4.4 series merges several commits related to
UAPI definitions:

    1575c095e444 uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h
    28b5d0be0ab6 uapi/if_ether.h: prevent redefinition of struct ethhdr
    cb4f43bf87eb uapi/if_ether.h: move __UAPI_DEF_ETHHDR libc define

Additionally, there were several relevant fixes that haven't made their
way into 4.4, but are in 4.9, which were cherry-picked:

    53dc65d4d33c include/uapi/linux/ipx.h: fix conflicting defitions with glibc netipx/ipx.h
    26f687354060 uapi libc compat: add fallback for unsupported libcs
    efc45154828a uapi glibc compat: fix outer guard of net device flags enum

Some of these upstream changes made the existing patches obsolete:

0003-libc-compat.h-fix-some-issues-arising-from-in6.h.patch

    Since 26f687354060 was cherry-picked, in the else branch of this
    condition (__GLIBC__), __UAPI_DEF_IN6_ADDR_ALT is not defined if it
    was set by libc.

    Drop this patch, so musl's headers control the definition of
    the s6_addr16 and s6_addr32.

0004-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch

    This patch was applied upstream as 28b5d0be0ab6, except that
    instead of using _NETINET_IF_ETHER_H to control __UAPI_DEF_ETHHDR,
    it is conditionally defined based on whether there is no existing
    definition.

    Drop this patch, so musl's headers control the definition of
    struct ethhdr.

0005-fix-redefinition-of-struct-tcphdr.patch

    By dropping patch 3 (see above), we are no longer changing the
    __GLIBC__ section to __KERNEL__. Additionally, upstream commit
    162a93c20de1 describes a problem with introducing libc-compat includes
    nto other headers.

    Follow the lead of cb4f43bf87eb, and move the conditional define
    of __UAPI_DEF_TCPHDR to linux/tcp.h, drop the libc-compat include,
    and make the definition conditional on no existing definition.

0006-fix-linux-time.h.patch

    Again, follow the lead of 162a93c20de1, and move the conditional
    defines of __UAPI_DEF_TIMESPEC, __UAPI_DEF_ITIMERSPEC,
    __UAPI_DEF_TIMEVAL, __UAPI_DEF_ITIMERVAL, and __UAPI_DEF_TIMEZONE
    to linux/time.h, drop the libc-compat include, and make the
    definitions conditional on no existing definition.

0007-fix-in-kernel-use-of-tcp-ethhdr.patch

    Obsolete by the upstream fix for ethhdr (28b5d0be0ab6), and the new
    patch for tcphdr.

0008-add-fixes-for-linux-if.h.patch

    Obsolete by cherry-picked commit 26f687354060, which makes the
    definitions conditional on no existing definition, and cherry-picked
    commit efc45154828a, which corrects an #if condition.
  • Loading branch information
michaelforney committed Dec 12, 2019
1 parent 4af3b80 commit 7ba25c5
Show file tree
Hide file tree
Showing 59 changed files with 962 additions and 1,866 deletions.
2 changes: 2 additions & 0 deletions arm64/include/asm/auxvec.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@
/* vDSO location */
#define AT_SYSINFO_EHDR 33

#define AT_VECTOR_SIZE_ARCH 1 /* entries in ARCH_DLINFO */

#endif
1 change: 1 addition & 0 deletions arm64/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ struct user_fpsimd_state {
__uint128_t vregs[32];
__u32 fpsr;
__u32 fpcr;
__u32 __reserved[2];
};

struct user_hwdebug_state {
Expand Down
1 change: 1 addition & 0 deletions generic/include/drm/drm_fourcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@

/* Vendor Ids: */
#define DRM_FORMAT_MOD_NONE 0
#define DRM_FORMAT_MOD_VENDOR_NONE 0
#define DRM_FORMAT_MOD_VENDOR_INTEL 0x01
#define DRM_FORMAT_MOD_VENDOR_AMD 0x02
#define DRM_FORMAT_MOD_VENDOR_NV 0x03
Expand Down
1 change: 1 addition & 0 deletions generic/include/drm/virtgpu_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ struct drm_virtgpu_execbuffer {
};

#define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the hw */
#define VIRTGPU_PARAM_CAPSET_QUERY_FIX 2 /* do we have the capset fix */

struct drm_virtgpu_getparam {
uint64_t param;
Expand Down
1 change: 1 addition & 0 deletions generic/include/linux/can.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,5 +196,6 @@ struct can_filter {
};

#define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */
#define CAN_RAW_FILTER_MAX 512 /* maximum number of can_filter set via setsockopt() */

#endif /* !_UAPI_CAN_H */
13 changes: 0 additions & 13 deletions generic/include/linux/coda_psdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@
#define CODA_PSDEV_MAJOR 67
#define MAX_CODADEVS 5 /* how many do we allow */


/* messages between coda filesystem in kernel and Venus */
struct upc_req {
struct list_head uc_chain;
caddr_t uc_data;
u_short uc_flags;
u_short uc_inSize; /* Size is at most 5000 bytes */
u_short uc_outSize;
u_short uc_opcode; /* copied from data to save lookup */
int uc_unique;
wait_queue_head_t uc_sleep; /* process' wait queue */
};

#define CODA_REQ_ASYNC 0x1
#define CODA_REQ_READ 0x2
#define CODA_REQ_WRITE 0x4
Expand Down
4 changes: 2 additions & 2 deletions generic/include/linux/ethtool.h
Original file line number Diff line number Diff line change
Expand Up @@ -819,13 +819,13 @@ struct ethtool_rx_flow_spec {
static __inline__ __u64 ethtool_get_flow_spec_ring(__u64 ring_cookie)
{
return ETHTOOL_RX_FLOW_SPEC_RING & ring_cookie;
};
}

static __inline__ __u64 ethtool_get_flow_spec_ring_vf(__u64 ring_cookie)
{
return (ETHTOOL_RX_FLOW_SPEC_RING_VF & ring_cookie) >>
ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF;
};
}

/**
* struct ethtool_rxnfc - command to get or set RX flow classification rules
Expand Down
13 changes: 13 additions & 0 deletions generic/include/linux/eventpoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@
#define EPOLL_CTL_DEL 2
#define EPOLL_CTL_MOD 3

/* Epoll event masks */
#define EPOLLIN 0x00000001
#define EPOLLPRI 0x00000002
#define EPOLLOUT 0x00000004
#define EPOLLERR 0x00000008
#define EPOLLHUP 0x00000010
#define EPOLLRDNORM 0x00000040
#define EPOLLRDBAND 0x00000080
#define EPOLLWRNORM 0x00000100
#define EPOLLWRBAND 0x00000200
#define EPOLLMSG 0x00000400
#define EPOLLRDHUP 0x00002000

/*
* Request the handling of system wakeup events so as to prevent system suspends
* from happening while those events are being processed.
Expand Down
2 changes: 2 additions & 0 deletions generic/include/linux/fuse.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,12 @@ struct fuse_file_lock {
* FOPEN_DIRECT_IO: bypass page cache for this open file
* FOPEN_KEEP_CACHE: don't invalidate the data cache on open
* FOPEN_NONSEEKABLE: the file is not seekable
* FOPEN_STREAM: the file is stream-like (no file position at all)
*/
#define FOPEN_DIRECT_IO (1 << 0)
#define FOPEN_KEEP_CACHE (1 << 1)
#define FOPEN_NONSEEKABLE (1 << 2)
#define FOPEN_STREAM (1 << 4)

/**
* INIT request/reply flags
Expand Down
1 change: 1 addition & 0 deletions generic/include/linux/hyperv.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ enum hv_kvp_exchg_pool {
#define HV_INVALIDARG 0x80070057
#define HV_GUID_NOTFOUND 0x80041002
#define HV_ERROR_ALREADY_EXISTS 0x80070050
#define HV_ERROR_DISK_FULL 0x80070070

#define ADDR_FAMILY_NONE 0x00
#define ADDR_FAMILY_IPV4 0x01
Expand Down
8 changes: 7 additions & 1 deletion generic/include/linux/if_ether.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
#define _LINUX_IF_ETHER_H

#include <linux/types.h>
#include <linux/libc-compat.h>

/*
* IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
* and FCS/CRC (frame check sequence).
*/

#define ETH_ALEN 6 /* Octets in one ethernet addr */
#define ETH_TLEN 2 /* Octets in ethernet type field */
#define ETH_HLEN 14 /* Total octets in header. */
#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */
#define ETH_DATA_LEN 1500 /* Max. octets in payload */
Expand Down Expand Up @@ -136,6 +136,11 @@
* This is an Ethernet frame header.
*/

/* allow libcs like musl to deactivate this, glibc does not implement this. */
#ifndef __UAPI_DEF_ETHHDR
#define __UAPI_DEF_ETHHDR 1
#endif

#if __UAPI_DEF_ETHHDR
struct ethhdr {
unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
Expand All @@ -144,4 +149,5 @@ struct ethhdr {
} __attribute__((packed));
#endif


#endif /* _LINUX_IF_ETHER_H */
9 changes: 9 additions & 0 deletions generic/include/linux/input-event-codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,15 @@

#define ABS_MISC 0x28

/*
* 0x2e is reserved and should not be used in input drivers.
* It was used by HID as ABS_MISC+6 and userspace needs to detect if
* the next ABS_* event is correct or is just ABS_MISC + n.
* We define here ABS_RESERVED so userspace can rely on it and detect
* the situation described above.
*/
#define ABS_RESERVED 0x2e

#define ABS_MT_SLOT 0x2f /* MT slot being modified */
#define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */
#define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */
Expand Down
2 changes: 1 addition & 1 deletion generic/include/linux/ipv6_route.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#define RTF_PREF(pref) ((pref) << 27)
#define RTF_PREF_MASK 0x18000000

#define RTF_PCPU 0x40000000
#define RTF_PCPU 0x40000000 /* read-only: can not be set by user */
#define RTF_LOCAL 0x80000000


Expand Down
13 changes: 12 additions & 1 deletion generic/include/linux/ipx.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#ifndef _IPX_H_
#define _IPX_H_
#include <linux/libc-compat.h> /* for compatibility with glibc netipx/ipx.h */
#include <linux/types.h>
#include <linux/sockios.h>
#include <linux/socket.h>
#define IPX_NODE_LEN 6
#define IPX_MTU 576

#if __UAPI_DEF_SOCKADDR_IPX
struct sockaddr_ipx {
__kernel_sa_family_t sipx_family;
__be16 sipx_port;
Expand All @@ -14,6 +16,7 @@ struct sockaddr_ipx {
__u8 sipx_type;
unsigned char sipx_zero; /* 16 byte fill */
};
#endif /* __UAPI_DEF_SOCKADDR_IPX */

/*
* So we can fit the extra info for SIOCSIFADDR into the address nicely
Expand All @@ -23,12 +26,15 @@ struct sockaddr_ipx {
#define IPX_DLTITF 0
#define IPX_CRTITF 1

#if __UAPI_DEF_IPX_ROUTE_DEFINITION
struct ipx_route_definition {
__be32 ipx_network;
__be32 ipx_router_network;
unsigned char ipx_router_node[IPX_NODE_LEN];
};
#endif /* __UAPI_DEF_IPX_ROUTE_DEFINITION */

#if __UAPI_DEF_IPX_INTERFACE_DEFINITION
struct ipx_interface_definition {
__be32 ipx_network;
unsigned char ipx_device[16];
Expand All @@ -45,16 +51,20 @@ struct ipx_interface_definition {
#define IPX_INTERNAL 2
unsigned char ipx_node[IPX_NODE_LEN];
};

#endif /* __UAPI_DEF_IPX_INTERFACE_DEFINITION */

#if __UAPI_DEF_IPX_CONFIG_DATA
struct ipx_config_data {
unsigned char ipxcfg_auto_select_primary;
unsigned char ipxcfg_auto_create_interfaces;
};
#endif /* __UAPI_DEF_IPX_CONFIG_DATA */

/*
* OLD Route Definition for backward compatibility.
*/

#if __UAPI_DEF_IPX_ROUTE_DEF
struct ipx_route_def {
__be32 ipx_network;
__be32 ipx_router_network;
Expand All @@ -67,6 +77,7 @@ struct ipx_route_def {
#define IPX_RT_BLUEBOOK 2
#define IPX_RT_ROUTED 1
};
#endif /* __UAPI_DEF_IPX_ROUTE_DEF */

#define SIOCAIPXITFCRT (SIOCPROTOPRIVATE)
#define SIOCAIPXPRISLT (SIOCPROTOPRIVATE + 1)
Expand Down
1 change: 1 addition & 0 deletions generic/include/linux/isdn/capicmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#define CAPI_MSG_BASELEN 8
#define CAPI_DATA_B3_REQ_LEN (CAPI_MSG_BASELEN+4+4+2+2+2)
#define CAPI_DATA_B3_RESP_LEN (CAPI_MSG_BASELEN+4+2)
#define CAPI_DISCONNECT_B3_RESP_LEN (CAPI_MSG_BASELEN+4)

/*----- CAPI commands -----*/
#define CAPI_ALERT 0x01
Expand Down
1 change: 1 addition & 0 deletions generic/include/linux/kvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,7 @@ struct kvm_ppc_smmu_info {
#define KVM_CAP_GUEST_DEBUG_HW_WPS 120
#define KVM_CAP_SPLIT_IRQCHIP 121
#define KVM_CAP_IOEVENTFD_ANY_LENGTH 122
#define KVM_CAP_S390_BPB 152

#ifdef KVM_CAP_IRQ_ROUTING

Expand Down
Loading

0 comments on commit 7ba25c5

Please sign in to comment.