Skip to content

Commit

Permalink
Merge tag 'ASB-2022-09-05_4.14-stable' of https://android.googlesourc…
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthakroy2002 committed Sep 7, 2023
2 parents 9104b2d + 237f24e commit 5cab869
Show file tree
Hide file tree
Showing 254 changed files with 1,730 additions and 856 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 14
SUBLEVEL = 289
SUBLEVEL = 291
EXTRAVERSION =
NAME = Petit Gorille

Expand Down Expand Up @@ -450,6 +450,7 @@ KBUILD_CFLAGS_KERNEL :=
KBUILD_AFLAGS_MODULE := -DMODULE
KBUILD_CFLAGS_MODULE := -DMODULE
KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
LDFLAGS :=
GCC_PLUGINS_CFLAGS :=
CLANG_FLAGS :=
TARGET_BUILD_VARIANT := user
Expand Down Expand Up @@ -1104,6 +1105,9 @@ ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
LDFLAGS_vmlinux += $(call ld-option, --gc-sections,)
endif

LDFLAGS += -z noexecstack
LDFLAGS += $(call ld-option,--no-warn-rwx-segments)

ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
LDFLAGS_vmlinux += $(call ld-option, -X,)
endif
Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/srmcons.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ srmcons_do_receive_chars(struct tty_port *port)
} while((result.bits.status & 1) && (++loops < 10));

if (count)
tty_schedule_flip(port);
tty_flip_buffer_push(port);

