Skip to content

Commit bd3a8b4

Browse files
committed
Merge tag 'v5.10.71' into rpi-5.10.y
This is the 5.10.71 stable release
2 parents 8e499db + 5cd40b1 commit bd3a8b4

246 files changed

Lines changed: 2060 additions & 1141 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.

‎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 = 5
33
PATCHLEVEL = 10
4-
SUBLEVEL = 69
4+
SUBLEVEL = 71
55
EXTRAVERSION =
66
NAME = Dare mighty things
77

‎arch/alpha/include/asm/io.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ extern inline void set_hae(unsigned long new_hae)
6060
* Change virtual addresses to physical addresses and vv.
6161
*/
6262
#ifdef USE_48_BIT_KSEG
63-
static inline unsigned long virt_to_phys(void *address)
63+
static inline unsigned long virt_to_phys(volatile void *address)
6464
{
6565
return (unsigned long)address - IDENT_ADDR;
6666
}
@@ -70,7 +70,7 @@ static inline void * phys_to_virt(unsigned long address)
7070
return (void *) (address + IDENT_ADDR);
7171
}
7272
#else
73-
static inline unsigned long virt_to_phys(void *address)
73+
static inline unsigned long virt_to_phys(volatile void *address)
7474
{
7575
unsigned long phys = (unsigned long)address;
7676

@@ -106,7 +106,7 @@ static inline void * phys_to_virt(unsigned long address)
106106
extern unsigned long __direct_map_base;
107107
extern unsigned long __direct_map_size;
108108

109-
static inline unsigned long __deprecated virt_to_bus(void *address)
109+
static inline unsigned long __deprecated virt_to_bus(volatile void *address)
110110
{
111111
unsigned long phys = virt_to_phys(address);
112112
unsigned long bus = phys + __direct_map_base;

‎arch/arm64/kernel/process.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
#if defined(CONFIG_STACKPROTECTOR) && !defined(CONFIG_STACKPROTECTOR_PER_TASK)
6262
#include <linux/stackprotector.h>
63-
unsigned long __stack_chk_guard __read_mostly;
63+
unsigned long __stack_chk_guard __ro_after_init;
6464
EXPORT_SYMBOL(__stack_chk_guard);
6565
#endif
6666

‎arch/arm64/kvm/vgic/vgic-its.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2190,8 +2190,8 @@ static int vgic_its_restore_ite(struct vgic_its *its, u32 event_id,
21902190
return offset;
21912191
}
21922192

2193-
static int vgic_its_ite_cmp(void *priv, struct list_head *a,
2194-
struct list_head *b)
2193+
static int vgic_its_ite_cmp(void *priv, const struct list_head *a,
2194+
const struct list_head *b)
21952195
{
21962196
struct its_ite *itea = container_of(a, struct its_ite, ite_list);
21972197
struct its_ite *iteb = container_of(b, struct its_ite, ite_list);
@@ -2329,8 +2329,8 @@ static int vgic_its_restore_dte(struct vgic_its *its, u32 id,
23292329
return offset;
23302330
}
23312331

2332-
static int vgic_its_device_cmp(void *priv, struct list_head *a,
2333-
struct list_head *b)
2332+
static int vgic_its_device_cmp(void *priv, const struct list_head *a,
2333+
const struct list_head *b)
23342334
{
23352335
struct its_device *deva = container_of(a, struct its_device, dev_list);
23362336
struct its_device *devb = container_of(b, struct its_device, dev_list);

‎arch/arm64/kvm/vgic/vgic.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ static struct kvm_vcpu *vgic_target_oracle(struct vgic_irq *irq)
255255
* Return negative if "a" sorts before "b", 0 to preserve order, and positive
256256
* to sort "b" before "a".
257257
*/
258-
static int vgic_irq_cmp(void *priv, struct list_head *a, struct list_head *b)
258+
static int vgic_irq_cmp(void *priv, const struct list_head *a,
259+
const struct list_head *b)
259260
{
260261
struct vgic_irq *irqa = container_of(a, struct vgic_irq, ap_list);
261262
struct vgic_irq *irqb = container_of(b, struct vgic_irq, ap_list);

‎arch/m68k/include/asm/raw_io.h‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@
1717
* two accesses to memory, which may be undesirable for some devices.
1818
*/
1919
#define in_8(addr) \
20-
({ u8 __v = (*(__force volatile u8 *) (addr)); __v; })
20+
({ u8 __v = (*(__force volatile u8 *) (unsigned long)(addr)); __v; })
2121
#define in_be16(addr) \
22-
({ u16 __v = (*(__force volatile u16 *) (addr)); __v; })
22+
({ u16 __v = (*(__force volatile u16 *) (unsigned long)(addr)); __v; })
2323
#define in_be32(addr) \
24-
({ u32 __v = (*(__force volatile u32 *) (addr)); __v; })
24+
({ u32 __v = (*(__force volatile u32 *) (unsigned long)(addr)); __v; })
2525
#define in_le16(addr) \
26-
({ u16 __v = le16_to_cpu(*(__force volatile __le16 *) (addr)); __v; })
26+
({ u16 __v = le16_to_cpu(*(__force volatile __le16 *) (unsigned long)(addr)); __v; })
2727
#define in_le32(addr) \
28-
({ u32 __v = le32_to_cpu(*(__force volatile __le32 *) (addr)); __v; })
28+
({ u32 __v = le32_to_cpu(*(__force volatile __le32 *) (unsigned long)(addr)); __v; })
2929

30-
#define out_8(addr,b) (void)((*(__force volatile u8 *) (addr)) = (b))
31-
#define out_be16(addr,w) (void)((*(__force volatile u16 *) (addr)) = (w))
32-
#define out_be32(addr,l) (void)((*(__force volatile u32 *) (addr)) = (l))
33-
#define out_le16(addr,w) (void)((*(__force volatile __le16 *) (addr)) = cpu_to_le16(w))
34-
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
30+
#define out_8(addr,b) (void)((*(__force volatile u8 *) (unsigned long)(addr)) = (b))
31+
#define out_be16(addr,w) (void)((*(__force volatile u16 *) (unsigned long)(addr)) = (w))
32+
#define out_be32(addr,l) (void)((*(__force volatile u32 *) (unsigned long)(addr)) = (l))
33+
#define out_le16(addr,w) (void)((*(__force volatile __le16 *) (unsigned long)(addr)) = cpu_to_le16(w))
34+
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (unsigned long)(addr)) = cpu_to_le32(l))
3535

3636
#define raw_inb in_8
3737
#define raw_inw in_be16

‎arch/mips/net/bpf_jit.c‎

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,11 @@ static void build_epilogue(struct jit_ctx *ctx)
662662
((int)K < 0 ? ((int)K >= SKF_LL_OFF ? func##_negative : func) : \
663663
func##_positive)
664664

665+
static bool is_bad_offset(int b_off)
666+
{
667+
return b_off > 0x1ffff || b_off < -0x20000;
668+
}
669+
665670
static int build_body(struct jit_ctx *ctx)
666671
{
667672
const struct bpf_prog *prog = ctx->skf;
@@ -728,7 +733,10 @@ static int build_body(struct jit_ctx *ctx)
728733
/* Load return register on DS for failures */
729734
emit_reg_move(r_ret, r_zero, ctx);
730735
/* Return with error */
731-
emit_b(b_imm(prog->len, ctx), ctx);
736+
b_off = b_imm(prog->len, ctx);
737+
if (is_bad_offset(b_off))
738+
return -E2BIG;
739+
emit_b(b_off, ctx);
732740
emit_nop(ctx);
733741
break;
734742
case BPF_LD | BPF_W | BPF_IND:
@@ -775,8 +783,10 @@ static int build_body(struct jit_ctx *ctx)
775783
emit_jalr(MIPS_R_RA, r_s0, ctx);
776784
emit_reg_move(MIPS_R_A0, r_skb, ctx); /* delay slot */
777785
/* Check the error value */
778-
emit_bcond(MIPS_COND_NE, r_ret, 0,
779-
b_imm(prog->len, ctx), ctx);
786+
b_off = b_imm(prog->len, ctx);
787+
if (is_bad_offset(b_off))
788+
return -E2BIG;
789+
emit_bcond(MIPS_COND_NE, r_ret, 0, b_off, ctx);
780790
emit_reg_move(r_ret, r_zero, ctx);
781791
/* We are good */
782792
/* X <- P[1:K] & 0xf */
@@ -855,17 +865,21 @@ static int build_body(struct jit_ctx *ctx)
855865
/* A /= X */
856866
ctx->flags |= SEEN_X | SEEN_A;
857867
/* Check if r_X is zero */
858-
emit_bcond(MIPS_COND_EQ, r_X, r_zero,
859-
b_imm(prog->len, ctx), ctx);
868+
b_off = b_imm(prog->len, ctx);
869+
if (is_bad_offset(b_off))
870+
return -E2BIG;
871+
emit_bcond(MIPS_COND_EQ, r_X, r_zero, b_off, ctx);
860872
emit_load_imm(r_ret, 0, ctx); /* delay slot */
861873
emit_div(r_A, r_X, ctx);
862874
break;
863875
case BPF_ALU | BPF_MOD | BPF_X:
864876
/* A %= X */
865877
ctx->flags |= SEEN_X | SEEN_A;
866878
/* Check if r_X is zero */
867-
emit_bcond(MIPS_COND_EQ, r_X, r_zero,
868-
b_imm(prog->len, ctx), ctx);
879+
b_off = b_imm(prog->len, ctx);
880+
if (is_bad_offset(b_off))
881+
return -E2BIG;
882+
emit_bcond(MIPS_COND_EQ, r_X, r_zero, b_off, ctx);
869883
emit_load_imm(r_ret, 0, ctx); /* delay slot */
870884
emit_mod(r_A, r_X, ctx);
871885
break;
@@ -926,7 +940,10 @@ static int build_body(struct jit_ctx *ctx)
926940
break;
927941
case BPF_JMP | BPF_JA:
928942
/* pc += K */
929-
emit_b(b_imm(i + k + 1, ctx), ctx);
943+
b_off = b_imm(i + k + 1, ctx);
944+
if (is_bad_offset(b_off))
945+
return -E2BIG;
946+
emit_b(b_off, ctx);
930947
emit_nop(ctx);
931948
break;
932949
case BPF_JMP | BPF_JEQ | BPF_K:
@@ -1056,12 +1073,16 @@ static int build_body(struct jit_ctx *ctx)
10561073
break;
10571074
case BPF_RET | BPF_A:
10581075
ctx->flags |= SEEN_A;
1059-
if (i != prog->len - 1)
1076+
if (i != prog->len - 1) {
10601077
/*
10611078
* If this is not the last instruction
10621079
* then jump to the epilogue
10631080
*/
1064-
emit_b(b_imm(prog->len, ctx), ctx);
1081+
b_off = b_imm(prog->len, ctx);
1082+
if (is_bad_offset(b_off))
1083+
return -E2BIG;
1084+
emit_b(b_off, ctx);
1085+
}
10651086
emit_reg_move(r_ret, r_A, ctx); /* delay slot */
10661087
break;
10671088
case BPF_RET | BPF_K:
@@ -1075,7 +1096,10 @@ static int build_body(struct jit_ctx *ctx)
10751096
* If this is not the last instruction
10761097
* then jump to the epilogue
10771098
*/
1078-
emit_b(b_imm(prog->len, ctx), ctx);
1099+
b_off = b_imm(prog->len, ctx);
1100+
if (is_bad_offset(b_off))
1101+
return -E2BIG;
1102+
emit_b(b_off, ctx);
10791103
emit_nop(ctx);
10801104
}
10811105
break;
@@ -1133,8 +1157,10 @@ static int build_body(struct jit_ctx *ctx)
11331157
/* Load *dev pointer */
11341158
emit_load_ptr(r_s0, r_skb, off, ctx);
11351159
/* error (0) in the delay slot */
1136-
emit_bcond(MIPS_COND_EQ, r_s0, r_zero,
1137-
b_imm(prog->len, ctx), ctx);
1160+
b_off = b_imm(prog->len, ctx);
1161+
if (is_bad_offset(b_off))
1162+
return -E2BIG;
1163+
emit_bcond(MIPS_COND_EQ, r_s0, r_zero, b_off, ctx);
11381164
emit_reg_move(r_ret, r_zero, ctx);
11391165
if (code == (BPF_ANC | SKF_AD_IFINDEX)) {
11401166
BUILD_BUG_ON(sizeof_field(struct net_device, ifindex) != 4);
@@ -1244,7 +1270,10 @@ void bpf_jit_compile(struct bpf_prog *fp)
12441270

12451271
/* Generate the actual JIT code */
12461272
build_prologue(&ctx);
1247-
build_body(&ctx);
1273+
if (build_body(&ctx)) {
1274+
module_memfree(ctx.target);
1275+
goto out;
1276+
}
12481277
build_epilogue(&ctx);
12491278

12501279
/* Update the icache */

‎arch/parisc/include/asm/page.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ extern int npmem_ranges;
184184
#include <asm-generic/getorder.h>
185185
#include <asm/pdc.h>
186186

187-
#define PAGE0 ((struct zeropage *)__PAGE_OFFSET)
187+
#define PAGE0 ((struct zeropage *)absolute_pointer(__PAGE_OFFSET))
188188

189189
/* DEFINITION OF THE ZERO-PAGE (PAG0) */
190190
/* based on work by Jason Eckhardt (jason@equator.com) */

‎arch/sparc/kernel/ioport.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,9 @@ void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,
356356
void arch_dma_free(struct device *dev, size_t size, void *cpu_addr,
357357
dma_addr_t dma_addr, unsigned long attrs)
358358
{
359-
if (!sparc_dma_free_resource(cpu_addr, PAGE_ALIGN(size)))
359+
size = PAGE_ALIGN(size);
360+
361+
if (!sparc_dma_free_resource(cpu_addr, size))
360362
return;
361363

362364
dma_make_coherent(dma_addr, size);

‎arch/sparc/kernel/mdesc.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ struct mdesc_hdr {
3939
u32 node_sz; /* node block size */
4040
u32 name_sz; /* name block size */
4141
u32 data_sz; /* data block size */
42+
char data[];
4243
} __attribute__((aligned(16)));
4344

4445
struct mdesc_elem {
@@ -612,7 +613,7 @@ EXPORT_SYMBOL(mdesc_get_node_info);
612613

613614
static struct mdesc_elem *node_block(struct mdesc_hdr *mdesc)
614615
{
615-
return (struct mdesc_elem *) (mdesc + 1);
616+
return (struct mdesc_elem *) mdesc->data;
616617
}
617618

618619
static void *name_block(struct mdesc_hdr *mdesc)

0 commit comments

Comments
 (0)