You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
Changes in 5.10.168 firewire: fix memory leak for payload of request subaction to IEC 61883-1 FCP region bus: sunxi-rsb: Fix error handling in sunxi_rsb_init() bpf: Fix incorrect state pruning for <8B spill/fill powerpc/imc-pmu: Revert nest_init_lock to being a mutex bpf: Fix a possible task gone issue with bpf_send_signal[_thread]() helpers ALSA: hda/via: Avoid potential array out-of-bound in add_secret_dac_path() bpf: Support <8-byte scalar spill and refill bpf: Fix to preserve reg parent/live fields when copying range info bpf, sockmap: Check for any of tcp_bpf_prots when cloning a listener arm64: dts: imx8mm: Fix pad control for UART1_DTE_RX drm/vc4: hdmi: make CEC adapter name unique scsi: Revert "scsi: core: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT" vhost/net: Clear the pending messages when the backend is removed WRITE is "data source", not destination... READ is "data destination", not source... fix iov_iter_bvec() "direction" argument fix "direction" argument of iov_iter_kvec() virtio-net: execute xdp_do_flush() before napi_complete_done() sfc: correctly advertise tunneled IPv6 segmentation net: phy: dp83822: Fix null pointer access on DP83825/DP83826 devices netrom: Fix use-after-free caused by accept on already connected socket netfilter: br_netfilter: disable sabotage_in hook after first suppression squashfs: harden sanity check in squashfs_read_xattr_id_table net: phy: meson-gxl: Add generic dummy stubs for MMD register access igc: return an error if the mac type is unknown in igc_ptp_systim_to_hwtstamp() can: j1939: fix errant WARN_ON_ONCE in j1939_session_deactivate ata: libata: Fix sata_down_spd_limit() when no link speed is reported selftests: net: udpgso_bench_rx: Fix 'used uninitialized' compiler warning selftests: net: udpgso_bench_rx/tx: Stop when wrong CLI args are provided selftests: net: udpgso_bench: Fix racing bug between the rx/tx programs selftests: net: udpgso_bench_tx: Cater for pending datagrams zerocopy benchmarking virtio-net: Keep stop() to follow mirror sequence of open() net: openvswitch: fix flow memory leak in ovs_flow_cmd_new efi: fix potential NULL deref in efi_mem_reserve_persistent qede: add netpoll support for qede driver qede: execute xdp_do_flush() before napi_complete_done() i2c: mxs: suppress probe-deferral error message scsi: target: core: Fix warning on RT kernels scsi: iscsi_tcp: Fix UAF during login when accessing the shost ipaddress i2c: rk3x: fix a bunch of kernel-doc warnings platform/x86: dell-wmi: Add a keymap for KEY_MUTE in type 0x0010 table net/x25: Fix to not accept on connected socket iio: adc: stm32-dfsdm: fill module aliases usb: dwc3: dwc3-qcom: Fix typo in the dwc3 vbus override API usb: dwc3: qcom: enable vbus override when in OTG dr-mode usb: gadget: f_fs: Fix unbalanced spinlock in __ffs_ep0_queue_wait vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF Input: i8042 - move __initconst to fix code styling warning Input: i8042 - merge quirk tables Input: i8042 - add TUXEDO devices to i8042 quirk tables Input: i8042 - add Clevo PCX0DX to i8042 quirk table fbcon: Check font dimension limits net: qrtr: free memory on error path in radix_tree_insert() watchdog: diag288_wdt: do not use stack buffers for hardware data watchdog: diag288_wdt: fix __diag288() inline assembly ALSA: hda/realtek: Add Acer Predator PH315-54 efi: Accept version 2 of memory attributes table iio: hid: fix the retval in accel_3d_capture_sample iio: adc: berlin2-adc: Add missing of_node_put() in error path iio:adc:twl6030: Enable measurements of VUSB, VBAT and others iio: imu: fxos8700: fix ACCEL measurement range selection iio: imu: fxos8700: fix incomplete ACCEL and MAGN channels readback iio: imu: fxos8700: fix IMU data bits returned to user space iio: imu: fxos8700: fix map label of channel type to MAGN sensor iio: imu: fxos8700: fix swapped ACCEL and MAGN channels readback iio: imu: fxos8700: fix incorrect ODR mode readback iio: imu: fxos8700: fix failed initialization ODR mode assignment iio: imu: fxos8700: remove definition FXOS8700_CTRL_ODR_MIN iio: imu: fxos8700: fix MAGN sensor scale and unit nvmem: qcom-spmi-sdam: fix module autoloading parisc: Fix return code of pdc_iodc_print() parisc: Wire up PTRACE_GETREGS/PTRACE_SETREGS for compat case riscv: disable generation of unwind tables mm: hugetlb: proc: check for hugetlb shared PMD in /proc/PID/smaps x86/debug: Fix stack recursion caused by wrongly ordered DR7 accesses fpga: stratix10-soc: Fix return value check in s10_ops_write_init() mm/swapfile: add cond_resched() in get_swap_pages() Squashfs: fix handling and sanity checking of xattr_ids count drm/i915: Fix potential bit_17 double-free nvmem: core: initialise nvmem->id early nvmem: core: fix cell removal on error serial: 8250_dma: Fix DMA Rx completion race serial: 8250_dma: Fix DMA Rx rearm race fbdev: smscufx: fix error handling code in ufx_usb_probe f2fs: fix to do sanity check on i_extra_isize in is_alive() wifi: brcmfmac: Check the count value of channel spec to prevent out-of-bounds reads nvmem: core: Fix a conflict between MTD and NVMEM on wp-gpios property bpf: Do not reject when the stack read size is different from the tracked scalar size iio:adc:twl6030: Enable measurement of VAC mm/migration: return errno when isolate_huge_page failed migrate: hugetlb: check for hugetlb shared PMD in node migration btrfs: limit device extents to the device size btrfs: zlib: zero-initialize zlib workspace ALSA: hda/realtek: Add Positivo N14KP6-TG ALSA: emux: Avoid potential array out-of-bound in snd_emux_xg_control() ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book2 Pro 360 tracing: Fix poll() and select() do not work on per_cpu trace_pipe and trace_pipe_raw of/address: Return an error when no valid dma-ranges are found can: j1939: do not wait 250 ms if the same addr was already claimed xfrm: compat: change expression for switch in xfrm_xlate64 IB/hfi1: Restore allocated resources on failed copyout xfrm/compat: prevent potential spectre v1 gadget in xfrm_xlate32_attr() IB/IPoIB: Fix legacy IPoIB due to wrong number of queues RDMA/usnic: use iommu_map_atomic() under spin_lock() xfrm: fix bug with DSCP copy to v6 from v4 tunnel bonding: fix error checking in bond_debug_reregister() net: phy: meson-gxl: use MMD access dummy stubs for GXL, internal PHY ionic: clean interrupt before enabling queue to avoid credit race uapi: add missing ip/ipv6 header dependencies for linux/stddef.h ice: Do not use WQ_MEM_RECLAIM flag for workqueue net: mscc: ocelot: fix VCAP filters not matching on MAC with "protocol 802.1Q" net/mlx5e: IPoIB, Show unknown speed instead of error net/mlx5: fw_tracer, Clear load bit when freeing string DBs buffers net/mlx5: fw_tracer, Zero consumer index when reloading the tracer rds: rds_rm_zerocopy_callback() use list_first_entry() selftests: forwarding: lib: quote the sysctl values ALSA: pci: lx6464es: fix a debug loop pinctrl: aspeed: Fix confusing types in return value pinctrl: single: fix potential NULL dereference spi: dw: Fix wrong FIFO level setting for long xfers pinctrl: intel: Restore the pins that used to be in Direct IRQ mode cifs: Fix use-after-free in rdata->read_into_pages() net: USB: Fix wrong-direction WARNING in plusb.c btrfs: free device in btrfs_close_devices for a single device filesystem usb: core: add quirk for Alcor Link AK9563 smartcard reader usb: typec: altmodes/displayport: Fix probe pin assign check ceph: flush cap releases when the session is flushed riscv: Fixup race condition on PG_dcache_clean in flush_icache_pte arm64: dts: meson-gx: Make mmc host controller interrupts level-sensitive arm64: dts: meson-g12-common: Make mmc host controller interrupts level-sensitive arm64: dts: meson-axg: Make mmc host controller interrupts level-sensitive Fix page corruption caused by racy check in __free_pages Linux 5.10.168 Change-Id: I98d1e73edfaab3ce45c15283ae0964527d5e547e Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
182 lines
4.7 KiB
C
182 lines
4.7 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
|
|
/*
|
|
* INET An implementation of the TCP/IP protocol suite for the LINUX
|
|
* operating system. INET is implemented using the BSD Socket
|
|
* interface as the means of communication with the user level.
|
|
*
|
|
* Definitions for the IP protocol.
|
|
*
|
|
* Version: @(#)ip.h 1.0.2 04/28/93
|
|
*
|
|
* Authors: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*/
|
|
#ifndef _UAPI_LINUX_IP_H
|
|
#define _UAPI_LINUX_IP_H
|
|
#include <linux/types.h>
|
|
#include <linux/stddef.h>
|
|
#include <asm/byteorder.h>
|
|
|
|
#define IPTOS_TOS_MASK 0x1E
|
|
#define IPTOS_TOS(tos) ((tos)&IPTOS_TOS_MASK)
|
|
#define IPTOS_LOWDELAY 0x10
|
|
#define IPTOS_THROUGHPUT 0x08
|
|
#define IPTOS_RELIABILITY 0x04
|
|
#define IPTOS_MINCOST 0x02
|
|
|
|
#define IPTOS_PREC_MASK 0xE0
|
|
#define IPTOS_PREC(tos) ((tos)&IPTOS_PREC_MASK)
|
|
#define IPTOS_PREC_NETCONTROL 0xe0
|
|
#define IPTOS_PREC_INTERNETCONTROL 0xc0
|
|
#define IPTOS_PREC_CRITIC_ECP 0xa0
|
|
#define IPTOS_PREC_FLASHOVERRIDE 0x80
|
|
#define IPTOS_PREC_FLASH 0x60
|
|
#define IPTOS_PREC_IMMEDIATE 0x40
|
|
#define IPTOS_PREC_PRIORITY 0x20
|
|
#define IPTOS_PREC_ROUTINE 0x00
|
|
|
|
|
|
/* IP options */
|
|
#define IPOPT_COPY 0x80
|
|
#define IPOPT_CLASS_MASK 0x60
|
|
#define IPOPT_NUMBER_MASK 0x1f
|
|
|
|
#define IPOPT_COPIED(o) ((o)&IPOPT_COPY)
|
|
#define IPOPT_CLASS(o) ((o)&IPOPT_CLASS_MASK)
|
|
#define IPOPT_NUMBER(o) ((o)&IPOPT_NUMBER_MASK)
|
|
|
|
#define IPOPT_CONTROL 0x00
|
|
#define IPOPT_RESERVED1 0x20
|
|
#define IPOPT_MEASUREMENT 0x40
|
|
#define IPOPT_RESERVED2 0x60
|
|
|
|
#define IPOPT_END (0 |IPOPT_CONTROL)
|
|
#define IPOPT_NOOP (1 |IPOPT_CONTROL)
|
|
#define IPOPT_SEC (2 |IPOPT_CONTROL|IPOPT_COPY)
|
|
#define IPOPT_LSRR (3 |IPOPT_CONTROL|IPOPT_COPY)
|
|
#define IPOPT_TIMESTAMP (4 |IPOPT_MEASUREMENT)
|
|
#define IPOPT_CIPSO (6 |IPOPT_CONTROL|IPOPT_COPY)
|
|
#define IPOPT_RR (7 |IPOPT_CONTROL)
|
|
#define IPOPT_SID (8 |IPOPT_CONTROL|IPOPT_COPY)
|
|
#define IPOPT_SSRR (9 |IPOPT_CONTROL|IPOPT_COPY)
|
|
#define IPOPT_RA (20|IPOPT_CONTROL|IPOPT_COPY)
|
|
|
|
#define IPVERSION 4
|
|
#define MAXTTL 255
|
|
#define IPDEFTTL 64
|
|
|
|
#define IPOPT_OPTVAL 0
|
|
#define IPOPT_OLEN 1
|
|
#define IPOPT_OFFSET 2
|
|
#define IPOPT_MINOFF 4
|
|
#define MAX_IPOPTLEN 40
|
|
#define IPOPT_NOP IPOPT_NOOP
|
|
#define IPOPT_EOL IPOPT_END
|
|
#define IPOPT_TS IPOPT_TIMESTAMP
|
|
|
|
#define IPOPT_TS_TSONLY 0 /* timestamps only */
|
|
#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
|
|
#define IPOPT_TS_PRESPEC 3 /* specified modules only */
|
|
|
|
#define IPV4_BEET_PHMAXLEN 8
|
|
|
|
struct iphdr {
|
|
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
|
__u8 ihl:4,
|
|
version:4;
|
|
#elif defined (__BIG_ENDIAN_BITFIELD)
|
|
__u8 version:4,
|
|
ihl:4;
|
|
#else
|
|
#error "Please fix <asm/byteorder.h>"
|
|
#endif
|
|
__u8 tos;
|
|
__be16 tot_len;
|
|
__be16 id;
|
|
__be16 frag_off;
|
|
__u8 ttl;
|
|
__u8 protocol;
|
|
__sum16 check;
|
|
__struct_group(/* no tag */, addrs, /* no attrs */,
|
|
__be32 saddr;
|
|
__be32 daddr;
|
|
);
|
|
/*The options start here. */
|
|
};
|
|
|
|
|
|
struct ip_auth_hdr {
|
|
__u8 nexthdr;
|
|
__u8 hdrlen; /* This one is measured in 32 bit units! */
|
|
__be16 reserved;
|
|
__be32 spi;
|
|
__be32 seq_no; /* Sequence number */
|
|
__u8 auth_data[]; /* Variable len but >=4. Mind the 64 bit alignment! */
|
|
};
|
|
|
|
struct ip_esp_hdr {
|
|
__be32 spi;
|
|
__be32 seq_no; /* Sequence number */
|
|
__u8 enc_data[]; /* Variable len but >=8. Mind the 64 bit alignment! */
|
|
};
|
|
|
|
struct ip_comp_hdr {
|
|
__u8 nexthdr;
|
|
__u8 flags;
|
|
__be16 cpi;
|
|
};
|
|
|
|
struct ip_beet_phdr {
|
|
__u8 nexthdr;
|
|
__u8 hdrlen;
|
|
__u8 padlen;
|
|
__u8 reserved;
|
|
};
|
|
|
|
/* index values for the variables in ipv4_devconf */
|
|
enum
|
|
{
|
|
IPV4_DEVCONF_FORWARDING=1,
|
|
IPV4_DEVCONF_MC_FORWARDING,
|
|
IPV4_DEVCONF_PROXY_ARP,
|
|
IPV4_DEVCONF_ACCEPT_REDIRECTS,
|
|
IPV4_DEVCONF_SECURE_REDIRECTS,
|
|
IPV4_DEVCONF_SEND_REDIRECTS,
|
|
IPV4_DEVCONF_SHARED_MEDIA,
|
|
IPV4_DEVCONF_RP_FILTER,
|
|
IPV4_DEVCONF_ACCEPT_SOURCE_ROUTE,
|
|
IPV4_DEVCONF_BOOTP_RELAY,
|
|
IPV4_DEVCONF_LOG_MARTIANS,
|
|
IPV4_DEVCONF_TAG,
|
|
IPV4_DEVCONF_ARPFILTER,
|
|
IPV4_DEVCONF_MEDIUM_ID,
|
|
IPV4_DEVCONF_NOXFRM,
|
|
IPV4_DEVCONF_NOPOLICY,
|
|
IPV4_DEVCONF_FORCE_IGMP_VERSION,
|
|
IPV4_DEVCONF_ARP_ANNOUNCE,
|
|
IPV4_DEVCONF_ARP_IGNORE,
|
|
IPV4_DEVCONF_PROMOTE_SECONDARIES,
|
|
IPV4_DEVCONF_ARP_ACCEPT,
|
|
IPV4_DEVCONF_ARP_NOTIFY,
|
|
IPV4_DEVCONF_ACCEPT_LOCAL,
|
|
IPV4_DEVCONF_SRC_VMARK,
|
|
IPV4_DEVCONF_PROXY_ARP_PVLAN,
|
|
IPV4_DEVCONF_ROUTE_LOCALNET,
|
|
IPV4_DEVCONF_IGMPV2_UNSOLICITED_REPORT_INTERVAL,
|
|
IPV4_DEVCONF_IGMPV3_UNSOLICITED_REPORT_INTERVAL,
|
|
IPV4_DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,
|
|
IPV4_DEVCONF_DROP_UNICAST_IN_L2_MULTICAST,
|
|
IPV4_DEVCONF_DROP_GRATUITOUS_ARP,
|
|
IPV4_DEVCONF_BC_FORWARDING,
|
|
IPV4_DEVCONF_ARP_EVICT_NOCARRIER,
|
|
__IPV4_DEVCONF_MAX
|
|
};
|
|
|
|
#define IPV4_DEVCONF_MAX (__IPV4_DEVCONF_MAX - 1)
|
|
|
|
#endif /* _UAPI_LINUX_IP_H */
|