kernel: bump 6.6 to 6.6.70
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.70 Removed upstreamed: generic/backport-6.6/902-net-llc-reset-skb-transport_header.patch[1] generic/pending-6.6/605-netfilter-nft_set_hash-unaligned-atomic-read-on-stru.patch[2] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.70&id=0c896816aa193e6459fc947747e5753c06b395b9 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.70&id=4f49349c1963e507aa37c1ec05178faeb0103959 Build system: x86/64 Build-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Run-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/17545 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
@@ -32,7 +32,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -4481,13 +4481,7 @@ static inline void ____napi_schedule(str
|
||||
@@ -4483,13 +4483,7 @@ static inline void ____napi_schedule(str
|
||||
*/
|
||||
thread = READ_ONCE(napi->thread);
|
||||
if (thread) {
|
||||
@@ -47,7 +47,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
wake_up_process(thread);
|
||||
return;
|
||||
}
|
||||
@@ -6643,8 +6637,6 @@ static int napi_poll(struct napi_struct
|
||||
@@ -6645,8 +6639,6 @@ static int napi_poll(struct napi_struct
|
||||
|
||||
static int napi_thread_wait(struct napi_struct *napi)
|
||||
{
|
||||
@@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
|
||||
while (!kthread_should_stop()) {
|
||||
@@ -6653,15 +6645,13 @@ static int napi_thread_wait(struct napi_
|
||||
@@ -6655,15 +6647,13 @@ static int napi_thread_wait(struct napi_
|
||||
* Testing SCHED bit is not enough because SCHED bit might be
|
||||
* set by some other busy poll thread or by napi_disable().
|
||||
*/
|
||||
|
||||
@@ -108,7 +108,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
static inline void rps_lock_irqsave(struct softnet_data *sd,
|
||||
unsigned long *flags)
|
||||
{
|
||||
@@ -4449,6 +4475,7 @@ EXPORT_SYMBOL(__dev_direct_xmit);
|
||||
@@ -4451,6 +4477,7 @@ EXPORT_SYMBOL(__dev_direct_xmit);
|
||||
/*************************************************************************
|
||||
* Receiver routines
|
||||
*************************************************************************/
|
||||
@@ -116,7 +116,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
int netdev_max_backlog __read_mostly = 1000;
|
||||
EXPORT_SYMBOL(netdev_max_backlog);
|
||||
@@ -4481,12 +4508,16 @@ static inline void ____napi_schedule(str
|
||||
@@ -4483,12 +4510,16 @@ static inline void ____napi_schedule(str
|
||||
*/
|
||||
thread = READ_ONCE(napi->thread);
|
||||
if (thread) {
|
||||
@@ -133,7 +133,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
list_add_tail(&napi->poll_list, &sd->poll_list);
|
||||
WRITE_ONCE(napi->list_owner, smp_processor_id());
|
||||
/* If not called from net_rx_action()
|
||||
@@ -4732,6 +4763,11 @@ static void napi_schedule_rps(struct sof
|
||||
@@ -4734,6 +4765,11 @@ static void napi_schedule_rps(struct sof
|
||||
|
||||
#ifdef CONFIG_RPS
|
||||
if (sd != mysd) {
|
||||
@@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
sd->rps_ipi_next = mysd->rps_ipi_list;
|
||||
mysd->rps_ipi_list = sd;
|
||||
|
||||
@@ -5955,7 +5991,7 @@ static void net_rps_action_and_irq_enabl
|
||||
@@ -5957,7 +5993,7 @@ static void net_rps_action_and_irq_enabl
|
||||
#ifdef CONFIG_RPS
|
||||
struct softnet_data *remsd = sd->rps_ipi_list;
|
||||
|
||||
@@ -154,7 +154,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
sd->rps_ipi_list = NULL;
|
||||
|
||||
local_irq_enable();
|
||||
@@ -5970,7 +6006,7 @@ static void net_rps_action_and_irq_enabl
|
||||
@@ -5972,7 +6008,7 @@ static void net_rps_action_and_irq_enabl
|
||||
static bool sd_has_rps_ipi_waiting(struct softnet_data *sd)
|
||||
{
|
||||
#ifdef CONFIG_RPS
|
||||
@@ -163,7 +163,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
@@ -6014,7 +6050,7 @@ static int process_backlog(struct napi_s
|
||||
@@ -6016,7 +6052,7 @@ static int process_backlog(struct napi_s
|
||||
* We can use a plain write instead of clear_bit(),
|
||||
* and we dont need an smp_mb() memory barrier.
|
||||
*/
|
||||
@@ -172,7 +172,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
again = false;
|
||||
} else {
|
||||
skb_queue_splice_tail_init(&sd->input_pkt_queue,
|
||||
@@ -6680,43 +6716,48 @@ static void skb_defer_free_flush(struct
|
||||
@@ -6682,43 +6718,48 @@ static void skb_defer_free_flush(struct
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -11297,7 +11338,7 @@ static int dev_cpu_dead(unsigned int old
|
||||
@@ -11299,7 +11340,7 @@ static int dev_cpu_dead(unsigned int old
|
||||
|
||||
list_del_init(&napi->poll_list);
|
||||
if (napi->poll == process_backlog)
|
||||
@@ -259,7 +259,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
else
|
||||
____napi_schedule(sd, napi);
|
||||
}
|
||||
@@ -11305,12 +11346,14 @@ static int dev_cpu_dead(unsigned int old
|
||||
@@ -11307,12 +11348,14 @@ static int dev_cpu_dead(unsigned int old
|
||||
raise_softirq_irqoff(NET_TX_SOFTIRQ);
|
||||
local_irq_enable();
|
||||
|
||||
@@ -278,7 +278,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
/* Process offline CPU's input_pkt_queue */
|
||||
while ((skb = __skb_dequeue(&oldsd->process_queue))) {
|
||||
@@ -11573,6 +11616,38 @@ static struct pernet_operations __net_in
|
||||
@@ -11575,6 +11618,38 @@ static struct pernet_operations __net_in
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -317,7 +317,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
/*
|
||||
* This is called single threaded during boot, so no need
|
||||
* to take the rtnl semaphore.
|
||||
@@ -11623,7 +11698,10 @@ static int __init net_dev_init(void)
|
||||
@@ -11625,7 +11700,10 @@ static int __init net_dev_init(void)
|
||||
init_gro_hash(&sd->backlog);
|
||||
sd->backlog.poll = process_backlog;
|
||||
sd->backlog.weight = weight_p;
|
||||
|
||||
@@ -82,7 +82,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
spin_unlock_irq(&sd->input_pkt_queue.lock);
|
||||
else if (!IS_ENABLED(CONFIG_PREEMPT_RT))
|
||||
local_irq_enable();
|
||||
@@ -4782,6 +4782,23 @@ static void napi_schedule_rps(struct sof
|
||||
@@ -4784,6 +4784,23 @@ static void napi_schedule_rps(struct sof
|
||||
__napi_schedule_irqoff(&mysd->backlog);
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_RPS) || use_backlog_threads())
|
||||
spin_unlock_irq(&sd->input_pkt_queue.lock);
|
||||
@@ -4787,12 +4787,12 @@ void kick_defer_list_purge(struct softne
|
||||
@@ -4789,12 +4789,12 @@ void kick_defer_list_purge(struct softne
|
||||
unsigned long flags;
|
||||
|
||||
if (use_backlog_threads()) {
|
||||
@@ -82,7 +82,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
} else if (!cmpxchg(&sd->defer_ipi_scheduled, 0, 1)) {
|
||||
smp_call_function_single_async(cpu, &sd->defer_csd);
|
||||
@@ -4854,7 +4854,7 @@ static int enqueue_to_backlog(struct sk_
|
||||
@@ -4856,7 +4856,7 @@ static int enqueue_to_backlog(struct sk_
|
||||
reason = SKB_DROP_REASON_NOT_SPECIFIED;
|
||||
sd = &per_cpu(softnet_data, cpu);
|
||||
|
||||
@@ -91,7 +91,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
if (!netif_running(skb->dev))
|
||||
goto drop;
|
||||
qlen = skb_queue_len(&sd->input_pkt_queue);
|
||||
@@ -4863,7 +4863,7 @@ static int enqueue_to_backlog(struct sk_
|
||||
@@ -4865,7 +4865,7 @@ static int enqueue_to_backlog(struct sk_
|
||||
enqueue:
|
||||
__skb_queue_tail(&sd->input_pkt_queue, skb);
|
||||
input_queue_tail_incr_save(sd, qtail);
|
||||
@@ -100,7 +100,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
return NET_RX_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -4878,7 +4878,7 @@ enqueue:
|
||||
@@ -4880,7 +4880,7 @@ enqueue:
|
||||
|
||||
drop:
|
||||
sd->dropped++;
|
||||
@@ -109,7 +109,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
dev_core_stats_rx_dropped_inc(skb->dev);
|
||||
kfree_skb_reason(skb, reason);
|
||||
@@ -5909,7 +5909,7 @@ static void flush_backlog(struct work_st
|
||||
@@ -5911,7 +5911,7 @@ static void flush_backlog(struct work_st
|
||||
local_bh_disable();
|
||||
sd = this_cpu_ptr(&softnet_data);
|
||||
|
||||
@@ -118,7 +118,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) {
|
||||
if (skb->dev->reg_state == NETREG_UNREGISTERING) {
|
||||
__skb_unlink(skb, &sd->input_pkt_queue);
|
||||
@@ -5917,7 +5917,7 @@ static void flush_backlog(struct work_st
|
||||
@@ -5919,7 +5919,7 @@ static void flush_backlog(struct work_st
|
||||
input_queue_head_incr(sd);
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
skb_queue_walk_safe(&sd->process_queue, skb, tmp) {
|
||||
if (skb->dev->reg_state == NETREG_UNREGISTERING) {
|
||||
@@ -5935,14 +5935,14 @@ static bool flush_required(int cpu)
|
||||
@@ -5937,14 +5937,14 @@ static bool flush_required(int cpu)
|
||||
struct softnet_data *sd = &per_cpu(softnet_data, cpu);
|
||||
bool do_flush;
|
||||
|
||||
@@ -144,7 +144,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
return do_flush;
|
||||
#endif
|
||||
@@ -6057,7 +6057,7 @@ static int process_backlog(struct napi_s
|
||||
@@ -6059,7 +6059,7 @@ static int process_backlog(struct napi_s
|
||||
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
if (skb_queue_empty(&sd->input_pkt_queue)) {
|
||||
/*
|
||||
* Inline a custom version of __napi_complete().
|
||||
@@ -6073,7 +6073,7 @@ static int process_backlog(struct napi_s
|
||||
@@ -6075,7 +6075,7 @@ static int process_backlog(struct napi_s
|
||||
skb_queue_splice_tail_init(&sd->input_pkt_queue,
|
||||
&sd->process_queue);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -9759,6 +9759,15 @@ static void netdev_sync_lower_features(s
|
||||
@@ -9761,6 +9761,15 @@ static void netdev_sync_lower_features(s
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
static netdev_features_t netdev_fix_features(struct net_device *dev,
|
||||
netdev_features_t features)
|
||||
{
|
||||
@@ -9840,15 +9849,9 @@ static netdev_features_t netdev_fix_feat
|
||||
@@ -9842,15 +9851,9 @@ static netdev_features_t netdev_fix_feat
|
||||
features &= ~NETIF_F_LRO;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
if ((features & NETIF_F_HW_TLS_RX) && !(features & NETIF_F_RXCSUM)) {
|
||||
@@ -9856,6 +9859,11 @@ static netdev_features_t netdev_fix_feat
|
||||
@@ -9858,6 +9861,11 @@ static netdev_features_t netdev_fix_feat
|
||||
features &= ~NETIF_F_HW_TLS_RX;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -10666,6 +10666,8 @@ struct rtnl_link_stats64 *dev_get_stats(
|
||||
@@ -10668,6 +10668,8 @@ struct rtnl_link_stats64 *dev_get_stats(
|
||||
ops->ndo_get_stats64(dev, storage);
|
||||
} else if (ops->ndo_get_stats) {
|
||||
netdev_stats_to_stats64(storage, ops->ndo_get_stats(dev));
|
||||
|
||||
@@ -49,7 +49,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
unsigned char name_assign_type,
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -10353,25 +10353,12 @@ err_free_name:
|
||||
@@ -10355,25 +10355,12 @@ err_free_name:
|
||||
}
|
||||
EXPORT_SYMBOL(register_netdevice);
|
||||
|
||||
@@ -79,7 +79,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* make sure we BUG if trying to hit standard
|
||||
* register/unregister code path
|
||||
*/
|
||||
@@ -10391,12 +10378,32 @@ int init_dummy_netdev(struct net_device
|
||||
@@ -10393,12 +10380,32 @@ int init_dummy_netdev(struct net_device
|
||||
* because users of this 'device' dont need to change
|
||||
* its refcount.
|
||||
*/
|
||||
@@ -113,7 +113,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/**
|
||||
* register_netdev - register a network device
|
||||
* @dev: device to register
|
||||
@@ -10990,6 +10997,19 @@ void free_netdev(struct net_device *dev)
|
||||
@@ -10992,6 +10999,19 @@ void free_netdev(struct net_device *dev)
|
||||
EXPORT_SYMBOL(free_netdev);
|
||||
|
||||
/**
|
||||
|
||||
@@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
/**
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -6610,7 +6610,7 @@ static int __napi_poll(struct napi_struc
|
||||
@@ -6612,7 +6612,7 @@ static int __napi_poll(struct napi_struc
|
||||
* accidentally calling ->poll() when NAPI is not scheduled.
|
||||
*/
|
||||
work = 0;
|
||||
|
||||
@@ -23,7 +23,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -10983,7 +10983,8 @@ void free_netdev(struct net_device *dev)
|
||||
@@ -10985,7 +10985,8 @@ void free_netdev(struct net_device *dev)
|
||||
dev->xdp_bulkq = NULL;
|
||||
|
||||
/* Compatibility with error handling in drivers */
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
From a024e377efed31ecfb39210bed562932321345b3 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Pastor <antonio.pastor@gmail.com>
|
||||
Date: Tue, 24 Dec 2024 20:07:20 -0500
|
||||
Subject: [PATCH] net: llc: reset skb->transport_header
|
||||
|
||||
802.2+LLC+SNAP frames received by napi_complete_done with GRO and DSA
|
||||
have skb->transport_header set two bytes short, or pointing 2 bytes
|
||||
before network_header & skb->data. As snap_rcv expects transport_header
|
||||
to point to SNAP header (OID:PID) after LLC processing advances offset
|
||||
over LLC header (llc_rcv & llc_fixup_skb), code doesn't find a match
|
||||
and packet is dropped.
|
||||
|
||||
Between napi_complete_done and snap_rcv, transport_header is not used
|
||||
until __netif_receive_skb_core, where originally it was being reset.
|
||||
Commit fda55eca5a33 ("net: introduce skb_transport_header_was_set()")
|
||||
only does so if not set, on the assumption the value was set correctly
|
||||
by GRO (and also on assumption that "network stacks usually reset the
|
||||
transport header anyway"). Afterwards it is moved forward by
|
||||
llc_fixup_skb.
|
||||
|
||||
Locally generated traffic shows up at __netif_receive_skb_core with no
|
||||
transport_header set and is processed without issue. On a setup with
|
||||
GRO but no DSA, transport_header and network_header are both set to
|
||||
point to skb->data which is also correct.
|
||||
|
||||
As issue is LLC specific, to avoid impacting non-LLC traffic, and to
|
||||
follow up on original assumption made on previous code change,
|
||||
llc_fixup_skb to reset the offset after skb pull. llc_fixup_skb
|
||||
assumes the LLC header is at skb->data, and by definition SNAP header
|
||||
immediately follows.
|
||||
|
||||
Fixes: fda55eca5a33 ("net: introduce skb_transport_header_was_set()")
|
||||
Signed-off-by: Antonio Pastor <antonio.pastor@gmail.com>
|
||||
Reviewed-by: Eric Dumazet <edumazet@google.com>
|
||||
Link: https://patch.msgid.link/20241225010723.2830290-1-antonio.pastor@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
net/llc/llc_input.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/net/llc/llc_input.c
|
||||
+++ b/net/llc/llc_input.c
|
||||
@@ -124,8 +124,8 @@ static inline int llc_fixup_skb(struct s
|
||||
if (unlikely(!pskb_may_pull(skb, llc_len)))
|
||||
return 0;
|
||||
|
||||
- skb->transport_header += llc_len;
|
||||
skb_pull(skb, llc_len);
|
||||
+ skb_reset_transport_header(skb);
|
||||
if (skb->protocol == htons(ETH_P_802_2)) {
|
||||
__be16 pdulen;
|
||||
s32 data_size;
|
||||
@@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *,
|
||||
u32));
|
||||
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *,
|
||||
@@ -2239,9 +2256,11 @@ static void __sk_free(struct sock *sk)
|
||||
@@ -2242,9 +2259,11 @@ static void __sk_free(struct sock *sk)
|
||||
if (likely(sk->sk_net_refcnt))
|
||||
sock_inuse_add(sock_net(sk), -1);
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/core/sock.c
|
||||
+++ b/net/core/sock.c
|
||||
@@ -4140,6 +4140,8 @@ static __net_initdata struct pernet_oper
|
||||
@@ -4143,6 +4143,8 @@ static __net_initdata struct pernet_oper
|
||||
|
||||
static int __init proto_init(void)
|
||||
{
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
From 113fb8a8d1f27156f58b27ce0fc02af9b3705bf7 Mon Sep 17 00:00:00 2001
|
||||
From: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
Date: Sun, 22 Dec 2024 11:02:39 +0100
|
||||
Subject: [PATCH] netfilter: nft_set_hash: unaligned atomic read on struct
|
||||
nft_set_ext
|
||||
|
||||
Access to genmask field in struct nft_set_ext results in unaligned
|
||||
atomic read:
|
||||
|
||||
[ 72.130109] Unable to handle kernel paging request at virtual address ffff0000c2bb708c
|
||||
[ 72.131036] Mem abort info:
|
||||
[ 72.131213] ESR = 0x0000000096000021
|
||||
[ 72.131446] EC = 0x25: DABT (current EL), IL = 32 bits
|
||||
[ 72.132209] SET = 0, FnV = 0
|
||||
[ 72.133216] EA = 0, S1PTW = 0
|
||||
[ 72.134080] FSC = 0x21: alignment fault
|
||||
[ 72.135593] Data abort info:
|
||||
[ 72.137194] ISV = 0, ISS = 0x00000021, ISS2 = 0x00000000
|
||||
[ 72.142351] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
|
||||
[ 72.145989] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
|
||||
[ 72.150115] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000237d27000
|
||||
[ 72.154893] [ffff0000c2bb708c] pgd=0000000000000000, p4d=180000023ffff403, pud=180000023f84b403, pmd=180000023f835403,
|
||||
+pte=0068000102bb7707
|
||||
[ 72.163021] Internal error: Oops: 0000000096000021 [#1] SMP
|
||||
[...]
|
||||
[ 72.170041] CPU: 7 UID: 0 PID: 54 Comm: kworker/7:0 Tainted: G E 6.13.0-rc3+ #2
|
||||
[ 72.170509] Tainted: [E]=UNSIGNED_MODULE
|
||||
[ 72.170720] Hardware name: QEMU QEMU Virtual Machine, BIOS edk2-stable202302-for-qemu 03/01/2023
|
||||
[ 72.171192] Workqueue: events_power_efficient nft_rhash_gc [nf_tables]
|
||||
[ 72.171552] pstate: 21400005 (nzCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
|
||||
[ 72.171915] pc : nft_rhash_gc+0x200/0x2d8 [nf_tables]
|
||||
[ 72.172166] lr : nft_rhash_gc+0x128/0x2d8 [nf_tables]
|
||||
[ 72.172546] sp : ffff800081f2bce0
|
||||
[ 72.172724] x29: ffff800081f2bd40 x28: ffff0000c2bb708c x27: 0000000000000038
|
||||
[ 72.173078] x26: ffff0000c6780ef0 x25: ffff0000c643df00 x24: ffff0000c6778f78
|
||||
[ 72.173431] x23: 000000000000001a x22: ffff0000c4b1f000 x21: ffff0000c6780f78
|
||||
[ 72.173782] x20: ffff0000c2bb70dc x19: ffff0000c2bb7080 x18: 0000000000000000
|
||||
[ 72.174135] x17: ffff0000c0a4e1c0 x16: 0000000000003000 x15: 0000ac26d173b978
|
||||
[ 72.174485] x14: ffffffffffffffff x13: 0000000000000030 x12: ffff0000c6780ef0
|
||||
[ 72.174841] x11: 0000000000000000 x10: ffff800081f2bcf8 x9 : ffff0000c3000000
|
||||
[ 72.175193] x8 : 00000000000004be x7 : 0000000000000000 x6 : 0000000000000000
|
||||
[ 72.175544] x5 : 0000000000000040 x4 : ffff0000c3000010 x3 : 0000000000000000
|
||||
[ 72.175871] x2 : 0000000000003a98 x1 : ffff0000c2bb708c x0 : 0000000000000004
|
||||
[ 72.176207] Call trace:
|
||||
[ 72.176316] nft_rhash_gc+0x200/0x2d8 [nf_tables] (P)
|
||||
[ 72.176653] process_one_work+0x178/0x3d0
|
||||
[ 72.176831] worker_thread+0x200/0x3f0
|
||||
[ 72.176995] kthread+0xe8/0xf8
|
||||
[ 72.177130] ret_from_fork+0x10/0x20
|
||||
[ 72.177289] Code: 54fff984 d503201f d2800080 91003261 (f820303f)
|
||||
[ 72.177557] ---[ end trace 0000000000000000 ]---
|
||||
|
||||
Align struct nft_set_ext to word size to address this and
|
||||
documentation it.
|
||||
|
||||
pahole reports that this increases the size of elements for rhash and
|
||||
pipapo in 8 bytes on x86_64.
|
||||
|
||||
Fixes: 7ffc7481153b ("netfilter: nft_set_hash: skip duplicated elements pending gc run")
|
||||
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
---
|
||||
include/net/netfilter/nf_tables.h | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/include/net/netfilter/nf_tables.h
|
||||
+++ b/include/net/netfilter/nf_tables.h
|
||||
@@ -721,15 +721,18 @@ struct nft_set_ext_tmpl {
|
||||
/**
|
||||
* struct nft_set_ext - set extensions
|
||||
*
|
||||
- * @genmask: generation mask
|
||||
+ * @genmask: generation mask, but also flags (see NFT_SET_ELEM_DEAD_BIT)
|
||||
* @offset: offsets of individual extension types
|
||||
* @data: beginning of extension data
|
||||
+ *
|
||||
+ * This structure must be aligned to word size, otherwise atomic bitops
|
||||
+ * on genmask field can cause aligment failure on some archs.
|
||||
*/
|
||||
struct nft_set_ext {
|
||||
u8 genmask;
|
||||
u8 offset[NFT_SET_EXT_NUM];
|
||||
char data[];
|
||||
-};
|
||||
+} __aligned(BITS_PER_LONG / 8);
|
||||
|
||||
static inline void nft_set_ext_prepare(struct nft_set_ext_tmpl *tmpl)
|
||||
{
|
||||
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
#define PACKET_FANOUT_LB 1
|
||||
--- a/net/packet/af_packet.c
|
||||
+++ b/net/packet/af_packet.c
|
||||
@@ -1925,6 +1925,7 @@ static int packet_rcv_spkt(struct sk_buf
|
||||
@@ -1911,6 +1911,7 @@ static int packet_rcv_spkt(struct sk_buf
|
||||
{
|
||||
struct sock *sk;
|
||||
struct sockaddr_pkt *spkt;
|
||||
@@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
/*
|
||||
* When we registered the protocol we saved the socket in the data
|
||||
@@ -1932,6 +1933,7 @@ static int packet_rcv_spkt(struct sk_buf
|
||||
@@ -1918,6 +1919,7 @@ static int packet_rcv_spkt(struct sk_buf
|
||||
*/
|
||||
|
||||
sk = pt->af_packet_priv;
|
||||
@@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
/*
|
||||
* Yank back the headers [hope the device set this
|
||||
@@ -1944,7 +1946,7 @@ static int packet_rcv_spkt(struct sk_buf
|
||||
@@ -1930,7 +1932,7 @@ static int packet_rcv_spkt(struct sk_buf
|
||||
* so that this procedure is noop.
|
||||
*/
|
||||
|
||||
@@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
goto out;
|
||||
|
||||
if (!net_eq(dev_net(dev), sock_net(sk)))
|
||||
@@ -2190,12 +2192,12 @@ static int packet_rcv(struct sk_buff *sk
|
||||
@@ -2176,12 +2178,12 @@ static int packet_rcv(struct sk_buff *sk
|
||||
unsigned int snaplen, res;
|
||||
bool is_drop_n_account = false;
|
||||
|
||||
@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (!net_eq(dev_net(dev), sock_net(sk)))
|
||||
goto drop;
|
||||
|
||||
@@ -2322,12 +2324,12 @@ static int tpacket_rcv(struct sk_buff *s
|
||||
@@ -2308,12 +2310,12 @@ static int tpacket_rcv(struct sk_buff *s
|
||||
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32);
|
||||
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48);
|
||||
|
||||
@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (!net_eq(dev_net(dev), sock_net(sk)))
|
||||
goto drop;
|
||||
|
||||
@@ -3451,6 +3453,7 @@ static int packet_create(struct net *net
|
||||
@@ -3437,6 +3439,7 @@ static int packet_create(struct net *net
|
||||
mutex_init(&po->pg_vec_lock);
|
||||
po->rollover = NULL;
|
||||
po->prot_hook.func = packet_rcv;
|
||||
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (sock->type == SOCK_PACKET)
|
||||
po->prot_hook.func = packet_rcv_spkt;
|
||||
@@ -4118,6 +4121,16 @@ packet_setsockopt(struct socket *sock, i
|
||||
@@ -4104,6 +4107,16 @@ packet_setsockopt(struct socket *sock, i
|
||||
packet_sock_flag_set(po, PACKET_SOCK_QDISC_BYPASS, val);
|
||||
return 0;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
default:
|
||||
return -ENOPROTOOPT;
|
||||
}
|
||||
@@ -4177,6 +4190,13 @@ static int packet_getsockopt(struct sock
|
||||
@@ -4163,6 +4176,13 @@ static int packet_getsockopt(struct sock
|
||||
case PACKET_VNET_HDR_SZ:
|
||||
val = READ_ONCE(po->vnet_hdr_sz);
|
||||
break;
|
||||
|
||||
@@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
return features;
|
||||
--- a/net/core/sock.c
|
||||
+++ b/net/core/sock.c
|
||||
@@ -2441,7 +2441,7 @@ void sk_setup_caps(struct sock *sk, stru
|
||||
@@ -2444,7 +2444,7 @@ void sk_setup_caps(struct sock *sk, stru
|
||||
if (sk_is_tcp(sk))
|
||||
sk->sk_route_caps |= NETIF_F_GSO;
|
||||
if (sk->sk_route_caps & NETIF_F_GSO)
|
||||
|
||||
Reference in New Issue
Block a user