return count;
}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/aspeed-ast2500-evb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/ {
model = "AST2500 EVB";
compatible = "aspeed,ast2500";
compatible = "aspeed,ast2500-evb", "aspeed,ast2500";

aliases {
serial4 = &uart5;
Expand Down
5 changes: 4 additions & 1 deletion arch/arm/boot/dts/imx6ul.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@
ocram: sram@00900000 {
compatible = "mmio-sram";
reg = <0x00900000 0x20000>;
ranges = <0 0x00900000 0x20000>;
#address-cells = <1>;
#size-cells = <1>;
};

dma_apbh: dma-apbh@01804000 {
Expand Down Expand Up @@ -880,7 +883,7 @@
qspi: qspi@021e0000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx6ul-qspi", "fsl,imx6sx-qspi";
compatible = "fsl,imx6ul-qspi";
reg = <0x021e0000 0x4000>, <0x60000000 0x10000000>;
reg-names = "QuadSPI", "QuadSPI-memory";
interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/qcom-pm8841.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
compatible = "qcom,spmi-temp-alarm";
reg = <0x2400>;
interrupts = <4 0x24 0 IRQ_TYPE_EDGE_RISING>;
#thermal-sensor-cells = <0>;
};
};

Expand Down
16 changes: 8 additions & 8 deletions arch/arm/lib/findbit.S
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ ENDPROC(_find_first_zero_bit_le)
* Prototype: int find_next_zero_bit(void *addr, unsigned int maxbit, int offset)
*/
ENTRY(_find_next_zero_bit_le)
teq r1, #0
beq 3b
cmp r2, r1
bhs 3b
ands ip, r2, #7
beq 1b @ If new byte, goto old routine
ARM( ldrb r3, [r0, r2, lsr #3] )
Expand Down Expand Up @@ -84,8 +84,8 @@ ENDPROC(_find_first_bit_le)
* Prototype: int find_next_zero_bit(void *addr, unsigned int maxbit, int offset)
*/
ENTRY(_find_next_bit_le)
teq r1, #0
beq 3b
cmp r2, r1
bhs 3b
ands ip, r2, #7
beq 1b @ If new byte, goto old routine
ARM( ldrb r3, [r0, r2, lsr #3] )
Expand Down Expand Up @@ -118,8 +118,8 @@ ENTRY(_find_first_zero_bit_be)
ENDPROC(_find_first_zero_bit_be)

ENTRY(_find_next_zero_bit_be)
teq r1, #0
beq 3b
cmp r2, r1
bhs 3b
ands ip, r2, #7
beq 1b @ If new byte, goto old routine
eor r3, r2, #0x18 @ big endian byte ordering
Expand Down Expand Up @@ -152,8 +152,8 @@ ENTRY(_find_first_bit_be)
ENDPROC(_find_first_bit_be)

ENTRY(_find_next_bit_be)
teq r1, #0
beq 3b
cmp r2, r1
bhs 3b
ands ip, r2, #7
beq 1b @ If new byte, goto old routine
eor r3, r2, #0x18 @ big endian byte ordering
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/lib/xor-neon.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ MODULE_LICENSE("GPL");
* While older versions of GCC do not generate incorrect code, they fail to
* recognize the parallel nature of these functions, and emit plain ARM code,
* which is known to be slower than the optimized ARM code in asm-arm/xor.h.
*
* #warning This code requires at least version 4.6 of GCC
*/
#warning This code requires at least version 4.6 of GCC
#endif

#pragma GCC diagnostic ignored "-Wunused-variable"
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-bcm/bcm_kona_smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ int __init bcm_kona_smc_init(void)
return -ENODEV;

prop_val = of_get_address(node, 0, &prop_size, NULL);
of_node_put(node);
if (!prop_val)
return -EINVAL;

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap2/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ static int __init omapdss_init_fbdev(void)
node = of_find_node_by_name(NULL, "omap4_padconf_global");
if (node)
omap4_dsi_mux_syscon = syscon_node_to_regmap(node);
of_node_put(node);

return 0;
}
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-zynq/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ static int __init zynq_get_revision(void)
}

zynq_devcfg_base = of_iomap(np, 0);
of_node_put(np);
if (!zynq_devcfg_base) {
pr_err("%s: Unable to map I/O memory\n", __func__);
return -1;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/boot/dts/qcom/msm8916.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -980,8 +980,8 @@
vddmx-supply = <&pm8916_l3>;
vddpx-supply = <&pm8916_l7>;

qcom,state = <&wcnss_smp2p_out 0>;
qcom,state-names = "stop";
qcom,smem-states = <&wcnss_smp2p_out 0>;
qcom,smem-state-names = "stop";

pinctrl-names = "default";
pinctrl-0 = <&wcnss_pin_a>;
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ void tls_preserve_current_state(void);

static inline void start_thread_common(struct pt_regs *regs, unsigned long pc)
{
s32 previous_syscall = regs->syscallno;
memset(regs, 0, sizeof(*regs));
forget_syscall(regs);
regs->syscallno = previous_syscall;
regs->pc = pc;
}

Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ ia64_get_irr(unsigned int vector)
{
unsigned int reg = vector / 64;
unsigned int bit = vector % 64;
u64 irr;
unsigned long irr;

switch (reg) {
case 0: irr = ia64_getreg(_IA64_REG_CR_IRR0); break;
Expand Down
3 changes: 2 additions & 1 deletion arch/mips/cavium-octeon/octeon-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@ static void octeon2_usb_clocks_start(struct device *dev)
"refclk-frequency", &clock_rate);
if (i) {
dev_err(dev, "No UCTL \"refclk-frequency\"\n");
of_node_put(uctl_node);
goto exit;
}
i = of_property_read_string(uctl_node,
"refclk-type", &clock_type);

of_node_put(uctl_node);
if (!i && strcmp("crystal", clock_type) == 0)
is_crystal_clock = true;
}
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static void *c_start(struct seq_file *m, loff_t *pos)
{
unsigned long i = *pos;

return i < NR_CPUS ? (void *) (i + 1) : NULL;
return i < nr_cpu_ids ? (void *) (i + 1) : NULL;
}

static void *c_next(struct seq_file *m, void *v, loff_t *pos)
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/mm/tlbex.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ static __maybe_unused void build_convert_pte_to_entrylo(u32 **p,
return;
}

if (cpu_has_rixi && !!_PAGE_NO_EXEC) {
if (cpu_has_rixi && _PAGE_NO_EXEC != 0) {
if (fill_includes_sw_bits) {
UASM_i_ROTR(p, reg, reg, ilog2(_PAGE_GLOBAL));
} else {
Expand Down Expand Up @@ -2577,7 +2577,7 @@ static void check_pabits(void)
unsigned long entry;
unsigned pabits, fillbits;

if (!cpu_has_rixi || !_PAGE_NO_EXEC) {
if (!cpu_has_rixi || _PAGE_NO_EXEC == 0) {
/*
* We'll only be making use of the fact that we can rotate bits
* into the fill if the CPU supports RIXI, so don't bother
Expand Down
3 changes: 2 additions & 1 deletion arch/nios2/include/asm/entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
stw r13, PT_R13(sp)
stw r14, PT_R14(sp)
stw r15, PT_R15(sp)
stw r2, PT_ORIG_R2(sp)
movi r24, -1
stw r24, PT_ORIG_R2(sp)
stw r7, PT_ORIG_R7(sp)

stw ra, PT_RA(sp)
Expand Down
2 changes: 2 additions & 0 deletions arch/nios2/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ extern void show_regs(struct pt_regs *);
((struct pt_regs *)((unsigned long)current_thread_info() + THREAD_SIZE)\
- 1)

#define force_successful_syscall_return() (current_pt_regs()->orig_r2 = -1)

int do_syscall_trace_enter(void);
void do_syscall_trace_exit(void);
#endif /* __ASSEMBLY__ */
Expand Down
22 changes: 15 additions & 7 deletions arch/nios2/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ ENTRY(handle_system_call)
ldw r5, PT_R5(sp)

local_restart:
stw r2, PT_ORIG_R2(sp)
/* Check that the requested system call is within limits */
movui r1, __NR_syscalls
bgeu r2, r1, ret_invsyscall
slli r1, r2, 2
movhi r11, %hiadj(sys_call_table)
add r1, r1, r11
ldw r1, %lo(sys_call_table)(r1)
beq r1, r0, ret_invsyscall

/* Check if we are being traced */
GET_THREAD_INFO r11
Expand All @@ -213,6 +213,9 @@ local_restart:
translate_rc_and_ret:
movi r1, 0
bge r2, zero, 3f
ldw r1, PT_ORIG_R2(sp)
addi r1, r1, 1
beq r1, zero, 3f
sub r2, zero, r2
movi r1, 1
3:
Expand Down Expand Up @@ -255,9 +258,9 @@ traced_system_call:
ldw r6, PT_R6(sp)
ldw r7, PT_R7(sp)

/* Fetch the syscall function, we don't need to check the boundaries
* since this is already done.
*/
/* Fetch the syscall function. */
movui r1, __NR_syscalls
bgeu r2, r1, traced_invsyscall
slli r1, r2, 2
movhi r11,%hiadj(sys_call_table)
add r1, r1, r11
Expand All @@ -276,6 +279,9 @@ traced_system_call:
translate_rc_and_ret2:
movi r1, 0
bge r2, zero, 4f
ldw r1, PT_ORIG_R2(sp)
addi r1, r1, 1
beq r1, zero, 4f
sub r2, zero, r2
movi r1, 1
4:
Expand All @@ -287,6 +293,11 @@ end_translate_rc_and_ret2:
RESTORE_SWITCH_STACK
br ret_from_exception

/* If the syscall number was invalid return ENOSYS */
traced_invsyscall:
movi r2, -ENOSYS
br translate_rc_and_ret2

Luser_return:
GET_THREAD_INFO r11 /* get thread_info pointer */
ldw r10, TI_FLAGS(r11) /* get thread_info->flags */
Expand Down Expand Up @@ -336,9 +347,6 @@ external_interrupt:
/* skip if no interrupt is pending */
beq r12, r0, ret_from_interrupt

movi r24, -1
stw r24, PT_ORIG_R2(sp)

/*
* Process an external hardware interrupt.
*/
Expand Down
3 changes: 2 additions & 1 deletion arch/nios2/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ static int do_signal(struct pt_regs *regs)
/*
* If we were from a system call, check for system call restarting...
*/
if (regs->orig_r2 >= 0) {
if (regs->orig_r2 >= 0 && regs->r1) {
continue_addr = regs->ea;
restart_addr = continue_addr - 4;
retval = regs->r2;
Expand All @@ -261,6 +261,7 @@ static int do_signal(struct pt_regs *regs)
regs->ea = restart_addr;
break;
}
regs->orig_r2 = -1;
}

if (get_signal(&ksig)) {
Expand Down
1 change: 1 addition & 0 deletions arch/nios2/kernel/syscall_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
#define __SYSCALL(nr, call) [nr] = (call),

void *sys_call_table[__NR_syscalls] = {
[0 ... __NR_syscalls-1] = sys_ni_syscall,
#include <asm/unistd.h>
};
9 changes: 4 additions & 5 deletions arch/parisc/kernel/drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,6 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
dev->id.hversion_rev = iodc_data[1] & 0x0f;
dev->id.sversion = ((iodc_data[4] & 0x0f) << 16) |
(iodc_data[5] << 8) | iodc_data[6];
dev->hpa.name = parisc_pathname(dev);
dev->hpa.start = hpa;
/* This is awkward. The STI spec says that gfx devices may occupy
* 32MB or 64MB. Unfortunately, we don't know how to tell whether
Expand All @@ -519,10 +518,10 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
dev->hpa.end = hpa + 0xfff;
}
dev->hpa.flags = IORESOURCE_MEM;
name = parisc_hardware_description(&dev->id);
if (name) {
strlcpy(dev->name, name, sizeof(dev->name));
}
dev->hpa.name = dev->name;
name = parisc_hardware_description(&dev->id) ? : "unknown";
snprintf(dev->name, sizeof(dev->name), "%s [%s]",
name, parisc_pathname(dev));

/* Silently fail things like mouse ports which are subsumed within
* the keyboard controller
Expand Down
Loading

0 comments on commit 5cab869

Please sign in to comment.