Skip to content

Commit 405d32f

Browse files
committed
Merge tag 'v6.6.96' into 6.6-main
This is the 6.6.96 stable release # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCgAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmhqOyYACgkQONu9yGCS # aT7x9g/9HJMg43qBzMmmHn26s60iNCl9XZb5tZOgrv+KAn08y3uTQDDxLXreu3q5 # KBh+A+ugWN+wZaLhe69jgkMkdIJ0pFuA7weP2QkYC36E8PC25oWE//uEJAzLj53C # 6O8JLPlHKeMjgJ+SGfJWVqEPHYfLtJOSwXWyxKOfj/lnR0SZRuhKNVpGwIYzdTJ5 # AfPzBJqbEH4E8Lbwi+p8ES9wyBdAxg9oxmuNbvOBdNQBSQPMR1cSu2m5nhe9/7Me # mMDtkF3HqZrNBAXnyqXjl4/PQedkKuuNgpaTF5HVb3pjex193s+dw7TQdY05DjmH # My1uINBKry3S0LITRA91IFdpkJDAfrW3/aiwrUDR44oyUdvYQwFe/J1TRyzvfkOk # J2Y4qGmHi0mPrSSjt9Xqe22T7FLn4FyrUZq+VFePocxIZ1TNgBQ+53eN15fEjl7s # baerqpIJjX+q/BUuPLHtaM8xy+EflCzh9v+/oEquVyyKVaxYeU28zvLk8ju712Cj # 39bCJLL/9Ef58gfhMG1m1oIU/RRglqJZn8OKhLTkGkrWhReWNFIDZxET1n6UJOYB # yeGpryyNaVHHn8mRjZhpL0KWppCMh0Avfneo0exMDyOC7jb98s8rdI1QMT/Q5PFx # UZgSuwx0s6zICcHlIAIwUMJ0hZwaq9LfaozLk5LJigJN8N3k1do= # =w38N # -----END PGP SIGNATURE----- # gpg: Signature made Sun Jul 6 11:00:22 2025 CEST # gpg: using RSA key 647F28654894E3BD457199BE38DBBDC86092693E # gpg: Can't check signature: No public key
2 parents c9623e5 + a5df3a7 commit 405d32f

149 files changed

Lines changed: 1557 additions & 828 deletions

File tree

Some content is hidden

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

Documentation/devicetree/bindings/serial/8250.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ allOf:
4545
- ns16550
4646
- ns16550a
4747
then:
48-
anyOf:
48+
oneOf:
4949
- required: [ clock-frequency ]
5050
- required: [ clocks ]
5151

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 6
33
PATCHLEVEL = 6
4-
SUBLEVEL = 95
4+
SUBLEVEL = 96
55
EXTRAVERSION =
66
NAME = Pinguïn Aangedreven
77

arch/arm/include/asm/ptrace.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <uapi/asm/ptrace.h>
1111

1212
#ifndef __ASSEMBLY__
13+
#include <linux/bitfield.h>
1314
#include <linux/types.h>
1415

