Skip to content

Commit 6714ebb

Browse files
committed
Merge tag 'net-6.8.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from bpf and netfilter. Current release - regressions: - af_unix: fix another unix GC hangup Previous releases - regressions: - core: fix a possible AF_UNIX deadlock - bpf: fix NULL pointer dereference in sk_psock_verdict_data_ready() - netfilter: nft_flow_offload: release dst in case direct xmit path is used - bridge: switchdev: ensure MDB events are delivered exactly once - l2tp: pass correct message length to ip6_append_data - dccp/tcp: unhash sk from ehash for tb2 alloc failure after check_estalblished() - tls: fixes for record type handling with PEEK - devlink: fix possible use-after-free and memory leaks in devlink_init() Previous releases - always broken: - bpf: fix an oops when attempting to read the vsyscall page through bpf_probe_read_kernel - sched: act_mirred: use the backlog for mirred ingress - netfilter: nft_flow_offload: fix dst refcount underflow - ipv6: sr: fix possible use-after-free and null-ptr-deref - mptcp: fix several data races - phonet: take correct lock to peek at the RX queue Misc: - handful of fixes and reliability improvements for selftests" * tag 'net-6.8.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (72 commits) l2tp: pass correct message length to ip6_append_data net: phy: realtek: Fix rtl8211f_config_init() for RTL8211F(D)(I)-VD-CG PHY selftests: ioam: refactoring to align with the fix Fix write to cloned skb in ipv6_hop_ioam() phonet/pep: fix racy skb_queue_empty() use phonet: take correct lock to peek at the RX queue net: sparx5: Add spinlock for frame transmission from CPU net/sched: flower: Add lock protection when remove filter handle devlink: fix port dump cmd type net: stmmac: Fix EST offset for dwmac 5.10 tools: ynl: don't leak mcast_groups on init error tools: ynl: make sure we always pass yarg to mnl_cb_run net: mctp: put sock on tag allocation failure netfilter: nf_tables: use kzalloc for hook allocation netfilter: nf_tables: register hooks last when adding new chain/flowtable netfilter: nft_flow_offload: release dst in case direct xmit path is used netfilter: nft_flow_offload: reset dst in route object after setting up flow netfilter: nf_tables: set dormant flag on hook register failure selftests: tls: add test for peeking past a record of a different type selftests: tls: add test for merging of same-type control messages ...
2 parents efa80dc + 359e54a commit 6714ebb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+870
-378
lines changed

Documentation/process/maintainer-netdev.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ patchwork checks
431431
Checks in patchwork are mostly simple wrappers around existing kernel
432432
scripts, the sources are available at:
433433

434-
https://github.com/kuba-moo/nipa/tree/master/tests
434+
https://github.com/linux-netdev/nipa/tree/master/tests
435435

436436
**Do not** post your patches just to run them through the checks.
437437
You must ensure that your patches are ready by testing them locally

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15242,6 +15242,8 @@ F: Documentation/networking/
1524215242
F: Documentation/networking/net_cachelines/
1524315243
F: Documentation/process/maintainer-netdev.rst
1524415244
F: Documentation/userspace-api/netlink/
15245+
F: include/linux/framer/framer-provider.h
15246+
F: include/linux/framer/framer.h
1524515247
F: include/linux/in.h
1524615248
F: include/linux/indirect_call_wrapper.h
1524715249
F: include/linux/net.h

arch/x86/include/asm/vsyscall.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <linux/seqlock.h>
66
#include <uapi/asm/vsyscall.h>
7+
#include <asm/page_types.h>
78

89
#ifdef CONFIG_X86_VSYSCALL_EMULATION
910
extern void map_vsyscall(void);
@@ -24,4 +25,13 @@ static inline bool emulate_vsyscall(unsigned long error_code,
2425
}
2526
#endif
2627

28+
/*
29+
* The (legacy) vsyscall page is the long page in the kernel portion
30+
* of the address space that has user-accessible permissions.
31+
*/
32+
static inline bool is_vsyscall_vaddr(unsigned long vaddr)
33+
{
34+
return unlikely((vaddr & PAGE_MASK) == VSYSCALL_ADDR);
35+
}
36+
2737
#endif /* _ASM_X86_VSYSCALL_H */

