This is the start of the stable review cycle for the 4.14.100 release.
There are 35 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Fri Feb 15 18:36:47 UTC 2019.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.100-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.14.100-rc1
Xiubo Li <xiubli(a)redhat.com>
Revert "uio: use request_threaded_irq instead"
Xiubo Li <xiubli(a)redhat.com>
uio: fix possible circular locking dependency
Hailong Liu <liu.hailong6(a)zte.com.cn>
uio: fix wrong return value from uio_mmap()
Xiubo Li <xiubli(a)redhat.com>
uio: fix crash after the device is unregistered
Xiubo Li <xiubli(a)redhat.com>
uio: change to use the mutex lock instead of the spin lock
Xiubo Li <xiubli(a)redhat.com>
uio: use request_threaded_irq instead
Hamish Martin <hamish.martin(a)alliedtelesis.co.nz>
uio: Prevent device destruction while fds are open
Hamish Martin <hamish.martin(a)alliedtelesis.co.nz>
uio: Reduce return paths from uio_write()
Jiri Olsa <jolsa(a)kernel.org>
perf tests attr: Make hw events optional
Jiri Olsa <jolsa(a)redhat.com>
perf tests attr: Fix group stat tests
Jiri Olsa <jolsa(a)kernel.org>
perf tests attr: Fix task term values
Sven Eckelmann <sven(a)narfation.org>
batman-adv: Force mac header to start of data on xmit
Sven Eckelmann <sven(a)narfation.org>
batman-adv: Avoid WARN on net_device without parent in netns
Florian Westphal <fw(a)strlen.de>
xfrm: refine validation of template and selector families
Ilya Dryomov <idryomov(a)gmail.com>
libceph: avoid KEEPALIVE_PENDING races in ceph_con_keepalive()
Theodore Ts'o <tytso(a)mit.edu>
Revert "ext4: use ext4_write_inode() when fsyncing w/o a journal"
Vladis Dronov <vdronov(a)redhat.com>
HID: debug: fix the ring buffer implementation
Thomas Hellstrom <thellstrom(a)vmware.com>
drm/vmwgfx: Return error code from vmw_execbuf_copy_fence_user
Thomas Hellstrom <thellstrom(a)vmware.com>
drm/vmwgfx: Fix setting of dma masks
Tina Zhang <tina.zhang(a)intel.com>
drm/modes: Prevent division by zero htotal
Felix Fietkau <nbd(a)nbd.name>
mac80211: ensure that mgmt tx skbs have tailroom for encryption
Marc Gonzalez <marc.w.gonzalez(a)free.fr>
ARM: tango: Improve ARCH_MULTIPLATFORM compatibility
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: iop32x/n2100: fix PCI IRQ mapping
Paul Burton <paul.burton(a)mips.com>
MIPS: VDSO: Include $(ccflags-vdso) in o32,n32 .lds builds
Aaro Koskinen <aaro.koskinen(a)iki.fi>
MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled
Vladimir Kondratiev <vladimir.kondratiev(a)linux.intel.com>
mips: cm: reprime error cause
Andreas Ziegler <andreas.ziegler(a)fau.de>
tracing: uprobes: Fix typo in pr_fmt string
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
debugfs: fix debugfs_rename parameter checking
Tomas Winkler <tomas.winkler(a)intel.com>
samples: mei: use /dev/mei0 instead of /dev/mei
Dan Carpenter <dan.carpenter(a)oracle.com>
misc: vexpress: Off by one in vexpress_syscfg_exec()
Eric W. Biederman <ebiederm(a)xmission.com>
signal: Better detection of synchronous signals
Eric W. Biederman <ebiederm(a)xmission.com>
signal: Always notice exiting tasks
Matt Ranostay <matt.ranostay(a)konsulko.com>
iio: chemical: atlas-ph-sensor: correct IIO_TEMP values to millicelsius
Hans de Goede <hdegoede(a)redhat.com>
iio: adc: axp288: Fix TS-pin handling
Martin Kepplinger <martink(a)posteo.de>
mtd: rawnand: gpmi: fix MX28 bus master lockup problem
-------------
Diffstat:
Makefile | 4 +-
arch/arm/mach-iop32x/n2100.c | 3 +-
arch/arm/mach-tango/pm.c | 6 +-
arch/arm/mach-tango/pm.h | 7 +
arch/arm/mach-tango/setup.c | 2 +
arch/mips/kernel/mips-cm.c | 2 +-
arch/mips/pci/pci-octeon.c | 10 +-
arch/mips/vdso/Makefile | 4 +-
drivers/gpu/drm/drm_modes.c | 2 +-
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 9 +-
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +-
drivers/hid/hid-debug.c | 122 ++++++--------
drivers/iio/adc/axp288_adc.c | 76 +++++++--
drivers/iio/chemical/atlas-ph-sensor.c | 7 +-
drivers/misc/vexpress-syscfg.c | 2 +-
drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 15 +-
drivers/uio/uio.c | 206 ++++++++++++++++++-----
fs/debugfs/inode.c | 7 +
fs/ext4/fsync.c | 13 +-
include/linux/hid-debug.h | 9 +-
include/linux/uio_driver.h | 4 +-
kernel/signal.c | 58 ++++++-
kernel/trace/trace_uprobe.c | 2 +-
net/batman-adv/hard-interface.c | 5 +-
net/batman-adv/soft-interface.c | 2 +
net/ceph/messenger.c | 5 +-
net/mac80211/tx.c | 12 +-
net/xfrm/xfrm_user.c | 13 +-
samples/mei/mei-amt-version.c | 2 +-
tools/perf/tests/attr/base-record | 2 +-
tools/perf/tests/attr/test-record-group | 1 +
tools/perf/tests/attr/test-record-group-sampling | 2 +-
tools/perf/tests/attr/test-record-group1 | 1 +
tools/perf/tests/attr/test-stat-C0 | 1 +
tools/perf/tests/attr/test-stat-basic | 1 +
tools/perf/tests/attr/test-stat-default | 4 +
tools/perf/tests/attr/test-stat-detailed-1 | 8 +
tools/perf/tests/attr/test-stat-detailed-2 | 13 ++
tools/perf/tests/attr/test-stat-detailed-3 | 13 ++
tools/perf/tests/attr/test-stat-group | 2 +
tools/perf/tests/attr/test-stat-group1 | 2 +
tools/perf/tests/attr/test-stat-no-inherit | 1 +
42 files changed, 461 insertions(+), 201 deletions(-)
The patch titled
Subject: hugetlbfs: fix races and page leaks during migration
has been added to the -mm tree. Its filename is
huegtlbfs-fix-races-and-page-leaks-during-migration.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/huegtlbfs-fix-races-and-page-leaks…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/huegtlbfs-fix-races-and-page-leaks…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Mike Kravetz <mike.kravetz(a)oracle.com>
Subject: hugetlbfs: fix races and page leaks during migration
hugetlb pages should only be migrated if they are 'active'. The routines
set/clear_page_huge_active() modify the active state of hugetlb pages.
When a new hugetlb page is allocated at fault time, set_page_huge_active
is called before the page is locked. Therefore, another thread could race
and migrate the page while it is being added to page table by the fault
code. This race is somewhat hard to trigger, but can be seen by
strategically adding udelay to simulate worst case scheduling behavior.
Depending on 'how' the code races, various BUG()s could be triggered.
To address this issue, simply delay the set_page_huge_active call until
after the page is successfully added to the page table.
Hugetlb pages can also be leaked at migration time if the pages are
associated with a file in an explicitly mounted hugetlbfs filesystem. For
example, consider a two node system with 4GB worth of huge pages
available. A program mmaps a 2G file in a hugetlbfs filesystem. It then
migrates the pages associated with the file from one node to another.
When the program exits, huge page counts are as follows:
node0
1024 free_hugepages
1024 nr_hugepages
node1
0 free_hugepages
1024 nr_hugepages
Filesystem Size Used Avail Use% Mounted on
nodev 4.0G 2.0G 2.0G 50% /var/opt/hugepool
That is as expected. 2G of huge pages are taken from the free_hugepages
counts, and 2G is the size of the file in the explicitly mounted
filesystem. If the file is then removed, the counts become:
node0
1024 free_hugepages
1024 nr_hugepages
node1
1024 free_hugepages
1024 nr_hugepages
Filesystem Size Used Avail Use% Mounted on
nodev 4.0G 2.0G 2.0G 50% /var/opt/hugepool
Note that the filesystem still shows 2G of pages used, while there
actually are no huge pages in use. The only way to 'fix' the filesystem
accounting is to unmount the filesystem
If a hugetlb page is associated with an explicitly mounted filesystem,
this information in contained in the page_private field. At migration
time, this information is not preserved. To fix, simply transfer
page_private from old to new page at migration time if necessary.
Link: http://lkml.kernel.org/r/74510272-7319-7372-9ea6-ec914734c179@oracle.com
Link: http://lkml.kernel.org/r/20190212221400.3512-1-mike.kravetz@oracle.com
Fixes: bcc54222309c ("mm: hugetlb: introduce page_huge_active")
Signed-off-by: Mike Kravetz <mike.kravetz(a)oracle.com>
Cc: Michal Hocko <mhocko(a)kernel.org>
Cc: Naoya Horiguchi <n-horiguchi(a)ah.jp.nec.com>
Cc: Andrea Arcangeli <aarcange(a)redhat.com>
Cc: "Kirill A . Shutemov" <kirill.shutemov(a)linux.intel.com>
Cc: Mel Gorman <mgorman(a)techsingularity.net>
Cc: Davidlohr Bueso <dave(a)stgolabs.net>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/hugetlbfs/inode.c | 12 ++++++++++++
mm/hugetlb.c | 9 ++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
--- a/fs/hugetlbfs/inode.c~huegtlbfs-fix-races-and-page-leaks-during-migration
+++ a/fs/hugetlbfs/inode.c
@@ -859,6 +859,18 @@ static int hugetlbfs_migrate_page(struct
rc = migrate_huge_page_move_mapping(mapping, newpage, page);
if (rc != MIGRATEPAGE_SUCCESS)
return rc;
+
+ /*
+ * page_private is subpool pointer in hugetlb pages. Transfer to
+ * new page. PagePrivate is not associated with page_private for
+ * hugetlb pages and can not be set here as only page_huge_active
+ * pages can be migrated.
+ */
+ if (page_private(page)) {
+ set_page_private(newpage, page_private(page));
+ set_page_private(page, 0);
+ }
+
if (mode != MIGRATE_SYNC_NO_COPY)
migrate_page_copy(newpage, page);
else
--- a/mm/hugetlb.c~huegtlbfs-fix-races-and-page-leaks-during-migration
+++ a/mm/hugetlb.c
@@ -3624,7 +3624,6 @@ retry_avoidcopy:
copy_user_huge_page(new_page, old_page, address, vma,
pages_per_huge_page(h));
__SetPageUptodate(new_page);
- set_page_huge_active(new_page);
mmu_notifier_range_init(&range, mm, haddr, haddr + huge_page_size(h));
mmu_notifier_invalidate_range_start(&range);
@@ -3645,6 +3644,7 @@ retry_avoidcopy:
make_huge_pte(vma, new_page, 1));
page_remove_rmap(old_page, true);
hugepage_add_new_anon_rmap(new_page, vma, haddr);
+ set_page_huge_active(new_page);
/* Make the old page be freed below */
new_page = old_page;
}
@@ -3790,7 +3790,6 @@ retry:
}
clear_huge_page(page, address, pages_per_huge_page(h));
__SetPageUptodate(page);
- set_page_huge_active(page);
if (vma->vm_flags & VM_MAYSHARE) {
int err = huge_add_to_page_cache(page, mapping, idx);
@@ -3861,6 +3860,10 @@ retry:
}
spin_unlock(ptl);
+
+ /* May already be set if not newly allocated page */
+ set_page_huge_active(page);
+
unlock_page(page);
out:
return ret;
@@ -4095,7 +4098,6 @@ int hugetlb_mcopy_atomic_pte(struct mm_s
* the set_pte_at() write.
*/
__SetPageUptodate(page);
- set_page_huge_active(page);
mapping = dst_vma->vm_file->f_mapping;
idx = vma_hugecache_offset(h, dst_vma, dst_addr);
@@ -4163,6 +4165,7 @@ int hugetlb_mcopy_atomic_pte(struct mm_s
update_mmu_cache(dst_vma, dst_addr, dst_pte);
spin_unlock(ptl);
+ set_page_huge_active(page);
if (vm_shared)
unlock_page(page);
ret = 0;
_
Patches currently in -mm which might be from mike.kravetz(a)oracle.com are
huegtlbfs-fix-races-and-page-leaks-during-migration.patch
a.patch
- Changes since v2
Addressed comments from Ard Biesheuvel:
* expose efi_runtime_lock to UV platform only instead of globally
* remove unnecessary #ifdef CONFIG_EFI from bios_uv.c
- Changes since v1:
Addressed comments from Bhupesh Sharma, Thomas Gleixner, and Ard Biesheuvel:
* made __uv_bios_call() static
* moved the efi_enabled() cleanup to its own patchlet
* explained the reason for renaming the efi_runtime_lock semaphore
* dropped the reviewed-bys as they should be given on the mailing list
* Cc'ng stable(a)vger.kernel.org given the nature of the problem addressed by the patches
---
Calls into UV BIOS were not being serialised which is wrong as it violates EFI
runtime rules, and bad as it does result in all sorts of potentially hard to
track down hangs and panics when efi_scratch.prev_mm gets clobbered whenever
efi_switch_mm() gets called concurrently from two different CPUs.
Patch #1 removes an unnecessary #ifdef CONFIG_EFI guard from bios_uv.c.
Patch #2 removes uv_bios_call_reentrant() because it's dead code.
Patch #3 is a cleanup that drops test_bit() in favour of the ad hoc efi_enabled().
Patch #4 makes uv_bios_call() variants use the efi_runtime_lock semaphore to
protect against concurrency.
Cc: Russ Anderson <rja(a)hpe.com>
Cc: Mike Travis <mike.travis(a)hpe.com>
Cc: Dimitri Sivanich <sivanich(a)hpe.com>
Cc: Steve Wahl <steve.wahl(a)hpe.com>
Cc: stable(a)vger.kernel.org # v4.9+
Hedi Berriche (4):
x86/platform/UV: remove unnecessary #ifdef CONFIG_EFI
x86/platform/UV: kill uv_bios_call_reentrant() as it has no callers
x86/platform/UV: use efi_enabled() instead of test_bit()
x86/platform/UV: use efi_runtime_lock to serialise BIOS calls
arch/x86/include/asm/uv/bios.h | 13 ++++-----
arch/x86/platform/uv/bios_uv.c | 35 ++++++++++++++-----------
drivers/firmware/efi/runtime-wrappers.c | 7 +++++
3 files changed, 34 insertions(+), 21 deletions(-)
--
2.20.1
From: Dave Taht <dave.taht(a)gmail.com>
commit 65cab850f0eeaa9180bd2e10a231964f33743edf upstream.
While most distributions long ago switched to the iproute2 suite
of utilities, which allow class-e (240.0.0.0/4) address assignment,
distributions relying on busybox, toybox and other forms of
ifconfig cannot assign class-e addresses without this kernel patch.
While CIDR has been obsolete for 2 decades, and a survey of all the
open source code in the world shows the IN_whatever macros are also
obsolete... rather than obsolete CIDR from this ioctl entirely, this
patch merely enables class-e assignment, sanely.
Signed-off-by: Dave Taht <dave.taht(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
---
- This commit is upstream in v4.20
- This should ve applied for stable v4.19.y, v4.14.y and v4.9.y
---
include/uapi/linux/in.h | 10 +++++++---
net/ipv4/devinet.c | 5 +++--
net/ipv4/ipconfig.c | 2 ++
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h
index 48e8a225b985..f6052e70bf40 100644
--- a/include/uapi/linux/in.h
+++ b/include/uapi/linux/in.h
@@ -266,10 +266,14 @@ struct sockaddr_in {
#define IN_CLASSD(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000)
#define IN_MULTICAST(a) IN_CLASSD(a)
-#define IN_MULTICAST_NET 0xF0000000
+#define IN_MULTICAST_NET 0xe0000000
-#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
-#define IN_BADCLASS(a) IN_EXPERIMENTAL((a))
+#define IN_BADCLASS(a) ((((long int) (a) ) == 0xffffffff)
+#define IN_EXPERIMENTAL(a) IN_BADCLASS((a))
+
+#define IN_CLASSE(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
+#define IN_CLASSE_NET 0xffffffff
+#define IN_CLASSE_NSHIFT 0
/* Address to accept any incoming messages. */
#define INADDR_ANY ((unsigned long int) 0x00000000)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index ea4bd8a52422..e38042933a27 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -941,17 +941,18 @@ static int inet_abc_len(__be32 addr)
{
int rc = -1; /* Something else, probably a multicast. */
- if (ipv4_is_zeronet(addr))
+ if (ipv4_is_zeronet(addr) || ipv4_is_lbcast(addr))
rc = 0;
else {
__u32 haddr = ntohl(addr);
-
if (IN_CLASSA(haddr))
rc = 8;
else if (IN_CLASSB(haddr))
rc = 16;
else if (IN_CLASSC(haddr))
rc = 24;
+ else if (IN_CLASSE(haddr))
+ rc = 32;
}
return rc;
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 88212615bf4c..2393e5c106bf 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -429,6 +429,8 @@ static int __init ic_defaults(void)
ic_netmask = htonl(IN_CLASSB_NET);
else if (IN_CLASSC(ntohl(ic_myaddr)))
ic_netmask = htonl(IN_CLASSC_NET);
+ else if (IN_CLASSE(ntohl(ic_myaddr)))
+ ic_netmask = htonl(IN_CLASSE_NET);
else {
pr_err("IP-Config: Unable to guess netmask for address %pI4\n",
&ic_myaddr);
--
2.20.1
The prepare_fb call always happens on new_plane_state.
The drm_atomic_helper_cleanup_planes checks to see if
plane state pointer has changed when deciding to call cleanup_fb on
either the new_plane_state or the old_plane_state.
For a non-async atomic commit the state pointer is swapped, so this
helper calls prepare_fb on the new_plane_state and cleanup_fb on the
old_plane_state. This makes sense, since we want to prepare the
framebuffer we are going to use and cleanup the the framebuffer we are
no longer using.
For the async atomic update helpers this differs. The async atomic
update helpers perform in-place updates on the existing state. They call
drm_atomic_helper_cleanup_planes but the state pointer is not swapped.
This means that prepare_fb is called on the new_plane_state and
cleanup_fb is called on the new_plane_state (not the old).
In the case where old_plane_state->fb == new_plane_state->fb then
there should be no behavioral difference between an async update
and a non-async commit. But there are issues that arise when
old_plane_state->fb != new_plane_state->fb.
The first is that the new_plane_state->fb is immediately cleaned up
after it has been prepared, so we're using a fb that we shouldn't
be.
The second occurs during a sequence of async atomic updates and
non-async regular atomic commits. Suppose there are two framebuffers
being interleaved in a double-buffering scenario, fb1 and fb2:
- Async update, oldfb = NULL, newfb = fb1, prepare fb1, cleanup fb1
- Async update, oldfb = fb1, newfb = fb2, prepare fb2, cleanup fb2
- Non-async commit, oldfb = fb2, newfb = fb1, prepare fb1, cleanup fb2
We call cleanup_fb on fb2 twice in this example scenario, and any
further use will result in use-after-free.
The simple fix to this problem is to block framebuffer changes
in the drm_atomic_helper_async_check function for now.
Cc: Daniel Vetter <daniel.vetter(a)ffwll.ch>
Cc: Harry Wentland <harry.wentland(a)amd.com>
Cc: Andrey Grodzovsky <andrey.grodzovsky(a)amd.com>
Cc: <stable(a)vger.kernel.org> # v4.14+
Fixes: fef9df8b5945 ("drm/atomic: initial support for asynchronous plane update")
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas(a)amd.com>
---
drivers/gpu/drm/drm_atomic_helper.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 54e2ae614dcc..f4290f6b0c38 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -1602,6 +1602,15 @@ int drm_atomic_helper_async_check(struct drm_device *dev,
old_plane_state->crtc != new_plane_state->crtc)
return -EINVAL;
+ /*
+ * FIXME: Since prepare_fb and cleanup_fb are always called on
+ * the new_plane_state for async updates we need to block framebuffer
+ * changes. This prevents use of a fb that's been cleaned up and
+ * double cleanups from occuring.
+ */
+ if (old_plane_state->fb != new_plane_state->fb)
+ return -EINVAL;
+
funcs = plane->helper_private;
if (!funcs->atomic_async_update)
return -EINVAL;
--
2.17.1
From: Hauke Mehrtens <hauke(a)hauke-m.de>
commit 6926e041a8920c8ec27e4e155efa760aa01551fd upstream.
Musl provides its own ethhdr struct definition. Add a guard to prevent
its definition of the appropriate musl header has already been included.
glibc does not implement this header, but when glibc will implement this
they can just define __UAPI_DEF_ETHHDR 0 to make it work with the
kernel.
Signed-off-by: Hauke Mehrtens <hauke(a)hauke-m.de>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
---
- This is upstream in v4.15
- This should be applied for stable v4.14.y and v4.9.y
---
include/uapi/linux/if_ether.h | 3 +++
include/uapi/linux/libc-compat.h | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
index 244e3213ecb0..60ec9114e28f 100644
--- a/include/uapi/linux/if_ether.h
+++ b/include/uapi/linux/if_ether.h
@@ -23,6 +23,7 @@
#define _UAPI_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
@@ -150,11 +151,13 @@
* This is an Ethernet frame header.
*/
+#if __UAPI_DEF_ETHHDR
struct ethhdr {
unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
unsigned char h_source[ETH_ALEN]; /* source ether addr */
__be16 h_proto; /* packet type ID field */
} __attribute__((packed));
+#endif
#endif /* _UAPI_LINUX_IF_ETHER_H */
diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
index 8254c937c9f4..fc29efaa918c 100644
--- a/include/uapi/linux/libc-compat.h
+++ b/include/uapi/linux/libc-compat.h
@@ -264,4 +264,10 @@
#endif /* __GLIBC__ */
+/* Definitions for if_ether.h */
+/* allow libcs like musl to deactivate this, glibc does not implement this. */
+#ifndef __UAPI_DEF_ETHHDR
+#define __UAPI_DEF_ETHHDR 1
+#endif
+
#endif /* _UAPI_LIBC_COMPAT_H */
--
2.20.1
This is a series of patches used in OpenWrt's v4.9 backports
that seem to be of generic interest to v4.9.y
For the remaining patches I cherry-picked the upstream
commits except for (8/8)
"netfilter: nf_tables: fix mismatch in big-endian system"
where I used OpenWrt's backport.
ChangeLog v1->v2:
- I have dropped two patches from the series: one was to be
applied also to v4.14.y and one was to be applied also to
v4.14.y and v4.19.y. The rest are for v4.9.y as they have
been merged upstream between v4.9 and v4.14.
- The two dropped patches have been sent out separately.
- I have added the "commit nnnnn upstream." message on the
first line of each commit message to fit stable standards.
Upstream commits:
The list of upstream commits in patch order:
6db6f0eae6052b70885562e1733896647ec1d807 ("bridge: multicast to unicast")
e9156cd26a495a18706e796f02a81fee41ec14f4 ("smsc95xx: Use skb_cow_head to deal with cloned skbs")
6bc6895bdd6744e0136eaa4a11fbdb20a7db4e40 ("ch9200: use skb_cow_head() to deal with cloned skbs")
39fba7835aacda65284a86e611774cbba71dac20 ("kaweth: use skb_cow_head() to deal with cloned skbs")
854826c9d526fd81077742c3b000e3f7fcaef3ce ("ubifs: Drop softlimit and delta fields from struct ubifs_wbuf")
1b7fc2c0069f3864a3dda15430b7aded31c0bfcc ("ubifs: Use dirty_writeback_interval value for wbuf timer")
cd4b1e34655d46950c065d9284b596cd8d7b28cd ("usb: dwc2: Remove unnecessary kfree")
10596608c4d62cb8c1c2b806debcbd32fe657e71 ("netfilter: nf_tables: fix mismatch in big-endian system")
Eric Dumazet (2):
ch9200: use skb_cow_head() to deal with cloned skbs
kaweth: use skb_cow_head() to deal with cloned skbs
Felix Fietkau (1):
bridge: multicast to unicast
James Hughes (1):
smsc95xx: Use skb_cow_head to deal with cloned skbs
John Youn (1):
usb: dwc2: Remove unnecessary kfree
Liping Zhang (1):
netfilter: nf_tables: fix mismatch in big-endian system
Rafał Miłecki (2):
ubifs: Drop softlimit and delta fields from struct ubifs_wbuf
ubifs: Use dirty_writeback_interval value for wbuf timer
drivers/net/usb/ch9200.c | 9 +--
drivers/net/usb/kaweth.c | 18 ++----
drivers/net/usb/smsc95xx.c | 12 ++--
drivers/usb/dwc2/hcd.c | 1 -
fs/ubifs/io.c | 18 +++---
fs/ubifs/ubifs.h | 9 ---
include/linux/if_bridge.h | 1 +
include/net/netfilter/nf_tables.h | 29 ++++++++++
include/uapi/linux/if_link.h | 1 +
net/bridge/br_forward.c | 39 ++++++++++++-
net/bridge/br_mdb.c | 2 +-
net/bridge/br_multicast.c | 90 +++++++++++++++++++++--------
net/bridge/br_netlink.c | 5 ++
net/bridge/br_private.h | 3 +-
net/bridge/br_sysfs_if.c | 2 +
net/ipv4/netfilter/nft_masq_ipv4.c | 8 +--
net/ipv4/netfilter/nft_redir_ipv4.c | 8 +--
net/ipv6/netfilter/nft_masq_ipv6.c | 8 +--
net/ipv6/netfilter/nft_redir_ipv6.c | 8 +--
net/netfilter/nft_ct.c | 10 ++--
net/netfilter/nft_meta.c | 42 +++++++-------
net/netfilter/nft_nat.c | 8 +--
22 files changed, 214 insertions(+), 117 deletions(-)
--
2.20.1