1516
struct pt_regs {
@@ -35,8 +36,8 @@ struct svc_pt_regs {
3536

3637
#ifndef CONFIG_CPU_V7M
3738
#define isa_mode(regs) \
38-
((((regs)->ARM_cpsr & PSR_J_BIT) >> (__ffs(PSR_J_BIT) - 1)) | \
39-
(((regs)->ARM_cpsr & PSR_T_BIT) >> (__ffs(PSR_T_BIT))))
39+
(FIELD_GET(PSR_J_BIT, (regs)->ARM_cpsr) << 1 | \
40+
FIELD_GET(PSR_T_BIT, (regs)->ARM_cpsr))
4041
#else
4142
#define isa_mode(regs) 1 /* Thumb */
4243
#endif

arch/s390/kernel/entry.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ SYM_CODE_START(stack_overflow)
639639
stmg %r0,%r7,__PT_R0(%r11)
640640
stmg %r8,%r9,__PT_PSW(%r11)
641641
mvc __PT_R8(64,%r11),0(%r14)
642-
stg %r10,__PT_ORIG_GPR2(%r11) # store last break to orig_gpr2
642+
mvc __PT_ORIG_GPR2(8,%r11),__LC_PGM_LAST_BREAK
643643
xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
644644
lgr %r2,%r11 # pass pointer to pt_regs
645645
jg kernel_stack_overflow

arch/um/drivers/ubd_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ int start_io_thread(unsigned long sp, int *fd_out)
4141
*fd_out = fds[1];
4242

4343
err = os_set_fd_block(*fd_out, 0);
44-
err = os_set_fd_block(kernel_fd, 0);
44+
err |= os_set_fd_block(kernel_fd, 0);
4545
if (err) {
4646
printk("start_io_thread - failed to set nonblocking I/O.\n");
4747
goto out_close;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
#include <asm-generic/asm-prototypes.h>
2+
#include <asm/checksum.h>
3+
4+
#ifdef CONFIG_UML_X86
5+
extern void cmpxchg8b_emu(void);
6+
#endif

arch/um/kernel/trap.c

Lines changed: 117 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,122 @@
1717
#include <os.h>
1818
#include <skas.h>
1919

20+
/*
21+
* NOTE: UML does not have exception tables. As such, this is almost a copy
22+
* of the code in mm/memory.c, only adjusting the logic to simply check whether
23+
* we are coming from the kernel instead of doing an additional lookup in the
24+
* exception table.
25+
* We can do this simplification because we never get here if the exception was
26+
* fixable.
27+
*/
28+
static inline bool get_mmap_lock_carefully(struct mm_struct *mm, bool is_user)
29+
{
30+
if (likely(mmap_read_trylock(mm)))
31+
return true;
32+
33+
if (!is_user)
34+
return false;
35+
36+
return !mmap_read_lock_killable(mm);
37+
}
38+
39+
static inline bool mmap_upgrade_trylock(struct mm_struct *mm)
40+
{
41+
/*
42+
* We don't have this operation yet.
43+
*
44+
* It should be easy enough to do: it's basically a
45+
* atomic_long_try_cmpxchg_acquire()
46+
* from RWSEM_READER_BIAS -> RWSEM_WRITER_LOCKED, but
47+
* it also needs the proper lockdep magic etc.
48+
*/
49+
return false;
50+
}
51+
52+
static inline bool upgrade_mmap_lock_carefully(struct mm_struct *mm, bool is_user)
53+
{
54+
mmap_read_unlock(mm);
55+
if (!is_user)
56+
return false;
57+
58+
return !mmap_write_lock_killable(mm);
59+
}
60+
61+
/*
62+
* Helper for page fault handling.
63+
*
64+
* This is kind of equivalend to "mmap_read_lock()" followed
65+
* by "find_extend_vma()", except it's a lot more careful about
66+
* the locking (and will drop the lock on failure).
67+
*
68+
* For example, if we have a kernel bug that causes a page
69+
* fault, we don't want to just use mmap_read_lock() to get
70+
* the mm lock, because that would deadlock if the bug were
71+
* to happen while we're holding the mm lock for writing.
72+
*
73+
* So this checks the exception tables on kernel faults in
74+
* order to only do this all for instructions that are actually
75+
* expected to fault.
76+
*
77+
* We can also actually take the mm lock for writing if we
78+
* need to extend the vma, which helps the VM layer a lot.
79+
*/
80+
static struct vm_area_struct *
81+
um_lock_mm_and_find_vma(struct mm_struct *mm,
82+
unsigned long addr, bool is_user)
83+
{
84+
struct vm_area_struct *vma;
85+
86+
if (!get_mmap_lock_carefully(mm, is_user))
87+
return NULL;
88+
89+
vma = find_vma(mm, addr);
90+
if (likely(vma && (vma->vm_start <= addr)))
91+
return vma;
92+
93+
/*
94+
* Well, dang. We might still be successful, but only
95+
* if we can extend a vma to do so.
96+
*/
97+
if (!vma || !(vma->vm_flags & VM_GROWSDOWN)) {
98+
mmap_read_unlock(mm);
99+
return NULL;
100+
}
101+
102+
/*
103+
* We can try to upgrade the mmap lock atomically,
104+
* in which case we can continue to use the vma
105+
* we already looked up.
106+
*
107+
* Otherwise we'll have to drop the mmap lock and
108+
* re-take it, and also look up the vma again,
109+
* re-checking it.
110+
*/
111+
if (!mmap_upgrade_trylock(mm)) {
112+
if (!upgrade_mmap_lock_carefully(mm, is_user))
113+
return NULL;
114+
115+
vma = find_vma(mm, addr);
116+
if (!vma)
117+
goto fail;
118+
if (vma->vm_start <= addr)
119+
goto success;
120+
if (!(vma->vm_flags & VM_GROWSDOWN))
121+
goto fail;
122+
}
123+
124+
if (expand_stack_locked(vma, addr))
125+
goto fail;
126+
127+
success:
128+
mmap_write_downgrade(mm);
129+
return vma;
130+
131+
fail:
132+
mmap_write_unlock(mm);
133+
return NULL;
134+
}
135+
20136
/*
21137
* Note this is constrained to return 0, -EFAULT, -EACCES, -ENOMEM by
22138
* segv().
@@ -43,21 +159,10 @@ int handle_page_fault(unsigned long address, unsigned long ip,
43159
if (is_user)
44160
flags |= FAULT_FLAG_USER;
45161
retry:
46-
mmap_read_lock(mm);
47-
vma = find_vma(mm, address);
48-
if (!vma)
49-
goto out;
50-
if (vma->vm_start <= address)
51-
goto good_area;
52-
if (!(vma->vm_flags & VM_GROWSDOWN))
53-
goto out;
54-
if (is_user && !ARCH_IS_STACKGROW(address))
55-
goto out;
56-
vma = expand_stack(mm, address);
162+
vma = um_lock_mm_and_find_vma(mm, address, is_user);
57163
if (!vma)
58164
goto out_nosemaphore;
59165

60-
good_area:
61166
*code_out = SEGV_ACCERR;
62167
if (is_write) {
63168
if (!(vma->vm_flags & VM_WRITE))

arch/x86/tools/insn_decoder_test.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
#include <assert.h>
1111
#include <unistd.h>
1212
#include <stdarg.h>
13-
14-
#define unlikely(cond) (cond)
13+
#include <linux/kallsyms.h>
1514

1615
#include <asm/insn.h>
1716
#include <inat.c>
@@ -106,7 +105,7 @@ static void parse_args(int argc, char **argv)
106105
}
107106
}
108107

109-
#define BUFSIZE 256
108+
#define BUFSIZE (256 + KSYM_NAME_LEN)
110109

111110
int main(int argc, char **argv)
112111
{

arch/x86/um/asm/checksum.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
*/
2121
extern __wsum csum_partial(const void *buff, int len, __wsum sum);
2222

23+
/* Do not call this directly. Declared for export type visibility. */
24+
extern __visible __wsum csum_partial_copy_generic(const void *src, void *dst, int len);
25+
2326
/**
2427
* csum_fold - Fold and invert a 32bit checksum.
2528
* sum: 32bit unfolded sum

drivers/cxl/core/region.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,6 +1653,13 @@ static int find_pos_and_ways(struct cxl_port *port, struct range *range,
16531653
}
16541654
put_device(dev);
16551655

1656+
if (rc)
1657+
dev_err(port->uport_dev,
1658+
"failed to find %s:%s in target list of %s\n",
1659+
dev_name(&port->dev),
1660+
dev_name(port->parent_dport->dport_dev),
1661+
dev_name(&cxlsd->cxld.dev));
1662+
16561663
return rc;
16571664
}
16581665

0 commit comments

Comments
 (0)