arch/x86/mm/fault.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -798,15 +798,6 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code,
798798
show_opcodes(regs, loglvl);
799799
}
800800

801-
/*
802-
* The (legacy) vsyscall page is the long page in the kernel portion
803-
* of the address space that has user-accessible permissions.
804-
*/
805-
static bool is_vsyscall_vaddr(unsigned long vaddr)
806-
{
807-
return unlikely((vaddr & PAGE_MASK) == VSYSCALL_ADDR);
808-
}
809-
810801
static void
811802
__bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
812803
unsigned long address, u32 pkey, int si_code)

arch/x86/mm/maccess.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include <linux/uaccess.h>
44
#include <linux/kernel.h>
55

6+
#include <asm/vsyscall.h>
7+
68
#ifdef CONFIG_X86_64
79
bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
810
{
@@ -15,6 +17,14 @@ bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
1517
if (vaddr < TASK_SIZE_MAX + PAGE_SIZE)
1618
return false;
1719

20+
/*
21+
* Reading from the vsyscall page may cause an unhandled fault in
22+
* certain cases. Though it is at an address above TASK_SIZE_MAX, it is
23+
* usually considered as a user space address.
24+
*/
25+
if (is_vsyscall_vaddr(vaddr))
26+
return false;
27+
1828
/*
1929
* Allow everything during early boot before 'x86_virt_bits'
2030
* is initialized. Needed for instruction decoding in early

drivers/net/ethernet/adi/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ config NET_VENDOR_ADI
77
bool "Analog Devices devices"
88
default y
99
depends on SPI
10+
select PHYLIB
1011
help
1112
If you have a network (Ethernet) card belonging to this class, say Y.
1213

drivers/net/ethernet/broadcom/asp2/bcmasp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,9 +535,6 @@ int bcmasp_netfilt_get_all_active(struct bcmasp_intf *intf, u32 *rule_locs,
535535
int j = 0, i;
536536

537537
for (i = 0; i < NUM_NET_FILTERS; i++) {
538-
if (j == *rule_cnt)
539-
return -EMSGSIZE;
540-
541538
if (!priv->net_filters[i].claimed ||
542539
priv->net_filters[i].port != intf->port)
543540
continue;
@@ -547,6 +544,9 @@ int bcmasp_netfilt_get_all_active(struct bcmasp_intf *intf, u32 *rule_locs,
547544
priv->net_filters[i - 1].wake_filter)
548545
continue;
549546

547+
if (j == *rule_cnt)
548+
return -EMSGSIZE;
549+
550550
rule_locs[j++] = priv->net_filters[i].fs.location;
551551
}
552552

drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,9 @@ static int bcmasp_netif_init(struct net_device *dev, bool phy_connect)
10501050
netdev_err(dev, "could not attach to PHY\n");
10511051
goto err_phy_disable;
10521052
}
1053+
1054+
/* Indicate that the MAC is responsible for PHY PM */
1055+
phydev->mac_managed_pm = true;
10531056
} else if (!intf->wolopts) {
10541057
ret = phy_resume(dev->phydev);
10551058
if (ret)

drivers/net/ethernet/cisco/enic/vnic_vic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ int vic_provinfo_add_tlv(struct vic_provinfo *vp, u16 type, u16 length,
4949

5050
tlv->type = htons(type);
5151
tlv->length = htons(length);
52-
memcpy(tlv->value, value, length);
52+
unsafe_memcpy(tlv->value, value, length,
53+
/* Flexible array of flexible arrays */);
5354

5455
vp->num_tlvs = htonl(ntohl(vp->num_tlvs) + 1);
5556
vp->length = htonl(ntohl(vp->length) +

drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,10 @@ static void npc_fixup_vf_rule(struct rvu *rvu, struct npc_mcam *mcam,
415415
return;
416416
}
417417

418+
/* AF modifies given action iff PF/VF has requested for it */
419+
if ((entry->action & 0xFULL) != NIX_RX_ACTION_DEFAULT)
420+
return;
421+
418422
/* copy VF default entry action to the VF mcam entry */
419423
rx_action = npc_get_default_entry_action(rvu, mcam, blkaddr,
420424
target_func);

0 commit comments

Comments
 (0)