5.10.145-rc1 review
Subsystems (2)
Greg Kroah-Hartman
maintainercover 5.10.145-rc1 review
This is the start of the stable review cycle for the 5.10.145 release. There are 39 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 23 Sep 2022 15:36:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.145-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.10.145-rc1
Takashi Iwai <[email protected]>
ALSA: hda/sigmatel: Fix unused variable warning for beep power change
Tetsuo Handa <[email protected]>
cgroup: Add missing cpus_read_lock() to cgroup_attach_task_all()
Hyunwoo Kim <[email protected]>
video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write
Youling Tang <[email protected]>
mksysmap: Fix the mismatch of 'L0' symbols in System.map
Alexander Sverdlin <[email protected]>
MIPS: OCTEON: irq: Fix octeon_irq_force_ciu_mapping()
David Howells <[email protected]>
afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked
jerry.meng <[email protected]>
net: usb: qmi_wwan: add Quectel RM520N
Mohan Kumar <[email protected]>
ALSA: hda/tegra: Align BDL entry to 4KB boundary
Takashi Iwai <[email protected]>
ALSA: hda/sigmatel: Keep power up while beep is enabled
Soenke Huster <[email protected]>
wifi: mac80211_hwsim: check length for virtio packets
David Howells <[email protected]>
rxrpc: Fix calc of resend age
David Howells <[email protected]>
rxrpc: Fix local destruction being repeated
Xiaolei Wang <[email protected]>
regulator: pfuze100: Fix the global-out-of-bounds access in pfuze100_regulator_probe()
Takashi Iwai <[email protected]>
ASoC: nau8824: Fix semaphore unbalance at error paths
Johan Hovold <[email protected]>
Revert "serial: 8250: Fix reporting real baudrate value in c_ospeed field"
Zheyu Ma <[email protected]>
video: fbdev: i740fb: Error out if 'pixclock' equals zero
Ben Hutchings <[email protected]>
tools/include/uapi: Fix <asm/errno.h> for parisc and xtensa
Stefan Metzmacher <[email protected]>
cifs: don't send down the destination address to sendmsg for a SOCK_STREAM
Ronnie Sahlberg <[email protected]>
cifs: revalidate mapping when doing direct writes
Thierry Reding <[email protected]>
of/device: Fix up of_dma_configure_id() stub
Yipeng Zou <[email protected]>
tracing: hold caller_addr to hardirq_{enable,disable}_ip
Yang Yingliang <[email protected]>
parisc: ccio-dma: Add missing iounmap in error path in ccio_probe()
Stuart Menefy <[email protected]>
drm/meson: Fix OSD1 RGB to YCbCr coefficient
Stuart Menefy <[email protected]>
drm/meson: Correct OSD1 global alpha value
Pali Rohár <[email protected]>
gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx
Trond Myklebust <[email protected]>
NFSv4: Turn off open-by-filehandle and NFS re-export for NFSv4.0
Michael Wu <[email protected]>
pinctrl: sunxi: Fix name for A100 R_PIO
Sergey Shtylyov <[email protected]>
of: fdt: fix off-by-one error in unflatten_dt_nodes()
Russell King (Oracle) <[email protected]>
net: dsa: mv88e6xxx: allow use of PHYs on CPU and DSA ports
Alex Hung <[email protected]>
platform/x86/intel: hid: add quirk to support Surface Go 3
Frank Li <[email protected]>
usb: cdns3: gadget: fix new urb never complete if ep cancel previous requests
Nathan Lynch <[email protected]>
powerpc/pseries/mobility: ignore ibm, platform-facilities updates
Nathan Lynch <[email protected]>
powerpc/pseries/mobility: refactor node lookup during DT update
Anatolij Gustschin <[email protected]>
dmaengine: bestcomm: fix system boot lockups
John David Anglin <[email protected]>
parisc: Flush kernel data mapping in set_pte_at() when installing pte for user page
Helge Deller <[email protected]>
parisc: Optimize per-pagetable spinlocks
Pali Rohár <[email protected]>
serial: 8250: Fix reporting real baudrate value in c_ospeed field
Laurent Vivier <[email protected]>
KVM: PPC: Tick accounting should defer vtime accounting 'til after IRQ handling
Nicholas Piggin <[email protected]>
KVM: PPC: Book3S HV: Context tracking exit guest context before enabling irqs
-------------
Diffstat:
Makefile | 4 +- arch/mips/cavium-octeon/octeon-irq.c | 10 +++ arch/parisc/Kconfig | 10 +++ arch/parisc/include/asm/mmu_context.h | 7 ++ arch/parisc/include/asm/page.h | 2 +- arch/parisc/include/asm/pgalloc.h | 76 ++++------------- arch/parisc/include/asm/pgtable.h | 97 ++++++--------------- arch/parisc/kernel/asm-offsets.c | 1 - arch/parisc/kernel/cache.c | 4 +- arch/parisc/kernel/entry.S | 116 +++++++++++--------------- arch/parisc/mm/hugetlbpage.c | 13 --- arch/parisc/mm/init.c | 10 +-- arch/powerpc/kvm/book3s_hv.c | 32 ++++++- arch/powerpc/kvm/booke.c | 16 +++- arch/powerpc/platforms/pseries/mobility.c | 77 ++++++++++------- drivers/dma/bestcomm/ata.c | 2 +- drivers/dma/bestcomm/bestcomm.c | 22 ++--- drivers/dma/bestcomm/fec.c | 4 +- drivers/dma/bestcomm/gen_bd.c | 4 +- drivers/gpio/gpio-mpc8xxx.c | 1 + drivers/gpu/drm/meson/meson_plane.c | 2 +- drivers/gpu/drm/meson/meson_viu.c | 2 +- drivers/net/dsa/mv88e6xxx/chip.c | 64 +++++++------- drivers/net/usb/qmi_wwan.c | 1 + drivers/net/wireless/mac80211_hwsim.c | 7 +- drivers/of/fdt.c | 2 +- drivers/parisc/ccio-dma.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c | 2 +- drivers/platform/x86/intel-hid.c | 7 ++ drivers/regulator/pfuze100-regulator.c | 2 +- drivers/usb/cdns3/gadget.c | 20 +---- drivers/video/fbdev/i740fb.c | 3 + drivers/video/fbdev/pxa3xx-gcu.c | 2 +- fs/afs/misc.c | 1 + fs/cifs/file.c | 3 + fs/cifs/transport.c | 4 +- fs/nfs/super.c | 27 ++++-- include/linux/of_device.h | 5 +- kernel/cgroup/cgroup-v1.c | 2 + kernel/trace/trace_preemptirq.c | 6 +- net/rxrpc/call_event.c | 2 +- net/rxrpc/local_object.c | 3 + scripts/mksysmap | 2 +- sound/pci/hda/hda_tegra.c | 3 +- sound/pci/hda/patch_sigmatel.c | 24 ++++++ sound/soc/codecs/nau8824.c | 17 ++-- tools/include/uapi/asm/errno.h | 4 +- 47 files changed, 378 insertions(+), 348 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/39 KVM: PPC: Book3S HV: Context tracking exit guest context before enabling irqs
From: Nicholas Piggin <[email protected]>
[ Upstream commit 112665286d08c87e66d699e7cba43c1497ad165f ]
Interrupts that occur in kernel mode expect that context tracking is set to kernel. Enabling local irqs before context tracking switches from guest to host means interrupts can come in and trigger warnings about wrong context, and possibly worse.
Stable-dep-of: 235cee162459 ("KVM: PPC: Tick accounting should defer vtime accounting 'til after IRQ handling")
--- arch/powerpc/kvm/book3s_hv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/powerpc/kvm/book3s_hv.c +4 -2
@@ -3399,8 +3399,9 @@ static noinline void kvmppc_run_core(struct kvmppc_vcore *vc)kvmppc_set_host_core (pcpu); +guest_exit_irqoff (); +local_irq_enable (); -guest_exit ();/* Let secondaries go back to the offline loop */ for (i =0 ; i < controlled_threads; ++i) {
@@ -4235,8 +4236,9 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit,kvmppc_set_host_core (pcpu); +guest_exit_irqoff (); +local_irq_enable (); -guest_exit ();cpumask_clear_cpu (pcpu, &kvm->arch.cpu_in_guest);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 2/39 KVM: PPC: Tick accounting should defer vtime accounting til after IRQ handling
In reply to Greg Kroah-HartmanFrom: Laurent Vivier <[email protected]>
[ Upstream commit 235cee162459d96153d63651ce7ff51752528c96 ]
Commit 112665286d08 ("KVM: PPC: Book3S HV: Context tracking exit guest context before enabling irqs") moved guest_exit() into the interrupt protected area to avoid wrong context warning (or worse). The problem is that tick-based time accounting has not yet been updated at this point (because it depends on the timer interrupt firing), so the guest time gets incorrectly accounted to system time.
To fix the problem, follow the x86 fix in commit 160457140187 ("Defer vtime accounting 'til after IRQ handling"), and allow host IRQs to run before accounting the guest exit time.
In the case vtime accounting is enabled, this is not required because TB is used directly for accounting.
Before this patch, with CONFIG_TICK_CPU_ACCOUNTING=y in the host and a guest running a kernel compile, the 'guest' fields of /proc/stat are stuck at zero. With the patch they can be observed increasing roughly as expected.
--- arch/powerpc/kvm/book3s_hv.c | 30 ++++++++++++++++++++++++++++-- arch/powerpc/kvm/booke.c | 16 +++++++++++++++- 2 files changed, 43 insertions(+), 3 deletions(-)
arch/powerpc/kvm/book3s_hv.c +28 -2
@@ -3399,7 +3399,20 @@ static noinline void kvmppc_run_core(struct kvmppc_vcore *vc)kvmppc_set_host_core (pcpu); -guest_exit_irqoff (); +context_tracking_guest_exit (); +if (!vtime_accounting_enabled_this_cpu ()) { +local_irq_enable (); +/* +* Service IRQs here before vtime_account_guest_exit() so any +* ticks that occurred while running the guest are accounted to +* the guest. If vtime accounting is enabled, accounting uses +* TB rather than ticks, so it can be done without enabling +* interrupts here, which has the problem that it accounts +* interrupt processing overhead to the host. +*/ +local_irq_disable (); + } +vtime_account_guest_exit ();local_irq_enable ();
@@ -4236,7 +4249,20 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit,kvmppc_set_host_core (pcpu); -guest_exit_irqoff (); +context_tracking_guest_exit (); +if (!vtime_accounting_enabled_this_cpu ()) { +local_irq_enable (); +/* +* Service IRQs here before vtime_account_guest_exit() so any +* ticks that occurred while running the guest are accounted to +* the guest. If vtime accounting is enabled, accounting uses +* TB rather than ticks, so it can be done without enabling +* interrupts here, which has the problem that it accounts +* interrupt processing overhead to the host. +*/ +local_irq_disable (); + } +vtime_account_guest_exit ();local_irq_enable ();
arch/powerpc/kvm/booke.c +15 -1
@@ -1016,7 +1016,21 @@ int kvmppc_handle_exit(struct kvm_vcpu *vcpu, unsigned int exit_nr) }trace_kvm_exit (exit_nr, vcpu); -guest_exit_irqoff (); + +context_tracking_guest_exit (); +if (!vtime_accounting_enabled_this_cpu ()) { +local_irq_enable (); +/* +* Service IRQs here before vtime_account_guest_exit() so any +* ticks that occurred while running the guest are accounted to +* the guest. If vtime accounting is enabled, accounting uses +* TB rather than ticks, so it can be done without enabling +* interrupts here, which has the problem that it accounts +* interrupt processing overhead to the host. +*/ +local_irq_disable (); + } +vtime_account_guest_exit ();local_irq_enable ();
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 3/39 serial: 8250: Fix reporting real baudrate value in c_ospeed field
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit 32262e2e429cdb31f9e957e997d53458762931b7 ]
In most cases it is not possible to set exact baudrate value to hardware.
So fix reporting real baudrate value which was set to hardware via c_ospeed termios field. It can be retrieved by ioctl(TCGETS2) from userspace.
Real baudrate value is calculated from chosen hardware divisor and base clock. It is implemented in a new function serial8250_compute_baud_rate() which is inverse of serial8250_get_divisor() function.
With this change is fixed also UART timeout value (it is updated via uart_update_timeout() function), which is calculated from the now fixed baudrate value too.
--- drivers/tty/serial/8250/8250_port.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/tty/serial/8250/8250_port.c +17 -0
@@ -2547,6 +2547,19 @@ static unsigned int serial8250_get_divisor(struct uart_port *port,return serial8250_do_get_divisor (port, baud, frac); } +static unsigned int serial8250_compute_baud_rate (struct uart_port *port, +unsigned int quot) +{ +if ((port->flags &UPF_MAGIC_MULTIPLIER ) && quot ==0x8001 ) +return port->uartclk /4 ; +else if ((port->flags &UPF_MAGIC_MULTIPLIER ) && quot ==0x8002 ) +return port->uartclk /8 ; +else if (port->type ==PORT_NPCM ) +return DIV_ROUND_CLOSEST (port->uartclk -2 * (quot +2 ),16 * (quot +2 )); +else +return DIV_ROUND_CLOSEST (port->uartclk,16 * quot); +} +static unsigned char serial8250_compute_lcr (struct uart_8250_port *up,tcflag_t c_cflag) {
@@ -2688,11 +2701,14 @@ void serial8250_update_uartclk(struct uart_port *port, unsigned int uartclk) baud =serial8250_get_baud_rate (port, termios,NULL ); quot =serial8250_get_divisor (port, baud, &frac); + baud =serial8250_compute_baud_rate (port, quot);serial8250_rpm_get (up);spin_lock_irqsave (&port->lock, flags);uart_update_timeout (port, termios->c_cflag, baud); +if (tty_termios_baud_rate (termios)) +tty_termios_encode_baud_rate (termios, baud, baud);serial8250_set_divisor (port, baud, quot, frac);serial_port_out (port,UART_LCR , up->lcr);
@@ -2726,6 +2742,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, baud =serial8250_get_baud_rate (port, termios, old); quot =serial8250_get_divisor (port, baud, &frac); + baud =serial8250_compute_baud_rate (port, quot);/* * Ok, we're now changing the port state. Do it with
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 4/39 parisc: Optimize per-pagetable spinlocks
In reply to Greg Kroah-HartmanFrom: Helge Deller <[email protected]>
[ Upstream commit b7795074a04669d0a023babf786d29bf67c68783 ]
On parisc a spinlock is stored in the next page behind the pgd which protects against parallel accesses to the pgd. That's why one additional page (PGD_ALLOC_ORDER) is allocated for the pgd.
Matthew Wilcox suggested that we instead should use a pointer in the struct page table for this spinlock and noted, that the comments for the PGD_ORDER and PMD_ORDER defines were wrong.
Both suggestions are addressed with this patch. Instead of having an own spinlock to protect the pgd, we now switch to use the existing page_table_lock. Additionally, beside loading the pgd into cr25 in switch_mm_irqs_off(), the physical address of this lock is loaded into cr28 (tr4), so that we can avoid implementing a complicated lookup in assembly for this lock in the TLB fault handlers.
The existing Hybrid L2/L3 page table scheme (where the pmd is adjacent to the pgd) has been dropped with this patch.
Remove the locking in set_pte() and the huge-page pte functions too. They trigger a spinlock recursion on 32bit machines and seem unnecessary.
Stable-dep-of: 38860b2c8bb1 ("parisc: Flush kernel data mapping in set_pte_at() when installing pte for user page")
--- arch/parisc/Kconfig | 10 +++ arch/parisc/include/asm/mmu_context.h | 7 ++ arch/parisc/include/asm/page.h | 2 +- arch/parisc/include/asm/pgalloc.h | 76 ++++------------- arch/parisc/include/asm/pgtable.h | 89 ++++---------------- arch/parisc/kernel/asm-offsets.c | 1 - arch/parisc/kernel/entry.S | 116 +++++++++++--------------- arch/parisc/mm/hugetlbpage.c | 13 --- arch/parisc/mm/init.c | 10 +-- 9 files changed, 110 insertions(+), 214 deletions(-)
arch/parisc/Kconfig +10 -0
@@ -315,6 +315,16 @@ config IRQSTACKS for handling hard and soft interrupts. This can help avoid overflowing the process kernel stacks. +config TLB_PTLOCK + bool "Use page table locks in TLB fault handler" + depends on SMP + default n + help + Select this option to enable page table locking in the TLB + fault handler. This ensures that page table entries are + updated consistently on SMP machines at the expense of some + loss in performance. + config HOTPLUG_CPU bool default y if SMP
arch/parisc/include/asm/mmu_context.h +7 -0
@@ -5,6 +5,7 @@#include <linux/mm.h> #include <linux/sched.h> #include <linux/atomic.h> +#include <linux/spinlock.h> #include <asm-generic/mm_hooks.h> static inline void enter_lazy_tlb (struct mm_struct *mm,struct task_struct *tsk)
@@ -52,6 +53,12 @@ static inline void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) {if (prev != next) { +#ifdef CONFIG_TLB_PTLOCK +/* put physical address of page_table_lock in cr28 (tr4) +for TLB faults */ +spinlock_t *pgd_lock = &next->page_table_lock; +mtctl (__pa (__ldcw_align (&pgd_lock->rlock.raw_lock)),28 ); +#endif mtctl (__pa (next->pgd),25 );load_context (next->context); }
arch/parisc/include/asm/page.h +1 -1
@@ -112,7 +112,7 @@ extern int npmem_ranges;#else #define BITS_PER_PTE_ENTRY 2#define BITS_PER_PMD_ENTRY 2 -#define BITS_PER_PGD_ENTRY BITS_PER_PMD_ENTRY +#define BITS_PER_PGD_ENTRY 2#endif #define PGD_ENTRY_SIZE (1UL << BITS_PER_PGD_ENTRY)#define PMD_ENTRY_SIZE (1UL << BITS_PER_PMD_ENTRY)
arch/parisc/include/asm/pgalloc.h +18 -58
106 lines not on this page · raw message
arch/parisc/include/asm/pgtable.h +18 -71
170 lines not on this page · raw message
arch/parisc/kernel/asm-offsets.c +0 -1
@@ -268,7 +268,6 @@ int main(void)DEFINE (ASM_BITS_PER_PGD ,BITS_PER_PGD );DEFINE (ASM_BITS_PER_PMD ,BITS_PER_PMD );DEFINE (ASM_BITS_PER_PTE ,BITS_PER_PTE ); -DEFINE (ASM_PGD_PMD_OFFSET , -(PAGE_SIZE <<PGD_ORDER ));DEFINE (ASM_PMD_ENTRY , ((PAGE_OFFSET &PMD_MASK ) >>PMD_SHIFT ));DEFINE (ASM_PGD_ENTRY ,PAGE_OFFSET >>PGDIR_SHIFT );DEFINE (ASM_PGD_ENTRY_SIZE ,PGD_ENTRY_SIZE );
arch/parisc/kernel/entry.S +51 -65
342 lines not on this page · raw message
arch/parisc/mm/hugetlbpage.c +0 -13
@@ -142,24 +142,17 @@ static void __set_huge_pte_at(struct mm_struct *mm, unsigned long addr,void set_huge_pte_at (struct mm_struct *mm,unsigned long addr,pte_t *ptep,pte_t entry) { -unsigned long flags; - -spin_lock_irqsave (pgd_spinlock ((mm)->pgd), flags);__set_huge_pte_at (mm, addr, ptep, entry); -spin_unlock_irqrestore (pgd_spinlock ((mm)->pgd), flags); }pte_t huge_ptep_get_and_clear (struct mm_struct *mm,unsigned long addr,pte_t *ptep) { -unsigned long flags;pte_t entry; -spin_lock_irqsave (pgd_spinlock ((mm)->pgd), flags); entry = *ptep;__set_huge_pte_at (mm, addr, ptep,__pte (0 )); -spin_unlock_irqrestore (pgd_spinlock ((mm)->pgd), flags);return entry; }
@@ -168,29 +161,23 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,void huge_ptep_set_wrprotect (struct mm_struct *mm,unsigned long addr,pte_t *ptep) { -unsigned long flags;pte_t old_pte; -spin_lock_irqsave (pgd_spinlock ((mm)->pgd), flags); old_pte = *ptep;__set_huge_pte_at (mm, addr, ptep,pte_wrprotect (old_pte)); -spin_unlock_irqrestore (pgd_spinlock ((mm)->pgd), flags); }int huge_ptep_set_access_flags (struct vm_area_struct *vma,unsigned long addr,pte_t *ptep,pte_t pte,int dirty) { -unsigned long flags;int changed;struct mm_struct *mm = vma->vm_mm; -spin_lock_irqsave (pgd_spinlock ((mm)->pgd), flags); changed = !pte_same (*ptep, pte);if (changed) {__set_huge_pte_at (mm, addr, ptep, pte); } -spin_unlock_irqrestore (pgd_spinlock ((mm)->pgd), flags);return changed; }
arch/parisc/mm/init.c +5 -5
@@ -37,11 +37,6 @@ extern int data_start;extern void parisc_kernel_start (void );/* Kernel entry point in head.S */ #if CONFIG_PGTABLE_LEVELS ==3 -/* NOTE: This layout exactly conforms to the hybrid L2/L3 page table layout -* with the first pmd adjacent to the pgd and below it. gcc doesn't actually -* guarantee that global objects will be laid out in memory in the same order -* as the order of declaration, so put these in different sections and use -* the linker script to order them. */ pmd_t pmd0[PTRS_PER_PMD] __section(".data..vm0.pmd") __attribute__ ((aligned(PAGE_SIZE)));#endif
@@ -558,6 +553,11 @@ void __init mem_init(void)BUILD_BUG_ON (PGD_ENTRY_SIZE !=sizeof (pgd_t));BUILD_BUG_ON (PAGE_SHIFT +BITS_PER_PTE +BITS_PER_PMD +BITS_PER_PGD >BITS_PER_LONG ); +#if CONFIG_PGTABLE_LEVELS ==3 +BUILD_BUG_ON (PT_INITIAL >PTRS_PER_PMD ); +#else +BUILD_BUG_ON (PT_INITIAL >PTRS_PER_PGD ); +#endif high_memory =__va ((max_pfn <<PAGE_SHIFT ));set_max_mapnr (max_low_pfn);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 5/39 parisc: Flush kernel data mapping in set_pte_at() when installing pte for user page
In reply to Greg Kroah-HartmanFrom: John David Anglin <[email protected]>
[ Upstream commit 38860b2c8bb1b92f61396eb06a63adff916fc31d ]
For years, there have been random segmentation faults in userspace on SMP PA-RISC machines. It occurred to me that this might be a problem in set_pte_at(). MIPS and some other architectures do cache flushes when installing PTEs with the present bit set.
Here I have adapted the code in update_mmu_cache() to flush the kernel mapping when the kernel flush is deferred, or when the kernel mapping may alias with the user mapping. This simplifies calls to update_mmu_cache().
I also changed the barrier in set_pte() from a compiler barrier to a full memory barrier. I know this change is not sufficient to fix the problem. It might not be needed.
I have had a few days of operation with 5.14.16 to 5.15.1 and haven't seen any random segmentation faults on rp3440 or c8000 so far.
--- arch/parisc/include/asm/pgtable.h | 10 ++++++++-- arch/parisc/kernel/cache.c | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-)
arch/parisc/include/asm/pgtable.h +8 -2
@@ -76,6 +76,8 @@ static inline void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)purge_tlb_end (flags); } +extern void __update_cache (pte_t pte); +/* Certain architectures need to do special things when PTEs * within a page table are directly modified. Thus, the following * hook is made available.
@@ -83,11 +85,14 @@ static inline void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)#define set_pte (pteptr, pteval) \ do { \ *(pteptr) = (pteval); \ - barrier(); \ + mb(); \ } while(0)#define set_pte_at (mm, addr, pteptr, pteval) \ do { \ + if (pte_present(pteval) && \ + pte_user(pteval)) \ + __update_cache(pteval); \ *(pteptr) = (pteval); \ purge_tlb_entries(mm, addr); \ } while (0)
@@ -305,6 +310,7 @@ extern unsigned long *empty_zero_page;#define pte_none (x) (pte_val(x) == 0)#define pte_present (x) (pte_val(x) & _PAGE_PRESENT) +#define pte_user (x) (pte_val(x) & _PAGE_USER)#define pte_clear (mm, addr, xp) set_pte_at(mm, addr, xp, __pte(0))#define pmd_flag (x) (pmd_val(x) & PxD_FLAG_MASK)
@@ -412,7 +418,7 @@ extern void paging_init (void);#define PG_dcache_dirty PG_arch_1 -extern void update_mmu_cache (struct vm_area_struct *,unsigned long ,pte_t *); +#define update_mmu_cache (vms,addr,ptep) __update_cache(*ptep)/* Encode and de-code a swap entry */
arch/parisc/kernel/cache.c +2 -2
@@ -83,9 +83,9 @@ EXPORT_SYMBOL(flush_cache_all_local);#define pfn_va (pfn) __va(PFN_PHYS(pfn))void -update_mmu_cache (struct vm_area_struct *vma,unsigned long address,pte_t *ptep) +__update_cache (pte_t pte) { -unsigned long pfn =pte_pfn (*ptep); +unsigned long pfn =pte_pfn (pte);struct page *page;/* We don't have pte special. As a result, we can be called with
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 6/39 dmaengine: bestcomm: fix system boot lockups
In reply to Greg Kroah-HartmanFrom: Anatolij Gustschin <[email protected]>
[ Upstream commit adec566b05288f2787a1f88dbaf77ed8b0c644fa ]
memset() and memcpy() on an MMIO region like here results in a lockup at startup on mpc5200 platform (since this first happens during probing of the ATA and Ethernet drivers). Use memset_io() and memcpy_toio() instead.
--- drivers/dma/bestcomm/ata.c | 2 +- drivers/dma/bestcomm/bestcomm.c | 22 +++++++++++----------- drivers/dma/bestcomm/fec.c | 4 ++-- drivers/dma/bestcomm/gen_bd.c | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-)
drivers/dma/bestcomm/ata.c +1 -1
@@ -133,7 +133,7 @@ void bcom_ata_reset_bd(struct bcom_task *tsk)struct bcom_ata_var *var;/* Reset all BD */ -memset (tsk->bd,0x00 , tsk->num_bd * tsk->bd_size); +memset_io (tsk->bd,0x00 , tsk->num_bd * tsk->bd_size); tsk->index =0 ; tsk->outdex =0 ;
drivers/dma/bestcomm/bestcomm.c +11 -11
@@ -95,7 +95,7 @@ bcom_task_alloc(int bd_count, int bd_size, int priv_size) tsk->bd =bcom_sram_alloc (bd_count * bd_size,4 , &tsk->bd_pa);if (!tsk->bd) goto error; -memset (tsk->bd,0x00 , bd_count * bd_size); +memset_io (tsk->bd,0x00 , bd_count * bd_size); tsk->num_bd = bd_count; tsk->bd_size = bd_size;
@@ -186,16 +186,16 @@ bcom_load_image(int task, u32 *task_image) inc =bcom_task_inc (task);/* Clear & copy */ -memset (var,0x00 ,BCOM_VAR_SIZE ); -memset (inc,0x00 ,BCOM_INC_SIZE ); +memset_io (var,0x00 ,BCOM_VAR_SIZE ); +memset_io (inc,0x00 ,BCOM_INC_SIZE ); desc_src = (u32 *)(hdr +1 ); var_src = desc_src + hdr->desc_size; inc_src = var_src + hdr->var_size; -memcpy (desc, desc_src, hdr->desc_size *sizeof (u32)); -memcpy (var + hdr->first_var, var_src, hdr->var_size *sizeof (u32)); -memcpy (inc, inc_src, hdr->inc_size *sizeof (u32)); +memcpy_toio (desc, desc_src, hdr->desc_size *sizeof (u32)); +memcpy_toio (var + hdr->first_var, var_src, hdr->var_size *sizeof (u32)); +memcpy_toio (inc, inc_src, hdr->inc_size *sizeof (u32));return 0 ; }
@@ -302,13 +302,13 @@ static int bcom_engine_init(void)return -ENOMEM ; } -memset (bcom_eng->tdt,0x00 , tdt_size); -memset (bcom_eng->ctx,0x00 , ctx_size); -memset (bcom_eng->var,0x00 , var_size); -memset (bcom_eng->fdt,0x00 , fdt_size); +memset_io (bcom_eng->tdt,0x00 , tdt_size); +memset_io (bcom_eng->ctx,0x00 , ctx_size); +memset_io (bcom_eng->var,0x00 , var_size); +memset_io (bcom_eng->fdt,0x00 , fdt_size);/* Copy the FDT for the EU#3 */ -memcpy (&bcom_eng->fdt[48 ], fdt_ops,sizeof (fdt_ops)); +memcpy_toio (&bcom_eng->fdt[48 ], fdt_ops,sizeof (fdt_ops));/* Initialize Task base structure */ for (task=0 ; task<BCOM_MAX_TASKS ; task++)
drivers/dma/bestcomm/fec.c +2 -2
@@ -140,7 +140,7 @@ bcom_fec_rx_reset(struct bcom_task *tsk) tsk->index =0 ; tsk->outdex =0 ; -memset (tsk->bd,0x00 , tsk->num_bd * tsk->bd_size); +memset_io (tsk->bd,0x00 , tsk->num_bd * tsk->bd_size);/* Configure some stuff */ bcom_set_task_pragma (tsk->tasknum,BCOM_FEC_RX_BD_PRAGMA );
@@ -241,7 +241,7 @@ bcom_fec_tx_reset(struct bcom_task *tsk) tsk->index =0 ; tsk->outdex =0 ; -memset (tsk->bd,0x00 , tsk->num_bd * tsk->bd_size); +memset_io (tsk->bd,0x00 , tsk->num_bd * tsk->bd_size);/* Configure some stuff */ bcom_set_task_pragma (tsk->tasknum,BCOM_FEC_TX_BD_PRAGMA );
drivers/dma/bestcomm/gen_bd.c +2 -2
@@ -142,7 +142,7 @@ bcom_gen_bd_rx_reset(struct bcom_task *tsk) tsk->index =0 ; tsk->outdex =0 ; -memset (tsk->bd,0x00 , tsk->num_bd * tsk->bd_size); +memset_io (tsk->bd,0x00 , tsk->num_bd * tsk->bd_size);/* Configure some stuff */ bcom_set_task_pragma (tsk->tasknum,BCOM_GEN_RX_BD_PRAGMA );
@@ -226,7 +226,7 @@ bcom_gen_bd_tx_reset(struct bcom_task *tsk) tsk->index =0 ; tsk->outdex =0 ; -memset (tsk->bd,0x00 , tsk->num_bd * tsk->bd_size); +memset_io (tsk->bd,0x00 , tsk->num_bd * tsk->bd_size);/* Configure some stuff */ bcom_set_task_pragma (tsk->tasknum,BCOM_GEN_TX_BD_PRAGMA );
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 7/39 powerpc/pseries/mobility: refactor node lookup during DT update
In reply to Greg Kroah-HartmanFrom: Nathan Lynch <[email protected]>
[ Upstream commit 2efd7f6eb9b7107e469837d8452e750d7d080a5d ]
In pseries_devicetree_update(), with each call to ibm,update-nodes the partition firmware communicates the node to be deleted or updated by placing its phandle in the work buffer. Each of delete_dt_node(), update_dt_node(), and add_dt_node() have duplicate lookups using the phandle value and corresponding refcount management.
Move the lookup and of_node_put() into pseries_devicetree_update(), and emit a warning on any failed lookups.
Stable-dep-of: 319fa1a52e43 ("powerpc/pseries/mobility: ignore ibm, platform-facilities updates")
--- arch/powerpc/platforms/pseries/mobility.c | 49 ++++++++--------------- 1 file changed, 17 insertions(+), 32 deletions(-)
arch/powerpc/platforms/pseries/mobility.c +17 -32
@@ -59,18 +59,10 @@ static int mobility_rtas_call(int token, char *buf, s32 scope)return rc; } -static int delete_dt_node (__be32 phandle) +static int delete_dt_node (struct device_node *dn) { -struct device_node *dn; - - dn =of_find_node_by_phandle (be32_to_cpu (phandle)); -if (!dn) -return -ENOENT ; -pr_debug ("removing node %pOFfp\n" , dn); -dlpar_detach_node (dn); -of_node_put (dn);return 0 ; }
@@ -135,10 +127,9 @@ static int update_dt_property(struct device_node *dn, struct property **prop,return 0 ; } -static int update_dt_node (__be32 phandle,s32 scope) +static int update_dt_node (struct device_node *dn,s32 scope) {struct update_props_workarea *upwa; -struct device_node *dn;struct property *prop =NULL ;int i, rc, rtas_rc;char *prop_data;
@@ -155,14 +146,8 @@ static int update_dt_node(__be32 phandle, s32 scope)if (!rtas_buf)return -ENOMEM ; - dn =of_find_node_by_phandle (be32_to_cpu (phandle)); -if (!dn) { -kfree (rtas_buf); -return -ENOENT ; - } - upwa = (struct update_props_workarea *)&rtas_buf[0 ]; - upwa->phandle = phandle; + upwa->phandle =cpu_to_be32 (dn->phandle); do { rtas_rc = mobility_rtas_call(update_properties_token, rtas_buf,
@@ -221,26 +206,18 @@ static int update_dt_node(__be32 phandle, s32 scope)cond_resched (); }while (rtas_rc ==1 ); -of_node_put (dn);kfree (rtas_buf);return 0 ; } -static int add_dt_node (__be32 parent_phandle,__be32 drc_index) +static int add_dt_node (struct device_node *parent_dn,__be32 drc_index) {struct device_node *dn; -struct device_node *parent_dn;int rc; - parent_dn =of_find_node_by_phandle (be32_to_cpu (parent_phandle)); -if (!parent_dn) -return -ENOENT ; - dn =dlpar_configure_connector (drc_index, parent_dn); -if (!dn) { -of_node_put (parent_dn); +if (!dn)return -ENOENT ; - } rc =dlpar_attach_node (dn, parent_dn);if (rc)
@@ -248,7 +225,6 @@ static int add_dt_node(__be32 parent_phandle, __be32 drc_index)pr_debug ("added node %pOFfp\n" , dn); -of_node_put (parent_dn);return rc; }
@@ -281,22 +257,31 @@ int pseries_devicetree_update(s32 scope) data++;for (i =0 ; i < node_count; i++) { +struct device_node *np;__be32 phandle = *data++;__be32 drc_index; + np =of_find_node_by_phandle (be32_to_cpu (phandle)); +if (!np) { +pr_warn ("Failed lookup: phandle 0x%x for action 0x%x\n" , +be32_to_cpu (phandle), action); +continue ; + } +switch (action) {case DELETE_DT_NODE : -delete_dt_node (phandle); +delete_dt_node (np);break ;case UPDATE_DT_NODE : -update_dt_node (phandle, scope); +update_dt_node (np, scope);break ;case ADD_DT_NODE : drc_index = *data++; -add_dt_node (phandle, drc_index); +add_dt_node (np, drc_index);break ; } +of_node_put (np);cond_resched (); } }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 8/39 powerpc/pseries/mobility: ignore ibm, platform-facilities updates
In reply to Greg Kroah-HartmanFrom: Nathan Lynch <[email protected]>
[ Upstream commit 319fa1a52e438a6e028329187783a25ad498c4e6 ]
On VMs with NX encryption, compression, and/or RNG offload, these capabilities are described by nodes in the ibm,platform-facilities device tree hierarchy:
$ tree -d /sys/firmware/devicetree/base/ibm,platform-facilities/ /sys/firmware/devicetree/base/ibm,platform-facilities/ ├── ibm,compression-v1 ├── ibm,random-v1 └── ibm,sym-encryption-v1
3 directories
The acceleration functions that these nodes describe are not disrupted by live migration, not even temporarily.
But the post-migration ibm,update-nodes sequence firmware always sends "delete" messages for this hierarchy, followed by an "add" directive to reconstruct it via ibm,configure-connector (log with debugging statements enabled in mobility.c):
mobility: removing node /ibm,platform-facilities/ibm,random-v1:4294967285
mobility: removing node /ibm,platform-facilities/ibm,compression-v1:4294967284
mobility: removing node /ibm,platform-facilities/ibm,sym-encryption-v1:4294967283
mobility: removing node /ibm,platform-facilities:4294967286
...
mobility: added node /ibm,platform-facilities:4294967286
Note we receive a single "add" message for the entire hierarchy, and what we receive from the ibm,configure-connector sequence is the top-level platform-facilities node along with its three children. The debug message simply reports the parent node and not the whole subtree.
Also, significantly, the nodes added are almost completely equivalent to the ones removed; even phandles are unchanged. ibm,shared-interrupt-pool in the leaf nodes is the only property I've observed to differ, and Linux does not use that. So in practice, the sum of update messages Linux receives for this hierarchy is equivalent to minor property updates.
We succeed in removing the original hierarchy from the device tree. But the vio bus code is ignorant of this, and does not unbind or relinquish its references. The leaf nodes, still reachable through sysfs, of course still refer to the now-freed ibm,platform-facilities parent node, which makes use-after-free possible:
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 3 PID: 1706 at lib/refcount.c:25 refcount_warn_saturate+0x164/0x1f0 refcount_warn_saturate+0x160/0x1f0 (unreliable) kobject_get+0xf0/0x100 of_node_get+0x30/0x50 of_get_parent+0x50/0xb0 of_fwnode_get_parent+0x54/0x90 fwnode_count_parents+0x50/0x150 fwnode_full_name_string+0x30/0x110 device_node_string+0x49c/0x790 vsnprintf+0x1c0/0x4c0 sprintf+0x44/0x60 devspec_show+0x34/0x50 dev_attr_show+0x40/0xa0 sysfs_kf_seq_show+0xbc/0x200 kernfs_seq_show+0x44/0x60 seq_read_iter+0x2a4/0x740 kernfs_fop_read_iter+0x254/0x2e0 new_sync_read+0x120/0x190 vfs_read+0x1d0/0x240
Moreover, the "new" replacement subtree is not correctly added to the device tree, resulting in ibm,platform-facilities parent node without the appropriate leaf nodes, and broken symlinks in the sysfs device hierarchy:
$ tree -d /sys/firmware/devicetree/base/ibm,platform-facilities/ /sys/firmware/devicetree/base/ibm,platform-facilities/
0 directories
$ cd /sys/devices/vio ; find . -xtype l -exec file {} +
./ibm,sym-encryption-v1/of_node: broken symbolic link to
../../../firmware/devicetree/base/ibm,platform-facilities/ibm,sym-encryption-v1
./ibm,random-v1/of_node: broken symbolic link to
../../../firmware/devicetree/base/ibm,platform-facilities/ibm,random-v1
./ibm,compression-v1/of_node: broken symbolic link to
../../../firmware/devicetree/base/ibm,platform-facilities/ibm,compression-v1This is because add_dt_node() -> dlpar_attach_node() attaches only the parent node returned from configure-connector, ignoring any children. This should be corrected for the general case, but fixing that won't help with the stale OF node references, which is the more urgent problem.
One way to address that would be to make the drivers respond to node removal notifications, so that node references can be dropped appropriately. But this would likely force the drivers to disrupt active clients for no useful purpose: equivalent nodes are immediately re-added. And recall that the acceleration capabilities described by the nodes remain available throughout the whole process.
The solution I believe to be robust for this situation is to convert remove+add of a node with an unchanged phandle to an update of the node's properties in the Linux device tree structure. That would involve changing and adding a fair amount of code, and may take several iterations to land.
Until that can be realized we have a confirmed use-after-free and the possibility of memory corruption. So add a limited workaround that discriminates on the node type, ignoring adds and removes. This should be amenable to backporting in the meantime.
--- arch/powerpc/platforms/pseries/mobility.c | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+)
arch/powerpc/platforms/pseries/mobility.c +34 -0
@@ -61,6 +61,27 @@ static int mobility_rtas_call(int token, char *buf, s32 scope)static int delete_dt_node (struct device_node *dn) { +struct device_node *pdn; +bool is_platfac; + + pdn =of_get_parent (dn); + is_platfac =of_node_is_type (dn,"ibm,platform-facilities" ) || +of_node_is_type (pdn,"ibm,platform-facilities" ); +of_node_put (pdn); + +/* +* The drivers that bind to nodes in the platform-facilities +* hierarchy don't support node removal, and the removal directive +* from firmware is always followed by an add of an equivalent +* node. The capability (e.g. RNG, encryption, compression) +* represented by the node is never interrupted by the migration. +* So ignore changes to this part of the tree. +*/ +if (is_platfac) { +pr_notice ("ignoring remove operation for %pOFfp\n" , dn); +return 0 ; + } +pr_debug ("removing node %pOFfp\n" , dn);dlpar_detach_node (dn);return 0 ;
@@ -219,6 +240,19 @@ static int add_dt_node(struct device_node *parent_dn, __be32 drc_index)if (!dn)return -ENOENT ; +/* +* Since delete_dt_node() ignores this node type, this is the +* necessary counterpart. We also know that a platform-facilities +* node returned from dlpar_configure_connector() has children +* attached, and dlpar_attach_node() only adds the parent, leaking +* the children. So ignore these on the add side for now. +*/ +if (of_node_is_type (dn,"ibm,platform-facilities" )) { +pr_notice ("ignoring add operation for %pOF\n" , dn); +dlpar_free_cc_nodes (dn); +return 0 ; + } + rc =dlpar_attach_node (dn, parent_dn);if (rc)dlpar_free_cc_nodes (dn);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 9/39 usb: cdns3: gadget: fix new urb never complete if ep cancel previous requests
In reply to Greg Kroah-HartmanFrom: Frank Li <[email protected]>
[ Upstream commit 387c2b6ba197c6df28e75359f7d892f7c8dec204 ]
This issue was found at android12 MTP.
1. MTP submit many out urb request.
2. Cancel left requests (>20) when enough data get from host
3. Send ACK by IN endpoint.
4. MTP submit new out urb request.
5. 4's urb never complete.
TRACE LOG:
MtpServer-2157 [000] d..3 1287.150391: cdns3_ep_dequeue: ep1out: req: 00000000299e6836, req buff 000000009df42287, length: 0/16384 zsi, status: -115, trb: [start:87, end:87: virt addr 0x80004000ffd50420], flags:1 SID: 0 MtpServer-2157 [000] d..3 1287.150410: cdns3_gadget_giveback: ep1out: req: 00000000299e6836, req buff 000000009df42287, length: 0/16384 zsi, status: -104, trb: [start:87, end:87: virt addr 0x80004000ffd50420], flags:0 SID: 0 MtpServer-2157 [000] d..3 1287.150433: cdns3_ep_dequeue: ep1out: req: 0000000080b7bde6, req buff 000000009ed5c556, length: 0/16384 zsi, status: -115, trb: [start:88, end:88: virt addr 0x80004000ffd5042c], flags:1 SID: 0 MtpServer-2157 [000] d..3 1287.150446: cdns3_gadget_giveback: ep1out: req: 0000000080b7bde6, req buff 000000009ed5c556, length: 0/16384 zsi, status: -104, trb: [start:88, end:88: virt addr 0x80004000ffd5042c], flags:0 SID: 0 .... MtpServer-2157 [000] d..1 1293.630410: cdns3_alloc_request: ep1out: req: 00000000afbccb7d, req buff 0000000000000000, length: 0/0 zsi, status: 0, trb: [start:0, end:0: virt addr (null)], flags:0 SID: 0 MtpServer-2157 [000] d..2 1293.630421: cdns3_ep_queue: ep1out: req: 00000000afbccb7d, req buff 00000000871caf90, length: 0/512 zsi, status: -115, trb: [start:0, end:0: virt addr (null)], flags:0 SID: 0 MtpServer-2157 [000] d..2 1293.630445: cdns3_wa1: WA1: ep1out set guard MtpServer-2157 [000] d..2 1293.630450: cdns3_wa1: WA1: ep1out restore cycle bit MtpServer-2157 [000] d..2 1293.630453: cdns3_prepare_trb: ep1out: trb 000000007317b3ee, dma buf: 0xffd5bc00, size: 512, burst: 128 ctrl: 0x00000424 (C=0, T=0, ISP, IOC, Normal) SID:0 LAST_SID:0 MtpServer-2157 [000] d..2 1293.630460: cdns3_doorbell_epx: ep1out, ep_trbaddr ffd50414 .... irq/241-5b13000-2154 [000] d..1 1293.680849: cdns3_epx_irq: IRQ for ep1out: 01000408 ISP , ep_traddr: ffd508ac ep_last_sid: 00000000 use_streams: 0 irq/241-5b13000-2154 [000] d..1 1293.680858: cdns3_complete_trb: ep1out: trb 0000000021a11b54, dma buf: 0xffd50420, size: 16384, burst: 128 ctrl: 0x00001810 (C=0, T=0, CHAIN, LINK) SID:0 LAST_SID:0 irq/241-5b13000-2154 [000] d..1 1293.680865: cdns3_request_handled: Req: 00000000afbccb7d not handled, DMA pos: 185, ep deq: 88, ep enq: 185, start trb: 184, end trb: 184
Actually DMA pos already bigger than previous submit request afbccb7d's TRB (184-184). The reason of (not handled) is that deq position is wrong.
The TRB link is below when irq happen.
DEQ LINK LINK LINK LINK LINK .... TRB(afbccb7d):START DMA(EP_TRADDR).
Original code check LINK TRB, but DEQ just move one step.
LINK DEQ LINK LINK LINK LINK .... TRB(afbccb7d):START DMA(EP_TRADDR).
This patch skip all LINK TRB and sync DEQ to trb's start.
LINK LINK LINK LINK LINK .... DEQ = TRB(afbccb7d):START DMA(EP_TRADDR).
--- drivers/usb/cdns3/gadget.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-)
drivers/usb/cdns3/gadget.c +4 -16
@@ -352,19 +352,6 @@ static void cdns3_ep_inc_deq(struct cdns3_endpoint *priv_ep)cdns3_ep_inc_trb (&priv_ep->dequeue, &priv_ep->ccs, priv_ep->num_trbs); } -static void cdns3_move_deq_to_next_trb (struct cdns3_request *priv_req) -{ -struct cdns3_endpoint *priv_ep = priv_req->priv_ep; -int current_trb = priv_req->start_trb; - -while (current_trb != priv_req->end_trb) { -cdns3_ep_inc_deq (priv_ep); - current_trb = priv_ep->dequeue; - } - -cdns3_ep_inc_deq (priv_ep); -} -/** * cdns3_allow_enable_l1 - enable/disable permits to transition to L1. * @priv_dev: Extended gadget object
@@ -1518,10 +1505,11 @@ static void cdns3_transfer_completed(struct cdns3_device *priv_dev, trb = priv_ep->trb_pool + priv_ep->dequeue; -/* Request was dequeued and TRB was changed to TRB_LINK. */ -if (TRB_FIELD_TO_TYPE (le32_to_cpu (trb->control)) ==TRB_LINK ) { +/* The TRB was changed as link TRB, and the request was handled at ep_dequeue */ +while (TRB_FIELD_TO_TYPE (le32_to_cpu (trb->control)) ==TRB_LINK ) {trace_cdns3_complete_trb (priv_ep, trb); -cdns3_move_deq_to_next_trb (priv_req); +cdns3_ep_inc_deq (priv_ep); + trb = priv_ep->trb_pool + priv_ep->dequeue; }if (!request->stream_id) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 10/39 platform/x86/intel: hid: add quirk to support Surface Go 3
In reply to Greg Kroah-HartmanFrom: Alex Hung <[email protected]>
[ Upstream commit 01e16cb67cce68afaeb9c7bed72299036dbb0bc1 ]
Similar to other systems Surface Go 3 requires a DMI quirk to enable 5 button array for power and volume buttons.
--- drivers/platform/x86/intel-hid.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/platform/x86/intel-hid.c +7 -0
@@ -93,6 +93,13 @@ static const struct dmi_system_id button_array_table[] = { DMI_MATCH(DMI_PRODUCT_FAMILY, "ThinkPad X1 Tablet Gen 2"), }, }, + { + .ident = "Microsoft Surface Go 3", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"), + }, + }, { } };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 11/39 net: dsa: mv88e6xxx: allow use of PHYs on CPU and DSA ports
In reply to Greg Kroah-HartmanFrom: Russell King (Oracle) <[email protected]>
[ Upstream commit 04ec4e6250e5f58b525b08f3dca45c7d7427620e ]
Martyn Welch reports that his CPU port is unable to link where it has been necessary to use one of the switch ports with an internal PHY for the CPU port. The reason behind this is the port control register is left forcing the link down, preventing traffic flow.
This occurs because during initialisation, phylink expects the link to be down, and DSA forces the link down by synthesising a call to the DSA drivers phylink_mac_link_down() method, but we don't touch the forced-link state when we later reconfigure the port.
Resolve this by also unforcing the link state when we are operating in PHY mode and the PPU is set to poll the PHY to retrieve link status information.
--- drivers/net/dsa/mv88e6xxx/chip.c | 64 +++++++++++++++++--------------- 1 file changed, 34 insertions(+), 30 deletions(-)
drivers/net/dsa/mv88e6xxx/chip.c +34 -30
@@ -666,44 +666,48 @@ static void mv88e6xxx_mac_config(struct dsa_switch *ds, int port, {struct mv88e6xxx_chip *chip = ds->priv;struct mv88e6xxx_port *p; -int err; +int err =0 ; p = &chip->ports[port]; -/* FIXME: is this the correct test? If we're in fixed mode on an -* internal port, why should we process this any different from -* PHY mode? On the other hand, the port may be automedia between -* an internal PHY and the serdes... -*/ -if ((mode ==MLO_AN_PHY ) &&mv88e6xxx_phy_is_internal (ds, port)) -return ; -mv88e6xxx_reg_lock (chip); -/* In inband mode, the link may come up at any time while the link -* is not forced down. Force the link down while we reconfigure the -* interface mode. -*/ -if (mode ==MLO_AN_INBAND && p->interface != state->interface && - chip->info->ops->port_set_link) - chip->info->ops->port_set_link (chip, port,LINK_FORCED_DOWN ); - - err =mv88e6xxx_port_config_interface (chip, port, state->interface); -if (err && err != -EOPNOTSUPP ) - goto err_unlock; - err =mv88e6xxx_serdes_pcs_config (chip, port, mode, state->interface, - state->advertising); -/* FIXME: we should restart negotiation if something changed - which -* is something we get if we convert to using phylinks PCS operations. -*/ -if (err >0 ) - err =0 ; +if (mode !=MLO_AN_PHY || !mv88e6xxx_phy_is_internal (ds, port)) { +/* In inband mode, the link may come up at any time while the +* link is not forced down. Force the link down while we +* reconfigure the interface mode. +*/ +if (mode ==MLO_AN_INBAND && + p->interface != state->interface && + chip->info->ops->port_set_link) + chip->info->ops->port_set_link (chip, port, +LINK_FORCED_DOWN ); + + err =mv88e6xxx_port_config_interface (chip, port, + state->interface); +if (err && err != -EOPNOTSUPP ) + goto err_unlock; + + err =mv88e6xxx_serdes_pcs_config (chip, port, mode, + state->interface, + state->advertising); +/* FIXME: we should restart negotiation if something changed - +* which is something we get if we convert to using phylinks +* PCS operations. +*/ +if (err >0 ) + err =0 ; + }/* Undo the forced down state above after completing configuration -* irrespective of its state on entry, which allows the link to come up. +* irrespective of its state on entry, which allows the link to come +* up in the in-band case where there is no separate SERDES. Also +* ensure that the link can come up if the PPU is in use and we are +* in PHY mode (we treat the PPU as an effective in-band mechanism.) */ -if (mode ==MLO_AN_INBAND && p->interface != state->interface && - chip->info->ops->port_set_link) +if (chip->info->ops->port_set_link && + ((mode ==MLO_AN_INBAND && p->interface != state->interface) || + (mode ==MLO_AN_PHY &&mv88e6xxx_port_ppu_updates (chip, port)))) chip->info->ops->port_set_link (chip, port,LINK_UNFORCED ); p->interface = state->interface;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 12/39 of: fdt: fix off-by-one error in unflatten_dt_nodes()
In reply to Greg Kroah-HartmanFrom: Sergey Shtylyov <[email protected]>
[ Upstream commit 2f945a792f67815abca26fa8a5e863ccf3fa1181 ]
Commit 78c44d910d3e ("drivers/of: Fix depth when unflattening devicetree") forgot to fix up the depth check in the loop body in unflatten_dt_nodes() which makes it possible to overflow the nps[] buffer...
Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool.
--- drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/fdt.c +1 -1
@@ -315,7 +315,7 @@ static int unflatten_dt_nodes(const void *blob,for (offset =0 ; offset >=0 && depth >= initial_depth; offset =fdt_next_node (blob, offset, &depth)) { -if (WARN_ON_ONCE (depth >=FDT_MAX_DEPTH )) +if (WARN_ON_ONCE (depth >=FDT_MAX_DEPTH -1 ))continue ; if (!IS_ENABLED(CONFIG_OF_KOBJ) &&
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 13/39 pinctrl: sunxi: Fix name for A100 R_PIO
In reply to Greg Kroah-HartmanFrom: Michael Wu <[email protected]>
[ Upstream commit 76648c867c6c03b8a468d9c9222025873ecc613d ]
The name of A100 R_PIO driver should be sun50i-a100-r-pinctrl, not sun50iw10p1-r-pinctrl.
--- drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c +1 -1
@@ -98,7 +98,7 @@ MODULE_DEVICE_TABLE(of, a100_r_pinctrl_match);static struct platform_driver a100_r_pinctrl_driver = { .probe = a100_r_pinctrl_probe, .driver = { - .name ="sun50iw10p1-r-pinctrl" , + .name ="sun50i-a100-r-pinctrl" , .of_match_table = a100_r_pinctrl_match, }, };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 14/39 NFSv4: Turn off open-by-filehandle and NFS re-export for NFSv4.0
In reply to Greg Kroah-HartmanFrom: Trond Myklebust <[email protected]>
[ Upstream commit 2a9d683b48c8a87e61a4215792d44c90bcbbb536 ]
The NFSv4.0 protocol only supports open() by name. It cannot therefore be used with open_by_handle() and friends, nor can it be re-exported by knfsd.
--- fs/nfs/super.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-)
fs/nfs/super.c +18 -9
@@ -1029,22 +1029,31 @@ static void nfs_fill_super(struct super_block *sb, struct nfs_fs_context *ctx)if (ctx && ctx->bsize) sb->s_blocksize =nfs_block_size (ctx->bsize, &sb->s_blocksize_bits); -if (server->nfs_client->rpc_ops->version !=2 ) { -/* The VFS shouldn't apply the umask to mode bits. We will do -* so ourselves when necessary. +switch (server->nfs_client->rpc_ops->version) { +case 2 : + sb->s_time_gran =1000 ; + sb->s_time_min =0 ; + sb->s_time_max =U32_MAX ; +break ; +case 3 : +/* +* The VFS shouldn't apply the umask to mode bits. +* We will do so ourselves when necessary. */ sb->s_flags |=SB_POSIXACL ; sb->s_time_gran =1 ; - sb->s_export_op = &nfs_export_ops; - }else - sb->s_time_gran =1000 ; - -if (server->nfs_client->rpc_ops->version !=4 ) { sb->s_time_min =0 ; sb->s_time_max =U32_MAX ; - }else { + sb->s_export_op = &nfs_export_ops; +break ; +case 4 : + sb->s_flags |=SB_POSIXACL ; + sb->s_time_gran =1 ; sb->s_time_min =S64_MIN ; sb->s_time_max =S64_MAX ; +if (server->caps &NFS_CAP_ATOMIC_OPEN_V1 ) + sb->s_export_op = &nfs_export_ops; +break ; } sb->s_magic =NFS_SUPER_MAGIC ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 15/39 gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit 279c12df8d2efb28def9d037f288cbfb97c30fe2 ]
Commit e39d5ef67804 ("powerpc/5xxx: extend mpc8xxx_gpio driver to support mpc512x gpios") implemented support for IRQ_TYPE_LEVEL_LOW flow type in mpc512x via falling edge type. Do same for mpc85xx which support was added in commit 345e5c8a1cc3 ("powerpc: Add interrupt support to mpc8xxx_gpio").
Fixes probing of lm90 hwmon driver on mpc85xx based board which use level interrupt. Without it kernel prints error and refuse lm90 to work:
[ 15.258370] genirq: Setting trigger mode 8 for irq 49 failed (mpc8xxx_irq_set_type+0x0/0xf8)
[ 15.267168] lm90 0-004c: cannot request IRQ 49
[ 15.272708] lm90: probe of 0-004c failed with error -22--- drivers/gpio/gpio-mpc8xxx.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpio/gpio-mpc8xxx.c +1 -0
@@ -169,6 +169,7 @@ static int mpc8xxx_irq_set_type(struct irq_data *d, unsigned int flow_type)switch (flow_type) {case IRQ_TYPE_EDGE_FALLING : +case IRQ_TYPE_LEVEL_LOW :raw_spin_lock_irqsave (&mpc8xxx_gc->lock, flags); gc->write_reg (mpc8xxx_gc->regs +GPIO_ICR , gc->read_reg(mpc8xxx_gc->regs + GPIO_ICR)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 16/39 drm/meson: Correct OSD1 global alpha value
In reply to Greg Kroah-HartmanFrom: Stuart Menefy <[email protected]>
[ Upstream commit 6836829c8ea453c9e3e518e61539e35881c8ed5f ]
VIU_OSD1_CTRL_STAT.GLOBAL_ALPHA is a 9 bit field, so the maximum value is 0x100 not 0xff.
This matches the vendor kernel.
--- drivers/gpu/drm/meson/meson_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/meson/meson_plane.c +1 -1
@@ -163,7 +163,7 @@ static void meson_plane_atomic_update(struct drm_plane *plane,/* Enable OSD and BLK0, set max global alpha */ priv->viu.osd1_ctrl_stat =OSD_ENABLE | - (0xFF <<OSD_GLOBAL_ALPHA_SHIFT ) | + (0x100 <<OSD_GLOBAL_ALPHA_SHIFT ) |OSD_BLK0_ENABLE ; priv->viu.osd1_ctrl_stat2 = readl(priv->io_base +
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 17/39 drm/meson: Fix OSD1 RGB to YCbCr coefficient
In reply to Greg Kroah-HartmanFrom: Stuart Menefy <[email protected]>
[ Upstream commit 6463d3930ba5b6addcfc8f80a4543976a2fc7656 ]
VPP_WRAP_OSD1_MATRIX_COEF22.Coeff22 is documented as being bits 0-12, not 16-28.
Without this the output tends to have a pink hue, changing it results in better color accuracy.
The vendor kernel doesn't use this register. However the code which sets VIU2_OSD1_MATRIX_COEF22 also uses bits 0-12. There is a slightly different style of registers for configuring some of the other matrices, which do use bits 16-28 for this coefficient, but those have names ending in MATRIX_COEF22_30, and this is not one of those.
--- drivers/gpu/drm/meson/meson_viu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/meson/meson_viu.c +1 -1
@@ -94,7 +94,7 @@ static void meson_viu_set_g12a_osd1_matrix(struct meson_drm *priv, priv->io_base + _REG(VPP_WRAP_OSD1_MATRIX_COEF11_12));writel (((m[9 ] &0x1fff ) <<16 ) | (m[10 ] &0x1fff ), priv->io_base +_REG (VPP_WRAP_OSD1_MATRIX_COEF20_21 )); -writel ((m[11 ] &0x1fff ) <<16 , +writel ((m[11 ] &0x1fff ), priv->io_base +_REG (VPP_WRAP_OSD1_MATRIX_COEF22 )); writel(((m[18] & 0xfff) << 16) | (m[19] & 0xfff),
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 18/39 parisc: ccio-dma: Add missing iounmap in error path in ccio_probe()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 38238be4e881a5d0abbe4872b4cd6ed790be06c8 ]
Add missing iounmap() before return from ccio_probe(), if ccio_init_resources() fails.
--- drivers/parisc/ccio-dma.c | 1 + 1 file changed, 1 insertion(+)
drivers/parisc/ccio-dma.c +1 -0
@@ -1546,6 +1546,7 @@ static int __init ccio_probe(struct parisc_device *dev) }ccio_ioc_init (ioc);if (ccio_init_resources (ioc)) { +iounmap (ioc->ioc_regs);kfree (ioc);return -ENOMEM ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 19/39 tracing: hold caller_addr to hardirq_{enable,disable}_ip
In reply to Greg Kroah-HartmanFrom: Yipeng Zou <[email protected]>
[ Upstream commit 54c3931957f6a6194d5972eccc36d052964b2abe ]
Currently, The arguments passing to lockdep_hardirqs_{on,off} was fixed in CALLER_ADDR0.
The function trace_hardirqs_on_caller should have been intended to use caller_addr to represent the address that caller wants to be traced.
For example, lockdep log in riscv showing the last {enabled,disabled} at __trace_hardirqs_{on,off} all the time(if called by):
[ 57.853175] hardirqs last enabled at (2519): __trace_hardirqs_on+0xc/0x14 [ 57.853848] hardirqs last disabled at (2520): __trace_hardirqs_off+0xc/0x14
After use trace_hardirqs_xx_caller, we can get more effective information:
[ 53.781428] hardirqs last enabled at (2595): restore_all+0xe/0x66 [ 53.782185] hardirqs last disabled at (2596): ret_from_exception+0xa/0x10
--- kernel/trace/trace_preemptirq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/trace/trace_preemptirq.c +3 -3
@@ -94,15 +94,15 @@ __visible void trace_hardirqs_on_caller(unsigned long caller_addr)this_cpu_write (tracing_irq_cpu,0 ); } -lockdep_hardirqs_on_prepare (CALLER_ADDR0 ); -lockdep_hardirqs_on (CALLER_ADDR0 ); +lockdep_hardirqs_on_prepare (caller_addr); +lockdep_hardirqs_on (caller_addr); }EXPORT_SYMBOL (trace_hardirqs_on_caller);NOKPROBE_SYMBOL (trace_hardirqs_on_caller); __visible void trace_hardirqs_off_caller(unsigned long caller_addr) { -lockdep_hardirqs_off (CALLER_ADDR0 ); +lockdep_hardirqs_off (caller_addr);if (!this_cpu_read (tracing_irq_cpu)) {this_cpu_write (tracing_irq_cpu,1 );
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 20/39 of/device: Fix up of_dma_configure_id() stub
In reply to Greg Kroah-HartmanFrom: Thierry Reding <[email protected]>
commit 40bfe7a86d84cf08ac6a8fe2f0c8bf7a43edd110 upstream.
Since the stub version of of_dma_configure_id() was added in commit a081bd4af4ce ("of/device: Add input id to of_dma_configure()"), it has not matched the signature of the full function, leading to build failure reports when code using this function is built on !OF configurations.
--- include/linux/of_device.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
include/linux/of_device.h +3 -2
@@ -113,8 +113,9 @@ static inline struct device_node *of_cpu }static inline int of_dma_configure_id (struct device *dev, -struct device_node *np, -bool force_dma) +struct device_node *np, +bool force_dma, +const u32 *id) {return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 21/39 cifs: revalidate mapping when doing direct writes
In reply to Greg Kroah-HartmanFrom: Ronnie Sahlberg <[email protected]>
commit 7500a99281dfed2d4a84771c933bcb9e17af279b upstream.
Kernel bugzilla: 216301
When doing direct writes we need to also invalidate the mapping in case we have a cached copy of the affected page(s) in memory or else subsequent reads of the data might return the old/stale content before we wrote an update to the server.
--- fs/cifs/file.c | 3 +++ 1 file changed, 3 insertions(+)
fs/cifs/file.c +3 -0
@@ -3244,6 +3244,9 @@ static ssize_t __cifs_writev(ssize_t cifs_direct_writev (struct kiocb *iocb,struct iov_iter *from) { +struct file *file = iocb->ki_filp; + +cifs_revalidate_mapping (file->f_inode);return __cifs_writev (iocb, from, true); }
Greg Kroah-Hartman
maintainerPATCH 22/39 cifs: dont send down the destination address to sendmsg for a SOCK_STREAM
In reply to Greg Kroah-HartmanFrom: Stefan Metzmacher <[email protected]>
commit 17d3df38dc5f4cec9b0ac6eb79c1859b6e2693a4 upstream.
This is ignored anyway by the tcp layer.
--- fs/cifs/transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/cifs/transport.c +2 -2
@@ -209,8 +209,8 @@ smb_send_kvec(struct TCP_Server_Info *se *sent =0 ; - smb_msg->msg_name = (struct sockaddr *) &server->dstaddr; - smb_msg->msg_namelen =sizeof (struct sockaddr ); + smb_msg->msg_name =NULL ; + smb_msg->msg_namelen =0 ; smb_msg->msg_control =NULL ; smb_msg->msg_controllen =0 ;if (server->noblocksnd)
Greg Kroah-Hartman
maintainerPATCH 23/39 tools/include/uapi: Fix <asm/errno.h> for parisc and xtensa
In reply to Greg Kroah-HartmanFrom: Ben Hutchings <[email protected]>
commit 95363747a6f39e88a3052fcf6ce6237769495ce0 upstream.
tools/include/uapi/asm/errno.h currently attempts to include non-existent arch-specific errno.h header for xtensa. Remove this case so that <asm-generic/errno.h> is used instead, and add the missing arch-specific header for parisc.
--- tools/include/uapi/asm/errno.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/include/uapi/asm/errno.h +2 -2
@@ -9,8 +9,8 @@#include "../../../arch/alpha/include/uapi/asm/errno.h" #elif defined(__mips__)#include "../../../arch/mips/include/uapi/asm/errno.h" -#elif defined(__xtensa__) -#include "../../../arch/xtensa/include/uapi/asm/errno.h" +#elif defined(__hppa__) +#include "../../../arch/parisc/include/uapi/asm/errno.h" #else #include <asm-generic/errno.h> #endif
Signature · 1 line
2.37.3
Greg Kroah-Hartman
maintainerPATCH 24/39 video: fbdev: i740fb: Error out if pixclock equals zero
In reply to Greg Kroah-HartmanFrom: Zheyu Ma <[email protected]>
commit 15cf0b82271b1823fb02ab8c377badba614d95d5 upstream.
The userspace program could pass any values to the driver through ioctl() interface. If the driver doesn't check the value of 'pixclock', it may cause divide error.
Fix this by checking whether 'pixclock' is zero in the function i740fb_check_var().
The following log reveals it:
divide error: 0000 [#1] PREEMPT SMP KASAN PTI
RIP: 0010:i740fb_decode_var drivers/video/fbdev/i740fb.c:444 [inline]
RIP: 0010:i740fb_set_par+0x272f/0x3bb0 drivers/video/fbdev/i740fb.c:739
Call Trace:
fb_set_var+0x604/0xeb0 drivers/video/fbdev/core/fbmem.c:1036
do_fb_ioctl+0x234/0x670 drivers/video/fbdev/core/fbmem.c:1112
fb_ioctl+0xdd/0x130 drivers/video/fbdev/core/fbmem.c:1191
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]--- drivers/video/fbdev/i740fb.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/video/fbdev/i740fb.c +3 -0
@@ -662,6 +662,9 @@ static int i740fb_decode_var(const strucstatic int i740fb_check_var (struct fb_var_screeninfo *var,struct fb_info *info) { +if (!var->pixclock) +return -EINVAL ; +switch (var->bits_per_pixel) {case 8 : var->red.offset = var->green.offset = var->blue.offset =0 ;
Greg Kroah-Hartman
maintainerPATCH 25/39 Revert "serial: 8250: Fix reporting real baudrate value in c_ospeed field"
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit d02b006b29de14968ba4afa998bede0d55469e29 upstream.
This reverts commit 32262e2e429cdb31f9e957e997d53458762931b7.
The commit in question claims to determine the inverse of serial8250_get_divisor() but failed to notice that some drivers override the default implementation using a get_divisor() callback.
This means that the computed line-speed values can be completely wrong and results in regular TCSETS requests failing (the incorrect values would also be passed to any overridden set_divisor() callback).
Similarly, it also failed to honour the old (deprecated) ASYNC_SPD_FLAGS and would break applications relying on those when re-encoding the actual line speed.
There are also at least two quirks, UART_BUG_QUOT and an OMAP1510 workaround, which were happily ignored and that are now broken.
Finally, even if the offending commit were to be implemented correctly, this is a new feature and not something which should be backported to stable.
--- drivers/tty/serial/8250/8250_port.c | 17 ----------------- 1 file changed, 17 deletions(-)
drivers/tty/serial/8250/8250_port.c +0 -17
@@ -2547,19 +2547,6 @@ static unsigned int serial8250_get_divisreturn serial8250_do_get_divisor (port, baud, frac); } -static unsigned int serial8250_compute_baud_rate (struct uart_port *port, -unsigned int quot) -{ -if ((port->flags &UPF_MAGIC_MULTIPLIER ) && quot ==0x8001 ) -return port->uartclk /4 ; -else if ((port->flags &UPF_MAGIC_MULTIPLIER ) && quot ==0x8002 ) -return port->uartclk /8 ; -else if (port->type ==PORT_NPCM ) -return DIV_ROUND_CLOSEST (port->uartclk -2 * (quot +2 ),16 * (quot +2 )); -else -return DIV_ROUND_CLOSEST (port->uartclk,16 * quot); -} -static unsigned char serial8250_compute_lcr (struct uart_8250_port *up,tcflag_t c_cflag) {
@@ -2701,14 +2688,11 @@ void serial8250_update_uartclk(struct ua baud =serial8250_get_baud_rate (port, termios,NULL ); quot =serial8250_get_divisor (port, baud, &frac); - baud =serial8250_compute_baud_rate (port, quot);serial8250_rpm_get (up);spin_lock_irqsave (&port->lock, flags);uart_update_timeout (port, termios->c_cflag, baud); -if (tty_termios_baud_rate (termios)) -tty_termios_encode_baud_rate (termios, baud, baud);serial8250_set_divisor (port, baud, quot, frac);serial_port_out (port,UART_LCR , up->lcr);
@@ -2742,7 +2726,6 @@ serial8250_do_set_termios(struct uart_po baud =serial8250_get_baud_rate (port, termios, old); quot =serial8250_get_divisor (port, baud, &frac); - baud =serial8250_compute_baud_rate (port, quot);/* * Ok, we're now changing the port state. Do it with
Re: [PATCH 5.10 25/39] Revert "serial: 8250: Fix reporting real baudrate value in c_ospeed field"
Hi!
Quoted 9 lines
From: Johan Hovold <[email protected]>
commit
d02b006b29de14968ba4afa998bede0d55469e29upstream.This reverts commit
32262e2e429cdb31f9e957e997d53458762931b7.The commit in question claims to determine the inverse of
serial8250_get_divisor()but failed to notice that some drivers override the default implementation using aget_divisor()callback.
I believe it would be better to remove bad commit and its revert, since it was not yet released.
Best regards,
Pavel
Signature · 1 line
People of Russia, stop Putin before his war on Ukraine escalates.
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 25/39] Revert "serial: 8250: Fix reporting real baudrate value in c_ospeed field"
Quoted 6 lines · Pavel Machek
Hi!
Quoted 4 lines
From: Johan Hovold <[email protected]>
commit
d02b006b29de14968ba4afa998bede0d55469e29upstream.
Quoted 8 lines
Quoted 5 lines
This reverts commit
32262e2e429cdb31f9e957e997d53458762931b7.The commit in question claims to determine the inverse of
serial8250_get_divisor()but failed to notice that some drivers override the default implementation using aget_divisor()callback.I believe it would be better to remove bad commit and its revert, since it was not yet released.
No, our tools keep picking the original up as "hey, you missed this one!", so I just added the revert here to make sure all is good going forward.
thanks,
greg k-h
Sasha Levin
maintainerRe: [PATCH 5.10 25/39] Revert "serial: 8250: Fix reporting real baudrate value in c_ospeed field"
In reply to Pavel MachekQuoted 6 lines · Pavel Machek
Hi!
Quoted 4 lines
From: Johan Hovold <[email protected]>
commit
d02b006b29de14968ba4afa998bede0d55469e29upstream.
Quoted 8 lines
Quoted 5 lines
This reverts commit
32262e2e429cdb31f9e957e997d53458762931b7.The commit in question claims to determine the inverse of
serial8250_get_divisor()but failed to notice that some drivers override the default implementation using aget_divisor()callback.I believe it would be better to remove bad commit and its revert, since it was not yet released.
No - this way we can track the story of the commit. If someone shows up a year from now and asks why this certain patch isn't in -stable it's much easier to answer that (and not to queue it up by mistake).
Signature · 2 lines
Thanks, Sasha
Greg Kroah-Hartman
maintainerPATCH 26/39 ASoC: nau8824: Fix semaphore unbalance at error paths
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
[ Upstream commit 5628560e90395d3812800a8e44a01c32ffa429ec ]
The semaphore of nau8824 wasn't properly unlocked at some error handling code paths, hence this may result in the unbalance (and potential lock-up). Fix them to handle the semaphore up properly.
--- sound/soc/codecs/nau8824.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
sound/soc/codecs/nau8824.c +10 -7
@@ -1072,6 +1072,7 @@ static int nau8824_hw_params(struct snd_pcm_substream *substream,struct snd_soc_component *component = dai->component;struct nau8824 *nau8824 =snd_soc_component_get_drvdata (component);unsigned int val_len =0 , osr, ctrl_val, bclk_fs, bclk_div; +int err = -EINVAL ;nau8824_sema_acquire (nau8824,HZ );
@@ -1088,7 +1089,7 @@ static int nau8824_hw_params(struct snd_pcm_substream *substream, osr &=NAU8824_DAC_OVERSAMPLE_MASK ;if (nau8824_clock_check (nau8824, substream->stream, nau8824->fs, osr)) -return -EINVAL ; + goto error;regmap_update_bits (nau8824->regmap,NAU8824_REG_CLK_DIVIDER ,NAU8824_CLK_DAC_SRC_MASK , osr_dac_sel[osr].clk_src <<NAU8824_CLK_DAC_SRC_SFT );
@@ -1098,7 +1099,7 @@ static int nau8824_hw_params(struct snd_pcm_substream *substream, osr &=NAU8824_ADC_SYNC_DOWN_MASK ;if (nau8824_clock_check (nau8824, substream->stream, nau8824->fs, osr)) -return -EINVAL ; + goto error;regmap_update_bits (nau8824->regmap,NAU8824_REG_CLK_DIVIDER ,NAU8824_CLK_ADC_SRC_MASK , osr_adc_sel[osr].clk_src <<NAU8824_CLK_ADC_SRC_SFT );
@@ -1119,7 +1120,7 @@ static int nau8824_hw_params(struct snd_pcm_substream *substream,else if (bclk_fs <=256 ) bclk_div =0 ;else -return -EINVAL ; + goto error; regmap_update_bits(nau8824->regmap, NAU8824_REG_PORT0_I2S_PCM_CTRL_2, NAU8824_I2S_LRC_DIV_MASK | NAU8824_I2S_BLK_DIV_MASK,
@@ -1140,15 +1141,17 @@ static int nau8824_hw_params(struct snd_pcm_substream *substream, val_len |=NAU8824_I2S_DL_32 ;break ;default : -return -EINVAL ; + goto error; }regmap_update_bits (nau8824->regmap,NAU8824_REG_PORT0_I2S_PCM_CTRL_1 ,NAU8824_I2S_DL_MASK , val_len); + err =0 ; + error:nau8824_sema_release (nau8824); -return 0 ; +return err; }static int nau8824_set_fmt (struct snd_soc_dai *dai,unsigned int fmt)
@@ -1157,8 +1160,6 @@ static int nau8824_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)struct nau8824 *nau8824 =snd_soc_component_get_drvdata (component);unsigned int ctrl1_val =0 , ctrl2_val =0 ; -nau8824_sema_acquire (nau8824,HZ ); -switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) {case SND_SOC_DAIFMT_CBM_CFM : ctrl2_val |=NAU8824_I2S_MS_MASTER ;
@@ -1200,6 +1201,8 @@ static int nau8824_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)return -EINVAL ; } +nau8824_sema_acquire (nau8824,HZ ); +regmap_update_bits (nau8824->regmap,NAU8824_REG_PORT0_I2S_PCM_CTRL_1 ,NAU8824_I2S_DF_MASK |NAU8824_I2S_BP_MASK |NAU8824_I2S_PCMB_EN , ctrl1_val);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 27/39 regulator: pfuze100: Fix the global-out-of-bounds access in pfuze100_regulator_probe()
In reply to Greg Kroah-HartmanFrom: Xiaolei Wang <[email protected]>
[ Upstream commit 78e1e867f44e6bdc72c0e6a2609a3407642fb30b ]
The pfuze_chip::regulator_descs is an array of size PFUZE100_MAX_REGULATOR, the pfuze_chip::pfuze_regulators is the pointer to the real regulators of a specific device. The number of real regulator is supposed to be less than the PFUZE100_MAX_REGULATOR, so we should use the size of 'regulator_num * sizeof(struct pfuze_regulator)' in memcpy(). This fixes the out of bounds access bug reported by KASAN.
--- drivers/regulator/pfuze100-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/pfuze100-regulator.c +1 -1
@@ -791,7 +791,7 @@ static int pfuze100_regulator_probe(struct i2c_client *client, ((pfuze_chip->chip_id == PFUZE3000) ? "3000" : "3001"))));memcpy (pfuze_chip->regulator_descs, pfuze_chip->pfuze_regulators, -sizeof (pfuze_chip->regulator_descs)); + regulator_num *sizeof (struct pfuze_regulator )); ret =pfuze_parse_regulators_dt (pfuze_chip);if (ret)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 28/39 rxrpc: Fix local destruction being repeated
In reply to Greg Kroah-HartmanFrom: David Howells <[email protected]>
[ Upstream commit d3d863036d688313f8d566b87acd7d99daf82749 ]
If the local processor work item for the rxrpc local endpoint gets requeued by an event (such as an incoming packet) between it getting scheduled for destruction and the UDP socket being closed, the rxrpc_local_destroyer() function can get run twice. The second time it can hang because it can end up waiting for cleanup events that will never happen.
--- net/rxrpc/local_object.c | 3 +++ 1 file changed, 3 insertions(+)
net/rxrpc/local_object.c +3 -0
@@ -424,6 +424,9 @@ static void rxrpc_local_processor(struct work_struct *work) container_of(work, struct rxrpc_local, processor);bool again; +if (local->dead) +return ; +trace_rxrpc_local (local->debug_id, rxrpc_local_processing,atomic_read (&local->usage),NULL );
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 29/39 rxrpc: Fix calc of resend age
In reply to Greg Kroah-HartmanFrom: David Howells <[email protected]>
[ Upstream commit 214a9dc7d852216e83acac7b75bc18f01ce184c2 ]
Fix the calculation of the resend age to add a microsecond value as microseconds, not nanoseconds.
--- net/rxrpc/call_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/rxrpc/call_event.c +1 -1
@@ -166,7 +166,7 @@ static void rxrpc_resend(struct rxrpc_call *call, unsigned long now_j)_enter ("{%d,%d}" , call->tx_hard_ack, call->tx_top); now =ktime_get_real (); - max_age =ktime_sub (now,jiffies_to_usecs (call->peer->rto_j)); + max_age =ktime_sub_us (now,jiffies_to_usecs (call->peer->rto_j));spin_lock_bh (&call->lock);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 30/39 wifi: mac80211_hwsim: check length for virtio packets
In reply to Greg Kroah-HartmanFrom: Soenke Huster <[email protected]>
[ Upstream commit 8c0427842aaef161a38ac83b7e8d8fe050b4be04 ]
An invalid packet with a length shorter than the specified length in the netlink header can lead to use-after-frees and slab-out-of-bounds in the processing of the netlink attributes, such as the following:
BUG: KASAN: slab-out-of-bounds in __nla_validate_parse+0x1258/0x2010 Read of size 2 at addr ffff88800ac7952c by task kworker/0:1/12 Workqueue: events hwsim_virtio_rx_work Call Trace: <TASK> dump_stack_lvl+0x45/0x5d print_report.cold+0x5e/0x5e5 kasan_report+0xb1/0x1c0 __nla_validate_parse+0x1258/0x2010 __nla_parse+0x22/0x30 hwsim_virtio_handle_cmd.isra.0+0x13f/0x2d0 hwsim_virtio_rx_work+0x1b2/0x370 process_one_work+0x8df/0x1530 worker_thread+0x575/0x11a0 kthread+0x29d/0x340 ret_from_fork+0x22/0x30 </TASK>
Discarding packets with an invalid length solves this. Therefore, skb->len must be set at reception.
--- drivers/net/wireless/mac80211_hwsim.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/wireless/mac80211_hwsim.c +6 -1
@@ -4209,6 +4209,10 @@ static int hwsim_virtio_handle_cmd(struct sk_buff *skb) nlh =nlmsg_hdr (skb); gnlh =nlmsg_data (nlh); + +if (skb->len < nlh->nlmsg_len) +return -EINVAL ; + err =genlmsg_parse (nlh, &hwsim_genl_family, tb,HWSIM_ATTR_MAX , hwsim_genl_policy,NULL );if (err) {
@@ -4251,7 +4255,8 @@ static void hwsim_virtio_rx_work(struct work_struct *work)spin_unlock_irqrestore (&hwsim_virtio_lock, flags); skb->data = skb->head; -skb_set_tail_pointer (skb, len); +skb_reset_tail_pointer (skb); +skb_put (skb, len);hwsim_virtio_handle_cmd (skb);spin_lock_irqsave (&hwsim_virtio_lock, flags);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 31/39 ALSA: hda/sigmatel: Keep power up while beep is enabled
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
[ Upstream commit 414d38ba871092aeac4ed097ac4ced89486646f7 ]
It seems that the beep playback doesn't work well on IDT codec devices when the codec auto-pm is enabled. Keep the power on while the beep switch is enabled.
--- sound/pci/hda/patch_sigmatel.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
sound/pci/hda/patch_sigmatel.c +22 -0
@@ -209,6 +209,7 @@ struct sigmatel_spec {/* beep widgets */ hda_nid_t anabeep_nid; +bool beep_power_on;/* SPDIF-out mux */ const char *const *spdif_labels;
@@ -4447,6 +4448,26 @@ static int stac_suspend(struct hda_codec *codec)stac_shutup (codec); return 0; } + +static int stac_check_power_status (struct hda_codec *codec,hda_nid_t nid) +{ +struct sigmatel_spec *spec = codec->spec; +int ret =snd_hda_gen_check_power_status (codec, nid); + +#ifdef CONFIG_SND_HDA_INPUT_BEEP +if (nid == spec->gen.beep_nid && codec->beep) { +if (codec->beep->enabled != spec->beep_power_on) { + spec->beep_power_on = codec->beep->enabled; +if (spec->beep_power_on) +snd_hda_power_up_pm (codec); +else +snd_hda_power_down_pm (codec); + } + ret |= spec->beep_power_on; + } +#endif +return ret; +}#else #define stac_suspend NULL#endif /* CONFIG_PM */
@@ -4459,6 +4480,7 @@ static const struct hda_codec_ops stac_patch_ops = { .unsol_event = snd_hda_jack_unsol_event, #ifdef CONFIG_PM .suspend = stac_suspend, + .check_power_status = stac_check_power_status, #endif .reboot_notify = stac_shutup, };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 32/39 ALSA: hda/tegra: Align BDL entry to 4KB boundary
In reply to Greg Kroah-HartmanFrom: Mohan Kumar <[email protected]>
[ Upstream commit 8d44e6044a0e885acdd01813768a0b27906d64fd ]
AZA HW may send a burst read/write request crossing 4K memory boundary. The 4KB boundary is not guaranteed by Tegra HDA HW. Make SW change to include the flag AZX_DCAPS_4K_BDLE_BOUNDARY to align BDLE to 4K boundary.
--- sound/pci/hda/hda_tegra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/pci/hda/hda_tegra.c +2 -1
@@ -479,7 +479,8 @@ MODULE_DEVICE_TABLE(of, hda_tegra_match);static int hda_tegra_probe (struct platform_device *pdev) {const unsigned int driver_flags =AZX_DCAPS_CORBRP_SELF_CLEAR | -AZX_DCAPS_PM_RUNTIME ; +AZX_DCAPS_PM_RUNTIME | +AZX_DCAPS_4K_BDLE_BOUNDARY ;struct snd_card *card;struct azx *chip;struct hda_tegra *hda;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 33/39 net: usb: qmi_wwan: add Quectel RM520N
In reply to Greg Kroah-HartmanFrom: jerry.meng <[email protected]>
[ Upstream commit e1091e226a2bab4ded1fe26efba2aee1aab06450 ]
add support for Quectel RM520N which is based on Qualcomm SDX62 chip.
0x0801: DIAG + NMEA + AT + MODEM + RMNET
T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 10 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0801 Rev= 5.04 S: Manufacturer=Quectel S: Product=RM520N-GL S: SerialNumber=384af524 C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=88(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
--- drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/usb/qmi_wwan.c +1 -0
@@ -1024,6 +1024,7 @@ static const struct usb_device_id products[] = { {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0512)}, /* Quectel EG12/EM12 */ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0620)}, /* Quectel EM160R-GL */ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0800)}, /* Quectel RM500Q-GL */ + {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0801)}, /* Quectel RM520N *//* 3. Combined interface devices matching on interface number */ {QMI_FIXED_INTF(0x0408, 0xea42, 4)}, /* Yota / Megafon M100-1 */
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 34/39 afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked
In reply to Greg Kroah-HartmanFrom: David Howells <[email protected]>
[ Upstream commit 0066f1b0e27556381402db3ff31f85d2a2265858 ]
When trying to get a file lock on an AFS file, the server may return UAEAGAIN to indicate that the lock is already held. This is currently translated by the default path to -EREMOTEIO.
Translate it instead to -EAGAIN so that we know we can retry it.
--- fs/afs/misc.c | 1 + 1 file changed, 1 insertion(+)
fs/afs/misc.c +1 -0
@@ -69,6 +69,7 @@ int afs_abort_to_error(u32 abort_code)/* Unified AFS error table */ case UAEPERM :return -EPERM ;case UAENOENT :return -ENOENT ; +case UAEAGAIN :return -EAGAIN ;case UAEACCES :return -EACCES ;case UAEBUSY :return -EBUSY ;case UAEEXIST :return -EEXIST ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 35/39 MIPS: OCTEON: irq: Fix octeon_irq_force_ciu_mapping()
In reply to Greg Kroah-HartmanFrom: Alexander Sverdlin <[email protected]>
[ Upstream commit ba912afbd611d3a5f22af247721a071ad1d5b9e0 ]
For irq_domain_associate() to work the virq descriptor has to be pre-allocated in advance. Otherwise the following happens:
WARNING: CPU: 0 PID: 0 at .../kernel/irq/irqdomain.c:527 irq_domain_associate+0x298/0x2e8
error: virq128 is not allocated
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.78-... #1
...
Call Trace:
[<ffffffff801344c4>] show_stack+0x9c/0x130
[<ffffffff80769550>] dump_stack+0x90/0xd0
[<ffffffff801576d0>] __warn+0x118/0x130
[<ffffffff80157734>] warn_slowpath_fmt+0x4c/0x70
[<ffffffff801b83c0>] irq_domain_associate+0x298/0x2e8
[<ffffffff80a43bb8>] octeon_irq_init_ciu+0x4c8/0x53c
[<ffffffff80a76cbc>] of_irq_init+0x1e0/0x388
[<ffffffff80a452cc>] init_IRQ+0x4c/0xf4
[<ffffffff80a3cc00>] start_kernel+0x404/0x698Use irq_alloc_desc_at() to avoid the above problem.
--- arch/mips/cavium-octeon/octeon-irq.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/mips/cavium-octeon/octeon-irq.c +10 -0
@@ -127,6 +127,16 @@ static void octeon_irq_free_cd(struct irq_domain *d, unsigned int irq)static int octeon_irq_force_ciu_mapping (struct irq_domain *domain,int irq,int line,int bit) { +struct device_node *of_node; +int ret; + + of_node =irq_domain_get_of_node (domain); +if (!of_node) +return -EINVAL ; + ret =irq_alloc_desc_at (irq,of_node_to_nid (of_node)); +if (ret <0 ) +return ret; +return irq_domain_associate (domain, irq, line <<6 | bit); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 36/39 mksysmap: Fix the mismatch of L0 symbols in System.map
In reply to Greg Kroah-HartmanFrom: Youling Tang <[email protected]>
[ Upstream commit c17a2538704f926ee4d167ba625e09b1040d8439 ]
When System.map was generated, the kernel used mksysmap to filter the kernel symbols, we need to filter "L0" symbols in LoongArch architecture.
$ cat System.map | grep L0 9000000000221540 t L0
The L0 symbol exists in System.map, but not in .tmp_System.map. When "cmp -s System.map .tmp_System.map" will show "Inconsistent kallsyms data" error message in link-vmlinux.sh script.
--- scripts/mksysmap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/mksysmap +1 -1
@@ -41,4 +41,4 @@ # so we just ignore them to let readprofile continue to work. # (At least sparc64 has __crc_ in the middle). -$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)' > $2 +$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)\|\( L0\)' > $2
Signature · 1 line
2.35.1
Re: [PATCH 5.10 36/39] mksysmap: Fix the mismatch of L0 symbols in System.map
Hi!
Quoted 7 lines
From: Youling Tang <[email protected]>
[ Upstream commit
c17a2538704f926ee4d167ba625e09b1040d8439]When System.map was generated, the kernel used mksysmap to filter the kernel symbols, we need to filter "L0" symbols in LoongArch architecture.
Quoted 6 lines
$ cat System.map | grep L0 9000000000221540 t L0The L0 symbol exists in System.map, but not in .tmp_System.map. When "cmp -s System.map .tmp_System.map" will show "Inconsistent kallsyms data" error message in
link-vmlinux.shscript.
LoongArch is not supported in 5.10 (nor 4.19) so we should not have this patch.
Best regards,
Pavel
Signature · 1 line
People of Russia, stop Putin before his war on Ukraine escalates.
Greg Kroah-Hartman
maintainerPATCH 37/39 video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write
In reply to Greg Kroah-HartmanFrom: Hyunwoo Kim <[email protected]>
[ Upstream commit a09d2d00af53b43c6f11e6ab3cb58443c2cac8a7 ]
In pxa3xx_gcu_write, a count parameter of type size_t is passed to words of type int. Then, copy_from_user() may cause a heap overflow because it is used as the third argument of copy_from_user().
--- drivers/video/fbdev/pxa3xx-gcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/pxa3xx-gcu.c +1 -1
@@ -381,7 +381,7 @@ pxa3xx_gcu_write(struct file *file, const char *buff,struct pxa3xx_gcu_batch *buffer;struct pxa3xx_gcu_priv *priv =to_pxa3xx_gcu_priv (file); -int words = count /4 ; +size_t words = count /4 ;/* Does not need to be atomic. There's a lock in user space, * but anyhow, this is just for statistics. */
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 38/39 cgroup: Add missing cpus_read_lock() to cgroup_attach_task_all()
In reply to Greg Kroah-HartmanFrom: Tetsuo Handa <[email protected]>
commit 43626dade36fa74d3329046f4ae2d7fdefe401c6 upstream.
syzbot is hitting percpu_rwsem_assert_held(&cpu_hotplug_lock) warning at cpuset_attach() [1], for commit 4f7e7236435ca0ab ("cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock") missed that cpuset_attach() is also called from cgroup_attach_task_all(). Add cpus_read_lock() like what cgroup_procs_write_start() does.
--- kernel/cgroup/cgroup-v1.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/cgroup/cgroup-v1.c +2 -0
@@ -57,6 +57,7 @@ int cgroup_attach_task_all(struct task_sint retval =0 ;mutex_lock (&cgroup_mutex); +cpus_read_lock ();percpu_down_write (&cgroup_threadgroup_rwsem);for_each_root (root) {struct cgroup *from_cgrp;
@@ -73,6 +74,7 @@ int cgroup_attach_task_all(struct task_sbreak ; }percpu_up_write (&cgroup_threadgroup_rwsem); +cpus_read_unlock ();mutex_unlock (&cgroup_mutex);return retval;
Greg Kroah-Hartman
maintainerPATCH 39/39 ALSA: hda/sigmatel: Fix unused variable warning for beep power change
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 51bdc8bb82525cd70feb92279c8b7660ad7948dd upstream.
The newly added stac_check_power_status() caused a compile warning when CONFIG_SND_HDA_INPUT_BEEP is disabled. Fix it.
--- sound/pci/hda/patch_sigmatel.c | 2 ++ 1 file changed, 2 insertions(+)
sound/pci/hda/patch_sigmatel.c +2 -0
@@ -4451,7 +4451,9 @@ static int stac_suspend(struct hda_codecstatic int stac_check_power_status (struct hda_codec *codec,hda_nid_t nid) { +#ifdef CONFIG_SND_HDA_INPUT_BEEP struct sigmatel_spec *spec = codec->spec; +#endif int ret =snd_hda_gen_check_power_status (codec, nid);#ifdef CONFIG_SND_HDA_INPUT_BEEP
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 5.10.145 release. There are 39 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-5.10.y
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Quoted 5 lines
This is the start of the stable review cycle for the 5.10.145 release. There are 39 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 9 lines
Responses should be made by Fri, 23 Sep 2022 15:36:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.145-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.
Compiled and booted on x86 and arm64 machines.. No dmesg regressions.
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.145 release. There are 39 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 23 Sep 2022 15:36:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.145-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.145 release. There are 39 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 23 Sep 2022 15:36:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.145-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.145 release. There are 39 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 23 Sep 2022 15:36:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.145-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v5.10:
10 builds: 10 pass, 0 fail
28 boots: 28 pass, 0 fail
75 tests: 75 pass, 0 failLinux version: 5.10.145-rc1-gca8291e3d06f
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Jon
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.145 release. There are 39 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 23 Sep 2022 15:36:33 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.145-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
NOTE:
As we have already reported from the previous stable rc review about the gpiod test runs causing kernel crash on 5.19. 5.15 and 5.10
This is caused by commit 303e6da99429 ("gpio: mockup: remove gpio debugfs when remove device")
Crash log:
---------
+ cd ./automated/linux/gpiod
+ ./gpiod.sh /opt/libgpiod/bin/
[INFO] libgpiod test suite [INFO] 117 tests registered [INFO] checking the linux kernel version [INFO] kernel release is v5.10.145 - ok to run tests [INFO] using gpio-tools from '/usr/bin' [ 12.960531] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000a0 [ 12.961269] Mem abort info: [ 12.961490] ESR = 0x96000006 [ 12.961749] EC = 0x25: DABT (current EL), IL = 32 bits [ 12.962164] SET = 0, FnV = 0 [ 12.962389] EA = 0, S1PTW = 0 [ 12.962652] Data abort info: [ 12.962881] ISV = 0, ISS = 0x00000006 [ 12.963163] CM = 0, WnR = 0 [ 12.963749] user pgtable: 4k pages, 48-bit VAs, pgdp=000000010460c000 [ 12.964233] [00000000000000a0] pgd=0000000104421003, p4d=0000000104421003, pud=00000001045cf003, pmd=0000000000000000 [ 12.965008] Internal error: Oops: 96000006 [#1] PREEMPT SMP [ 12.965413] Modules linked in: gpio_mockup(-) cfg80211 bluetooth rfkill crct10dif_ce drm fuse [ 12.966052] CPU: 3 PID: 369 Comm: gpiod-test Not tainted 5.10.145-rc1 #1 [ 12.966533] Hardware name: linux,dummy-virt (DT) [ 12.966868] pstate: 60400005 (nZCv daif +PAN -UAO -TCO BTYPE=--) [ 12.967317] pc : down_write+0x24/0x70 [ 12.967603] lr : simple_recursive_removal+0x58/0x274
https://lore.kernel.org/lkml/CAMRc=Mc_DkKN0qM9dBj_Pz2LeEhmT29GwmVf0tbunGkaOaYUqA@mail.gmail.com/
## Build
* kernel: 5.10.145-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-5.10.y
* git commit: ca8291e3d06f6d6be2c539455efd2c40cb2bfbab
* git describe: v5.10.144-40-gca8291e3d06f
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.144-40-gca8291e3d06f
## No Test Regressions (compared to v5.10.144)
## No Metric Regressions (compared to v5.10.144)
## No Test Fixes (compared to v5.10.144)
## No Metric Fixes (compared to v5.10.144)
## Test result summary
total: 101642, pass: 89442, fail: 765, skip: 11240, xfail: 195
## Build Summary
* arc: 10 total, 10 passed, 0 failed
* arm: 333 total, 333 passed, 0 failed
* arm64: 65 total, 63 passed, 2 failed
* i386: 55 total, 53 passed, 2 failed
* mips: 56 total, 56 passed, 0 failed
* parisc: 12 total, 12 passed, 0 failed
* powerpc: 60 total, 55 passed, 5 failed
* riscv: 27 total, 27 passed, 0 failed
* s390: 24 total, 24 passed, 0 failed
* sh: 24 total, 24 passed, 0 failed
* sparc: 12 total, 12 passed, 0 failed
* x86_64: 58 total, 56 passed, 2 failed
## Test suites summary
* fwts
* igt-gpu-tools
* kunit
* kvm-unit-tests
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-fsx
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-open-posix-tests
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-syscalls
* ltp-tracing
* network-basic-tests
* rcutorture
* v4l2-compliance
* vdso
--
Linaro LKFT
https://lkft.linaro.org
Hi Greg,
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.145 release. There are 39 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 23 Sep 2022 15:36:33 +0000. Anything received after that time might be too late.
Build test (gcc version 11.3.1 20220919):
mips: 63 configs -> no failure
arm: 104 configs -> no failure
arm64: 3 configs -> no failurex86_64: 4 configs -> no failure alpha allmodconfig -> no failure powerpc allmodconfig -> no failure riscv allmodconfig -> no failure s390 allmodconfig -> no failure xtensa allmodconfig -> no failure
Boot test:x86_64: Booted on my test laptop. No regression.x86_64: Booted on qemu. No regression. [1]
arm64: Booted on rpi4b (4GB model). No regression. [2]
[1]. https://openqa.qa.codethink.co.uk/tests/1875
[2]. https://openqa.qa.codethink.co.uk/tests/1879
--
Regards
Sudip
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.145 release. There are 39 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 23 Sep 2022 15:36:33 +0000. Anything received after that time might be too late.
Build results:
total: 163 pass: 163 fail: 0 Qemu test results: total: 475 pass: 475 fail: 0
Guenter