From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4C2DC32771 for ; Mon, 26 Sep 2022 10:27:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235511AbiIZK1b (ORCPT ); Mon, 26 Sep 2022 06:27:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235698AbiIZKYl (ORCPT ); Mon, 26 Sep 2022 06:24:41 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC2334D829; Mon, 26 Sep 2022 03:18:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8D616B80926; Mon, 26 Sep 2022 10:17:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC904C433D6; Mon, 26 Sep 2022 10:17:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187442; bh=lhoE/cFx/P8/ivf4LvyubzIl1QwD9KbA+ytQn9KVuEY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Tn2UlCQL0SL5oiQkihb9WyBlZJnBT8TpW6ClWt7K+3sKXHLb2vbWHNtihlOR4zJEX EXLh4k3usQfkPf1JcUUK5+uCyiwfqvguTwQwZavQDUQXMublJd0niVMhoMwMfkrYGT uerpEfDyz41hnpFe9Y5mWYQBKhhfyaYuOTdd5ECc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sergey Shtylyov , Rob Herring , Sasha Levin Subject: [PATCH 4.19 01/58] of: fdt: fix off-by-one error in unflatten_dt_nodes() Date: Mon, 26 Sep 2022 12:11:20 +0200 Message-Id: <20220926100741.483470129@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sergey Shtylyov [ 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. Fixes: 78c44d910d3e ("drivers/of: Fix depth when unflattening devicetree") Signed-off-by: Sergey Shtylyov Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/7c354554-006f-6b31-c195-cdfe4caee392@omp.ru Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 9fecac72c358..7c284ca0212c 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -392,7 +392,7 @@ static int unflatten_dt_nodes(const void *blob, for (offset =3D 0; offset >=3D 0 && depth >=3D initial_depth; offset =3D fdt_next_node(blob, offset, &depth)) { - if (WARN_ON_ONCE(depth >=3D FDT_MAX_DEPTH)) + if (WARN_ON_ONCE(depth >=3D FDT_MAX_DEPTH - 1)) continue; =20 if (!IS_ENABLED(CONFIG_OF_KOBJ) && --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE0D5C32771 for ; Mon, 26 Sep 2022 10:28:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235438AbiIZK2Z (ORCPT ); Mon, 26 Sep 2022 06:28:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235383AbiIZKZ5 (ORCPT ); Mon, 26 Sep 2022 06:25:57 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B2E64DB7D; Mon, 26 Sep 2022 03:18:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id B7DDCCE10E9; Mon, 26 Sep 2022 10:17:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CFB8C433D7; Mon, 26 Sep 2022 10:17:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187457; bh=pNuzhfCTMsehQcpcZilCt5LCr5AeCkq+WigML6tM5fg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sa/L2htgcBjpWL20kcDfO/qLiJ2k5f2O72o1DaSczH/knSmnyHLyyaAMYS1griCgd UN16KMXwc5rsp+iAaC3zsAd7ujWqRXMJvPp6+Y9rVLSDqm/DuwWNcP/Ue/pvH+FJab U0BxpB/4+bS0Tdb/KhSFynC5sB5EkCf/2RZdzU2Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 4.19 02/58] gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx Date: Mon, 26 Sep 2022 12:11:21 +0200 Message-Id: <20220926100741.521976547@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pali Roh=C3=A1r [ 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 (mpc8xx= x_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 Fixes: 345e5c8a1cc3 ("powerpc: Add interrupt support to mpc8xxx_gpio") Signed-off-by: Pali Roh=C3=A1r Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/gpio/gpio-mpc8xxx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index 1899d172590b..546f8c453add 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -168,6 +168,7 @@ static int mpc8xxx_irq_set_type(struct irq_data *d, uns= igned int flow_type) =20 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) --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5814C32771 for ; Mon, 26 Sep 2022 10:27:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235451AbiIZK1P (ORCPT ); Mon, 26 Sep 2022 06:27:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235612AbiIZKYY (ORCPT ); Mon, 26 Sep 2022 06:24:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E0AF167E7; Mon, 26 Sep 2022 03:17:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DB063B80835; Mon, 26 Sep 2022 10:17:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42F21C433C1; Mon, 26 Sep 2022 10:17:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187460; bh=sILuuaYyBeePaquCIlj5Gx3I8blekWSyIqEjdryyzRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zUMPkf5yyarh2uUy5W3l/brZ7LhpTBft+7mbjHkU6AYf3R3hBaa3SKOdH8w6guw7g VO4q2wZWJXIR/Y5bWS2pDuUkw//PxIBiVRLGfRDgssPel6c/lz6QyggkUlPm3XtgzM 2JErPKv1qkAOMeUMFDVu1oPt7xQChA0cAUifRUYc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stuart Menefy , Neil Armstrong , Sasha Levin Subject: [PATCH 4.19 03/58] drm/meson: Correct OSD1 global alpha value Date: Mon, 26 Sep 2022 12:11:22 +0200 Message-Id: <20220926100741.557776852@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Stuart Menefy [ 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. Signed-off-by: Stuart Menefy Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller= ") Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220908155103.686904-1= -stuart.menefy@mathembedded.com Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/gpu/drm/meson/meson_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/me= son_plane.c index c7daae53fa1f..26ff2dc56419 100644 --- a/drivers/gpu/drm/meson/meson_plane.c +++ b/drivers/gpu/drm/meson/meson_plane.c @@ -101,7 +101,7 @@ static void meson_plane_atomic_update(struct drm_plane = *plane, =20 /* Enable OSD and BLK0, set max global alpha */ priv->viu.osd1_ctrl_stat =3D OSD_ENABLE | - (0xFF << OSD_GLOBAL_ALPHA_SHIFT) | + (0x100 << OSD_GLOBAL_ALPHA_SHIFT) | OSD_BLK0_ENABLE; =20 /* Set up BLK0 to point to the right canvas */ --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45DA9C6FA83 for ; Mon, 26 Sep 2022 10:29:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235469AbiIZK3i (ORCPT ); Mon, 26 Sep 2022 06:29:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235492AbiIZK1Q (ORCPT ); Mon, 26 Sep 2022 06:27:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F33B213CDA; Mon, 26 Sep 2022 03:18:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3EE78B80918; Mon, 26 Sep 2022 10:17:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73B09C433C1; Mon, 26 Sep 2022 10:17:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187463; bh=y+PRtFkl83ke0GT/qXHOdLqx3No8r0w2wDg24eeFJGU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O9U9qa351lk9LEg/gq6EWBF+Wg3fGXBypI/TpTOLyOkikdzObq/kw5LwEPzFShYre XGbjrl8ThdLwyNl0oy/Ovw7rP0pRVIX9Kyy1uItHpdB8T9pCH70JN4YMvFYmtSSEHm GBgMKM7eewqXJ7IAglRRL/mMT6RDdLmZ3JxZlimA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yang Yingliang , Helge Deller , Sasha Levin Subject: [PATCH 4.19 04/58] parisc: ccio-dma: Add missing iounmap in error path in ccio_probe() Date: Mon, 26 Sep 2022 12:11:23 +0200 Message-Id: <20220926100741.587425413@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Yang Yingliang [ Upstream commit 38238be4e881a5d0abbe4872b4cd6ed790be06c8 ] Add missing iounmap() before return from ccio_probe(), if ccio_init_resourc= es() fails. Fixes: d46c742f827f ("parisc: ccio-dma: Handle kmalloc failure in ccio_init= _resources()") Signed-off-by: Yang Yingliang Signed-off-by: Helge Deller Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/parisc/ccio-dma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 73ee74d6e7a3..2c763f9d75df 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c @@ -1555,6 +1555,7 @@ static int __init ccio_probe(struct parisc_device *de= v) } ccio_ioc_init(ioc); if (ccio_init_resources(ioc)) { + iounmap(ioc->ioc_regs); kfree(ioc); return -ENOMEM; } --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C08FDC07E9D for ; Mon, 26 Sep 2022 10:29:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235599AbiIZK2f (ORCPT ); Mon, 26 Sep 2022 06:28:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235439AbiIZK0q (ORCPT ); Mon, 26 Sep 2022 06:26:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5001E14D0A; Mon, 26 Sep 2022 03:18:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 78E4260BA3; Mon, 26 Sep 2022 10:17:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75375C433C1; Mon, 26 Sep 2022 10:17:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187466; bh=FtrAb8yIhs9plVrTLiCfUdL8komEh3KnF6Xt2WoP/cs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tWRK0WaqKS7dkbawBSMCg+dFUg1Y9O/ZJ5OKuNn+cj+XdmY1fQ7HdC2bXpFdkTm+Z dA+ht0WDNntleigNq9AnDEstpdBbe5j0o68xNQ/uLLhRenAflSlqYEle6DpcdHOS5q 6LQ/cuTn8952cp8RpRsgB/LK/c6pXh0J3rAvjb1Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, James Morse , Sami Tolvanen , Kees Cook , Ard Biesheuvel , Will Deacon , Sasha Levin Subject: [PATCH 4.19 05/58] efi/libstub: Disable Shadow Call Stack Date: Mon, 26 Sep 2022 12:11:24 +0200 Message-Id: <20220926100741.616552937@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sami Tolvanen [ Upstream commit cc49c71d2abe99c1c2c9bedf0693ad2d3ee4a067 ] Shadow stacks are not available in the EFI stub, filter out SCS flags. Suggested-by: James Morse Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Acked-by: Ard Biesheuvel Signed-off-by: Will Deacon Stable-dep-of: 1a3887924a7e ("efi: libstub: Disable struct randomization") Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/firmware/efi/libstub/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/l= ibstub/Makefile index d3777d754984..e0cff3b942ac 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -31,6 +31,9 @@ KBUILD_CFLAGS :=3D $(cflags-y) -DDISABLE_BRANCH_PROFILI= NG \ $(call cc-option,-fno-addrsig) \ -D__DISABLE_EXPORTS =20 +# remove SCS flags from all objects in this directory +KBUILD_CFLAGS :=3D $(filter-out $(CC_FLAGS_SCS), $(KBUILD_CFLAGS)) + GCOV_PROFILE :=3D n KASAN_SANITIZE :=3D n UBSAN_SANITIZE :=3D n --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4979C07E9D for ; Mon, 26 Sep 2022 10:27:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235233AbiIZK1T (ORCPT ); Mon, 26 Sep 2022 06:27:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235657AbiIZKYc (ORCPT ); Mon, 26 Sep 2022 06:24:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 186914D24D; Mon, 26 Sep 2022 03:17:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8427F60BEF; Mon, 26 Sep 2022 10:17:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7DBEDC433C1; Mon, 26 Sep 2022 10:17:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187469; bh=wuZN+QtA4rf6Hs9xjlQ4uC96UOzN/ztHw+3mXvo/XEE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ufri+XmHZKkitq4GBDa6GcYrG33scQr3tNNwjLS95TSE872+Y9SeTTOao93vijS5S GV+JHU3ycUe9MQ6BJs+Vkb/KlmrbI1kPsMrvjcWCO90sXafsw0bTqJvzN5CC4ZcA/X n57juBrGGEdTSI6SKI3uxgrDiCaBcrKVTtBEVgb8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Marth , Ard Biesheuvel , Kees Cook , Sasha Levin Subject: [PATCH 4.19 06/58] efi: libstub: Disable struct randomization Date: Mon, 26 Sep 2022 12:11:25 +0200 Message-Id: <20220926100741.658952661@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Ard Biesheuvel [ Upstream commit 1a3887924a7e6edd331be76da7bf4c1e8eab4b1e ] The EFI stub is a wrapper around the core kernel that makes it look like a EFI compatible PE/COFF application to the EFI firmware. EFI applications run on top of the EFI runtime, which is heavily based on so-called protocols, which are struct types consisting [mostly] of function pointer members that are instantiated and recorded in a protocol database. These structs look like the ideal randomization candidates to the randstruct plugin (as they only carry function pointers), but of course, these protocols are contracts between the firmware that exposes them, and the EFI applications (including our stubbed kernel) that invoke them. This means that struct randomization for EFI protocols is not a great idea, and given that the stub shares very little data with the core kernel that is represented as a randomizable struct, we're better off just disabling it completely here. Cc: # v4.14+ Reported-by: Daniel Marth Tested-by: Daniel Marth Signed-off-by: Ard Biesheuvel Acked-by: Kees Cook Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/firmware/efi/libstub/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/l= ibstub/Makefile index e0cff3b942ac..7fad5d90898b 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -31,6 +31,13 @@ KBUILD_CFLAGS :=3D $(cflags-y) -DDISABLE_BRANCH_PROFIL= ING \ $(call cc-option,-fno-addrsig) \ -D__DISABLE_EXPORTS =20 +# +# struct randomization only makes sense for Linux internal types, which th= e EFI +# stub code never touches, so let's turn off struct randomization for the = stub +# altogether +# +KBUILD_CFLAGS :=3D $(filter-out $(RANDSTRUCT_CFLAGS), $(KBUILD_CFLAGS)) + # remove SCS flags from all objects in this directory KBUILD_CFLAGS :=3D $(filter-out $(CC_FLAGS_SCS), $(KBUILD_CFLAGS)) =20 --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 936ECC07E9D for ; Mon, 26 Sep 2022 10:27:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235332AbiIZK1k (ORCPT ); Mon, 26 Sep 2022 06:27:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235709AbiIZKYo (ORCPT ); Mon, 26 Sep 2022 06:24:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D25A914D21; Mon, 26 Sep 2022 03:18:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 97B5660BB7; Mon, 26 Sep 2022 10:17:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90EBDC433C1; Mon, 26 Sep 2022 10:17:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187473; bh=txTZLVjtLQkcTi+soDlGB8fViSjcCVpczDKhYZmxGqk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vpFBRUlSW8PLLuVwXJSNyZrJ5+qTPF9wjyzjPZWr3jpGFBwANRdrb5TIwdP0KUk/z XTY3pxYKGLzCPggOclmN2iSfPk4kjLsmA+nS8NjFK79WW/ToOg4J6vZLNqJ18+qSdJ 8u0q663qvKIZWgGpAVPVSzOM6IwGXp9+f0H1DmNA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bart Van Assche , Christoph Hellwig , Sasha Levin Subject: [PATCH 4.19 07/58] nvmet: fix a use-after-free Date: Mon, 26 Sep 2022 12:11:26 +0200 Message-Id: <20220926100741.687815267@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bart Van Assche [ Upstream commit 6a02a61e81c231cc5c680c5dbf8665275147ac52 ] Fix the following use-after-free complaint triggered by blktests nvme/004: BUG: KASAN: user-memory-access in blk_mq_complete_request_remote+0xac/0x350 Read of size 4 at addr 0000607bd1835943 by task kworker/13:1/460 Workqueue: nvmet-wq nvme_loop_execute_work [nvme_loop] Call Trace: show_stack+0x52/0x58 dump_stack_lvl+0x49/0x5e print_report.cold+0x36/0x1e2 kasan_report+0xb9/0xf0 __asan_load4+0x6b/0x80 blk_mq_complete_request_remote+0xac/0x350 nvme_loop_queue_response+0x1df/0x275 [nvme_loop] __nvmet_req_complete+0x132/0x4f0 [nvmet] nvmet_req_complete+0x15/0x40 [nvmet] nvmet_execute_io_connect+0x18a/0x1f0 [nvmet] nvme_loop_execute_work+0x20/0x30 [nvme_loop] process_one_work+0x56e/0xa70 worker_thread+0x2d1/0x640 kthread+0x183/0x1c0 ret_from_fork+0x1f/0x30 Cc: stable@vger.kernel.org Fixes: a07b4970f464 ("nvmet: add a generic NVMe target") Signed-off-by: Bart Van Assche Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/nvme/target/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index 1a35d73c39c3..80b5aae1bdc9 100644 --- a/drivers/nvme/target/core.c +++ b/drivers/nvme/target/core.c @@ -504,6 +504,7 @@ static void __nvmet_req_complete(struct nvmet_req *req,= u16 status) { u32 old_sqhd, new_sqhd; u16 sqhd; + struct nvmet_ns *ns =3D req->ns; =20 if (status) nvmet_set_status(req, status); @@ -520,9 +521,9 @@ static void __nvmet_req_complete(struct nvmet_req *req,= u16 status) req->rsp->sq_id =3D cpu_to_le16(req->sq->qid); req->rsp->command_id =3D req->cmd->common.command_id; =20 - if (req->ns) - nvmet_put_namespace(req->ns); req->ops->queue_response(req); + if (ns) + nvmet_put_namespace(ns); } =20 void nvmet_req_complete(struct nvmet_req *req, u16 status) --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43D74C6FA83 for ; Mon, 26 Sep 2022 10:27:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235215AbiIZK1Y (ORCPT ); Mon, 26 Sep 2022 06:27:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235665AbiIZKYe (ORCPT ); Mon, 26 Sep 2022 06:24:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B59C4DB46; Mon, 26 Sep 2022 03:18:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 748D7B80936; Mon, 26 Sep 2022 10:17:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B943AC4314B; Mon, 26 Sep 2022 10:17:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187476; bh=aPkn8qEGPPOgAxRGlG5ronfsQ/tTwSJPOGcRU1zvwQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CQdPAcywrsGTfWUAMNjGjchsHWhdlBssYxMCKsHIgSMu4vb87kiAj0sdG5RMDVONz MD34U5NlxB+DG3lNXKnGTiJv8RFZmUsSOE1D4r0byRKKLe4jMwZjwCUj+8O1lSWfmL WelIuI0/m4mHYFSlvlbdAkfO9pPPlc7Kyl6r6IN4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "David S. Miller" , Maxime Chevallier , Nick Desaulniers , Nathan Huckleberry , netdev@vger.kernel.org, Sasha Levin Subject: [PATCH 4.19 08/58] mvpp2: no need to check return value of debugfs_create functions Date: Mon, 26 Sep 2022 12:11:27 +0200 Message-Id: <20220926100741.719639256@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Greg Kroah-Hartman [ Upstream commit e6882aa623f6fe0d80fa82ebf3ee78c353bffbe1 ] When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: "David S. Miller" Cc: Maxime Chevallier Cc: Nick Desaulniers Cc: Nathan Huckleberry Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: David S. Miller Stable-dep-of: fe2c9c61f668 ("net: mvpp2: debugfs: fix memory leak when usi= ng debugfs_lookup()") Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- .../ethernet/marvell/mvpp2/mvpp2_debugfs.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c b/drivers/n= et/ethernet/marvell/mvpp2/mvpp2_debugfs.c index f9744a61e5dd..87d9cbe10cec 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c @@ -484,8 +484,6 @@ static int mvpp2_dbgfs_flow_port_init(struct dentry *pa= rent, struct dentry *port_dir; =20 port_dir =3D debugfs_create_dir(port->dev->name, parent); - if (IS_ERR(port_dir)) - return PTR_ERR(port_dir); =20 /* This will be freed by 'hash_opts' release op */ port_entry =3D kmalloc(sizeof(*port_entry), GFP_KERNEL); @@ -515,8 +513,6 @@ static int mvpp2_dbgfs_flow_entry_init(struct dentry *p= arent, sprintf(flow_entry_name, "%02d", flow); =20 flow_entry_dir =3D debugfs_create_dir(flow_entry_name, parent); - if (!flow_entry_dir) - return -ENOMEM; =20 /* This will be freed by 'type' release op */ entry =3D kmalloc(sizeof(*entry), GFP_KERNEL); @@ -554,8 +550,6 @@ static int mvpp2_dbgfs_flow_init(struct dentry *parent,= struct mvpp2 *priv) int i, ret; =20 flow_dir =3D debugfs_create_dir("flows", parent); - if (!flow_dir) - return -ENOMEM; =20 for (i =3D 0; i < MVPP2_N_FLOWS; i++) { ret =3D mvpp2_dbgfs_flow_entry_init(flow_dir, priv, i); @@ -579,8 +573,6 @@ static int mvpp2_dbgfs_prs_entry_init(struct dentry *pa= rent, sprintf(prs_entry_name, "%03d", tid); =20 prs_entry_dir =3D debugfs_create_dir(prs_entry_name, parent); - if (!prs_entry_dir) - return -ENOMEM; =20 /* The 'valid' entry's ops will free that */ entry =3D kmalloc(sizeof(*entry), GFP_KERNEL); @@ -618,8 +610,6 @@ static int mvpp2_dbgfs_prs_init(struct dentry *parent, = struct mvpp2 *priv) int i, ret; =20 prs_dir =3D debugfs_create_dir("parser", parent); - if (!prs_dir) - return -ENOMEM; =20 for (i =3D 0; i < MVPP2_PRS_TCAM_SRAM_SIZE; i++) { ret =3D mvpp2_dbgfs_prs_entry_init(prs_dir, priv, i); @@ -636,8 +626,6 @@ static int mvpp2_dbgfs_port_init(struct dentry *parent, struct dentry *port_dir; =20 port_dir =3D debugfs_create_dir(port->dev->name, parent); - if (IS_ERR(port_dir)) - return PTR_ERR(port_dir); =20 debugfs_create_file("parser_entries", 0444, port_dir, port, &mvpp2_dbgfs_port_parser_fops); @@ -671,15 +659,10 @@ void mvpp2_dbgfs_init(struct mvpp2 *priv, const char = *name) int ret, i; =20 mvpp2_root =3D debugfs_lookup(MVPP2_DRIVER_NAME, NULL); - if (!mvpp2_root) { + if (!mvpp2_root) mvpp2_root =3D debugfs_create_dir(MVPP2_DRIVER_NAME, NULL); - if (IS_ERR(mvpp2_root)) - return; - } =20 mvpp2_dir =3D debugfs_create_dir(name, mvpp2_root); - if (IS_ERR(mvpp2_dir)) - return; =20 priv->dbgfs_dir =3D mvpp2_dir; =20 --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8DF4C32771 for ; Mon, 26 Sep 2022 10:27:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235504AbiIZK11 (ORCPT ); Mon, 26 Sep 2022 06:27:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235675AbiIZKYg (ORCPT ); Mon, 26 Sep 2022 06:24:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73C294D27E; Mon, 26 Sep 2022 03:18:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8496EB80930; Mon, 26 Sep 2022 10:18:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA212C433D7; Mon, 26 Sep 2022 10:17:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187479; bh=0D4Q9fdkdNqRsgQXEkbD9sdW2pAZmHjPrqk4lVtgJjA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M1EK9UxRtX6jc8z3AGHBSe6U3/xnlnaQzFvUmbapWo8eWQ60DY7RF6xZr4HfSvCmf zqlCdQpcSi1h3oq8LAfKrGvcrbXssH1ZnzKHetWZtYYK4KrbSov2wI7HwKq6Zw0W1S QXjAeDvTwP74zfId+AX9nKvsce5LZc7YzzGPouyo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Metzmacher , Ronnie Sahlberg , "Paulo Alcantara (SUSE)" , Steve French Subject: [PATCH 4.19 09/58] cifs: dont send down the destination address to sendmsg for a SOCK_STREAM Date: Mon, 26 Sep 2022 12:11:28 +0200 Message-Id: <20220926100741.748856850@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Stefan Metzmacher commit 17d3df38dc5f4cec9b0ac6eb79c1859b6e2693a4 upstream. This is ignored anyway by the tcp layer. Signed-off-by: Stefan Metzmacher Cc: stable@vger.kernel.org Reviewed-by: Ronnie Sahlberg Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- fs/cifs/transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -168,8 +168,8 @@ smb_send_kvec(struct TCP_Server_Info *se =20 *sent =3D 0; =20 - smb_msg->msg_name =3D (struct sockaddr *) &server->dstaddr; - smb_msg->msg_namelen =3D sizeof(struct sockaddr); + smb_msg->msg_name =3D NULL; + smb_msg->msg_namelen =3D 0; smb_msg->msg_control =3D NULL; smb_msg->msg_controllen =3D 0; if (server->noblocksnd) From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4985C32771 for ; Mon, 26 Sep 2022 10:27:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235343AbiIZK1o (ORCPT ); Mon, 26 Sep 2022 06:27:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235714AbiIZKYp (ORCPT ); Mon, 26 Sep 2022 06:24:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40AC0371B3; Mon, 26 Sep 2022 03:18:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C309D60B60; Mon, 26 Sep 2022 10:17:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5A18C433C1; Mon, 26 Sep 2022 10:17:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187445; bh=oswuXUCnFjHVcKw+wxwzOiR+vkx4YuqAA2bEkEOiIso=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UnzICSo6/5GH3PQ6HYlVmDAJMg7dz5YBajqE3t03bRMofgbH3fOgS+qi1jBhQvOFr pBpM9b2aNFAkV9eFvXkQTtBijN+z1hOJm9Xaz0YOLiF4Q8t0hd3W+cR21JCk6gdRuK rrobLepVvofFneXUsSZp008EPSCAmDBwjkc8ltdY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai , Mark Brown , Sasha Levin Subject: [PATCH 4.19 10/58] ASoC: nau8824: Fix semaphore unbalance at error paths Date: Mon, 26 Sep 2022 12:11:29 +0200 Message-Id: <20220926100741.777723995@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Takashi Iwai [ 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. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20220823081000.2965-3-tiwai@suse.de Signed-off-by: Mark Brown Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- sound/soc/codecs/nau8824.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c index 4af87340b165..4f18bb272e92 100644 --- a/sound/soc/codecs/nau8824.c +++ b/sound/soc/codecs/nau8824.c @@ -1075,6 +1075,7 @@ static int nau8824_hw_params(struct snd_pcm_substream= *substream, struct snd_soc_component *component =3D dai->component; struct nau8824 *nau8824 =3D snd_soc_component_get_drvdata(component); unsigned int val_len =3D 0, osr, ctrl_val, bclk_fs, bclk_div; + int err =3D -EINVAL; =20 nau8824_sema_acquire(nau8824, HZ); =20 @@ -1091,7 +1092,7 @@ static int nau8824_hw_params(struct snd_pcm_substream= *substream, osr &=3D 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); @@ -1101,7 +1102,7 @@ static int nau8824_hw_params(struct snd_pcm_substream= *substream, osr &=3D 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); @@ -1122,7 +1123,7 @@ static int nau8824_hw_params(struct snd_pcm_substream= *substream, else if (bclk_fs <=3D 256) bclk_div =3D 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, @@ -1143,15 +1144,17 @@ static int nau8824_hw_params(struct snd_pcm_substre= am *substream, val_len |=3D NAU8824_I2S_DL_32; break; default: - return -EINVAL; + goto error; } =20 regmap_update_bits(nau8824->regmap, NAU8824_REG_PORT0_I2S_PCM_CTRL_1, NAU8824_I2S_DL_MASK, val_len); + err =3D 0; =20 + error: nau8824_sema_release(nau8824); =20 - return 0; + return err; } =20 static int nau8824_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) @@ -1160,8 +1163,6 @@ static int nau8824_set_fmt(struct snd_soc_dai *dai, u= nsigned int fmt) struct nau8824 *nau8824 =3D snd_soc_component_get_drvdata(component); unsigned int ctrl1_val =3D 0, ctrl2_val =3D 0; =20 - nau8824_sema_acquire(nau8824, HZ); - switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: ctrl2_val |=3D NAU8824_I2S_MS_MASTER; @@ -1203,6 +1204,8 @@ static int nau8824_set_fmt(struct snd_soc_dai *dai, u= nsigned int fmt) return -EINVAL; } =20 + 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); --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CD27C32771 for ; Mon, 26 Sep 2022 10:28:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235371AbiIZK2E (ORCPT ); Mon, 26 Sep 2022 06:28:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235740AbiIZKYw (ORCPT ); Mon, 26 Sep 2022 06:24:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4097FE034; Mon, 26 Sep 2022 03:18:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E727060AF0; Mon, 26 Sep 2022 10:17:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD9EBC433D7; Mon, 26 Sep 2022 10:17:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187448; bh=r8IED6lFpJpupHedByKgtomyHTVDFLhpVTD7qB0qhe0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sodKVq9DgNDHnOOr7WAjKzoQj1UZegJEUJvvPM7ZystfZctF4RZR4o+TRTSl0oGGZ 55tOFpiySYEn1FQVOVe6u3CtOYjnl5t6anTgWsWceYwY2afTWvlOMhqpMxnZzXmkYk 00/88hbkC2hMr5MietEsrVIbgHa41woPsmTboGuA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xiaolei Wang , Mark Brown , Sasha Levin Subject: [PATCH 4.19 11/58] regulator: pfuze100: Fix the global-out-of-bounds access in pfuze100_regulator_probe() Date: Mon, 26 Sep 2022 12:11:30 +0200 Message-Id: <20220926100741.816304962@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Xiaolei Wang [ 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. Signed-off-by: Xiaolei Wang Link: https://lore.kernel.org/r/20220825111922.1368055-1-xiaolei.wang@windr= iver.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/regulator/pfuze100-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfu= ze100-regulator.c index 8b1940110561..b1d73a6c7809 100644 --- a/drivers/regulator/pfuze100-regulator.c +++ b/drivers/regulator/pfuze100-regulator.c @@ -710,7 +710,7 @@ static int pfuze100_regulator_probe(struct i2c_client *= client, ((pfuze_chip->chip_id =3D=3D PFUZE3000) ? "3000" : "3001")))); =20 memcpy(pfuze_chip->regulator_descs, pfuze_chip->pfuze_regulators, - sizeof(pfuze_chip->regulator_descs)); + regulator_num * sizeof(struct pfuze_regulator)); =20 ret =3D pfuze_parse_regulators_dt(pfuze_chip); if (ret) --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52BD3C6FA83 for ; Mon, 26 Sep 2022 10:27:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235525AbiIZK1f (ORCPT ); Mon, 26 Sep 2022 06:27:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235700AbiIZKYm (ORCPT ); Mon, 26 Sep 2022 06:24:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 272A837F93; Mon, 26 Sep 2022 03:18:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0B84660BBF; Mon, 26 Sep 2022 10:17:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF6BEC433D7; Mon, 26 Sep 2022 10:17:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187451; bh=KNRkChDz/lxghQSg1o/o/sFxhP3xl2eP6X2+b6fcYQs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PKs2793nydi5PXjtrlgaVNHBTFwShcYcNAEh5+e/yhz9HvT81sDVnV6ZWTChJKEuW oTjD/hgXn+wVv6UCDQQsSy/HcOoNzky7RQUKa6taIjAFBU4GpCDfgodhmLeOXqe7RN OU16bwmhsq1v62YiEJVzn7OuXhxyXC+eNluHccJ8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Howells , Sasha Levin Subject: [PATCH 4.19 12/58] rxrpc: Fix local destruction being repeated Date: Mon, 26 Sep 2022 12:11:31 +0200 Message-Id: <20220926100741.855339878@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: David Howells [ 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. Signed-off-by: David Howells Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- net/rxrpc/local_object.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c index fe190a691872..5a01479aae3f 100644 --- a/net/rxrpc/local_object.c +++ b/net/rxrpc/local_object.c @@ -452,6 +452,9 @@ static void rxrpc_local_processor(struct work_struct *w= ork) container_of(work, struct rxrpc_local, processor); bool again; =20 + if (local->dead) + return; + trace_rxrpc_local(local->debug_id, rxrpc_local_processing, atomic_read(&local->usage), NULL); =20 --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A629BC07E9D for ; Mon, 26 Sep 2022 10:27:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235401AbiIZK1L (ORCPT ); Mon, 26 Sep 2022 06:27:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235598AbiIZKYW (ORCPT ); Mon, 26 Sep 2022 06:24:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 785854D4F2; Mon, 26 Sep 2022 03:17:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 182EA60B7E; Mon, 26 Sep 2022 10:17:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CB43C433D6; Mon, 26 Sep 2022 10:17:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187454; bh=6AUgvhBWZ4qO//g19Nt+ah5iKNNnDXtGxjr6VosGyaU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yeNjtZn+0G48XGu/nvVto/1IQZFU8fGZSZduf9SxKw+qDdgSvgSaZj3UVC7kEJn14 3Gkhnm7wAuZMFjpqFLVHHG34diD5zgmVzMS0ZmyFYDXIsQRaS9gMYHE09z82/X6GFr XTCr5/bpboHZmFXG0dd1rfdDCJaTHDLFcn07msD0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai , Sasha Levin Subject: [PATCH 4.19 13/58] ALSA: hda/sigmatel: Keep power up while beep is enabled Date: Mon, 26 Sep 2022 12:11:32 +0200 Message-Id: <20220926100741.895021418@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Takashi Iwai [ 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. Link: https://bugzilla.suse.com/show_bug.cgi?id=3D1200544 Link: https://lore.kernel.org/r/20220904072750.26164-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- sound/pci/hda/patch_sigmatel.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 85c33f528d7b..2f6e4e3afd8f 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -222,6 +222,7 @@ struct sigmatel_spec { =20 /* beep widgets */ hda_nid_t anabeep_nid; + bool beep_power_on; =20 /* SPDIF-out mux */ const char * const *spdif_labels; @@ -4463,6 +4464,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 =3D codec->spec; + int ret =3D snd_hda_gen_check_power_status(codec, nid); + +#ifdef CONFIG_SND_HDA_INPUT_BEEP + if (nid =3D=3D spec->gen.beep_nid && codec->beep) { + if (codec->beep->enabled !=3D spec->beep_power_on) { + spec->beep_power_on =3D codec->beep->enabled; + if (spec->beep_power_on) + snd_hda_power_up_pm(codec); + else + snd_hda_power_down_pm(codec); + } + ret |=3D spec->beep_power_on; + } +#endif + return ret; +} #else #define stac_suspend NULL #endif /* CONFIG_PM */ @@ -4475,6 +4496,7 @@ static const struct hda_codec_ops stac_patch_ops =3D { .unsol_event =3D snd_hda_jack_unsol_event, #ifdef CONFIG_PM .suspend =3D stac_suspend, + .check_power_status =3D stac_check_power_status, #endif .reboot_notify =3D stac_shutup, }; --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95471C07E9D for ; Mon, 26 Sep 2022 10:32:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235828AbiIZKch (ORCPT ); Mon, 26 Sep 2022 06:32:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235773AbiIZKag (ORCPT ); Mon, 26 Sep 2022 06:30:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E364ADF61; Mon, 26 Sep 2022 03:19:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C7C2E60C07; Mon, 26 Sep 2022 10:19:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B987FC43146; Mon, 26 Sep 2022 10:19:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187587; bh=R5Bn477bVVRPSmJmF1aosESqHyeq1GQzzLkUmsLNKRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gjYhi00TwuEObrIF2UdmoMdK2KiN2frKAw33gsBG95OH7c4LpmbWn+m8gcML7oNUO HRe3g22FLrMriMVr8eY/FihJvmGUfSC1Dfhz+nzPied6KSqOgzNq1ZrZ/rHj9Ny/1H aloTv9DJDbhY7N7aqAzWOO4kJweFx+aXcv0iwLp0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "jerry.meng" , =?UTF-8?q?Bj=C3=B8rn=20Mork?= , Paolo Abeni , Sasha Levin Subject: [PATCH 4.19 14/58] net: usb: qmi_wwan: add Quectel RM520N Date: Mon, 26 Sep 2022 12:11:33 +0200 Message-Id: <20220926100741.941262829@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: jerry.meng [ Upstream commit e1091e226a2bab4ded1fe26efba2aee1aab06450 ] add support for Quectel RM520N which is based on Qualcomm SDX62 chip. 0x0801: DIAG + NMEA + AT + MODEM + RMNET T: Bus=3D03 Lev=3D01 Prnt=3D01 Port=3D01 Cnt=3D02 Dev#=3D 10 Spd=3D480 Mx= Ch=3D 0 D: Ver=3D 2.10 Cls=3D00(>ifc ) Sub=3D00 Prot=3D00 MxPS=3D64 #Cfgs=3D 1 P: Vendor=3D2c7c ProdID=3D0801 Rev=3D 5.04 S: Manufacturer=3DQuectel S: Product=3DRM520N-GL S: SerialNumber=3D384af524 C:* #Ifs=3D 5 Cfg#=3D 1 Atr=3Da0 MxPwr=3D500mA I:* If#=3D 0 Alt=3D 0 #EPs=3D 2 Cls=3Dff(vend.) Sub=3Dff Prot=3D30 Driver= =3Doption E: Ad=3D01(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D81(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms I:* If#=3D 1 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3D00 Prot=3D40 Driver= =3Doption E: Ad=3D83(I) Atr=3D03(Int.) MxPS=3D 10 Ivl=3D32ms E: Ad=3D82(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D02(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms I:* If#=3D 2 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3D00 Prot=3D00 Driver= =3Doption E: Ad=3D85(I) Atr=3D03(Int.) MxPS=3D 10 Ivl=3D32ms E: Ad=3D84(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D03(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms I:* If#=3D 3 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3D00 Prot=3D00 Driver= =3Doption E: Ad=3D87(I) Atr=3D03(Int.) MxPS=3D 10 Ivl=3D32ms E: Ad=3D86(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D04(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms I:* If#=3D 4 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3Dff Prot=3Dff Driver= =3Dqmi_wwan E: Ad=3D88(I) Atr=3D03(Int.) MxPS=3D 8 Ivl=3D32ms E: Ad=3D8e(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D0f(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms Signed-off-by: jerry.meng Acked-by: Bj=C3=B8rn Mork Link: https://lore.kernel.org/r/tencent_E50CA8A206904897C2D20DDAE90731183C0= 5@qq.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index fcf21a1ca776..8d10c29ba176 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -1049,6 +1049,7 @@ static const struct usb_device_id products[] =3D { {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 */ =20 /* 3. Combined interface devices matching on interface number */ {QMI_FIXED_INTF(0x0408, 0xea42, 4)}, /* Yota / Megafon M100-1 */ --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1528DC6FA83 for ; Mon, 26 Sep 2022 10:29:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233390AbiIZK3w (ORCPT ); Mon, 26 Sep 2022 06:29:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235324AbiIZK1j (ORCPT ); Mon, 26 Sep 2022 06:27:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C23283FA2A; Mon, 26 Sep 2022 03:18:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0FD95B8092B; Mon, 26 Sep 2022 10:18:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45454C433C1; Mon, 26 Sep 2022 10:18:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187485; bh=cX9DpuILtcyvcTNfYjew5RcGHztZW3T8ELhg2m/JgvU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BXXHJx70afhgGTpeSPaCt4P6GlKme1ZzPn+1bDAtmmWAuyuAnFCwFV/9DL8BetyI3 wfNGSXxcH9RKNdQmvTd2BLscPIxhal+V8S2jVCcCCfEpo5ghdfZisyPFf3hxc7EwUx wmuHXXg+Mbk2GQadfYkHCaHTcnowxMGtuUkHk3/o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Sverdlin , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 4.19 15/58] MIPS: OCTEON: irq: Fix octeon_irq_force_ciu_mapping() Date: Mon, 26 Sep 2022 12:11:34 +0200 Message-Id: <20220926100741.980555143@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Alexander Sverdlin [ 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_associa= te+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: [] show_stack+0x9c/0x130 [] dump_stack+0x90/0xd0 [] __warn+0x118/0x130 [] warn_slowpath_fmt+0x4c/0x70 [] irq_domain_associate+0x298/0x2e8 [] octeon_irq_init_ciu+0x4c8/0x53c [] of_irq_init+0x1e0/0x388 [] init_IRQ+0x4c/0xf4 [] start_kernel+0x404/0x698 Use irq_alloc_desc_at() to avoid the above problem. Signed-off-by: Alexander Sverdlin Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- arch/mips/cavium-octeon/octeon-irq.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon= /octeon-irq.c index 43e4fc1b373c..3e5cf5515c01 100644 --- a/arch/mips/cavium-octeon/octeon-irq.c +++ b/arch/mips/cavium-octeon/octeon-irq.c @@ -127,6 +127,16 @@ static void octeon_irq_free_cd(struct irq_domain *d, u= nsigned 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 =3D irq_domain_get_of_node(domain); + if (!of_node) + return -EINVAL; + ret =3D 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); } =20 --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5BFCC6FA95 for ; Mon, 26 Sep 2022 10:30:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235644AbiIZKaK (ORCPT ); Mon, 26 Sep 2022 06:30:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235352AbiIZK1r (ORCPT ); Mon, 26 Sep 2022 06:27:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 529A24DF1F; Mon, 26 Sep 2022 03:18:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 52823B8093B; Mon, 26 Sep 2022 10:18:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88813C433D6; Mon, 26 Sep 2022 10:18:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187519; bh=4rwkvD/DNcjNXfcsWGkTsOeqnSDE+8I7hUNF1BK6CT8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=utQ1AlSFcPw0HyY7HPmnQYcV1Q4ZHQRlGk5ZoQFFt8KK/Vj9zrMRij4ltMtpJ1jlm sLei4jx2w16w7WHg5GHD3sjfmZBGDrfR81X+diIzk4JwJTbDh8TbCaidKPrJmLQKR9 w17hYyQCX+ezWohxCBL7cmebZCdIExU3DZV6Tf+U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Youling Tang , Masahiro Yamada , Sasha Levin Subject: [PATCH 4.19 16/58] mksysmap: Fix the mismatch of L0 symbols in System.map Date: Mon, 26 Sep 2022 12:11:35 +0200 Message-Id: <20220926100742.028511893@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Youling Tang [ 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. Signed-off-by: Youling Tang Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- scripts/mksysmap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mksysmap b/scripts/mksysmap index 9aa23d15862a..ad8bbc52267d 100755 --- a/scripts/mksysmap +++ b/scripts/mksysmap @@ -41,4 +41,4 @@ # so we just ignore them to let readprofile continue to work. # (At least sparc64 has __crc_ in the middle). =20 -$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)' > $2 +$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)\|\( = L0\)' > $2 --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C717DC32771 for ; Mon, 26 Sep 2022 10:31:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235684AbiIZKbx (ORCPT ); Mon, 26 Sep 2022 06:31:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235849AbiIZK3Y (ORCPT ); Mon, 26 Sep 2022 06:29:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B60A146215; Mon, 26 Sep 2022 03:19:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4193EB80835; Mon, 26 Sep 2022 10:19:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5660CC433C1; Mon, 26 Sep 2022 10:19:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187553; bh=9BkiyLBsVzXzC2PyiRUjj1lfylL5hzUuyzqnpUyygY8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EN0lLV9nU0beqZaC7GHnqply8jfrCem3YhRDsv+E8c2B38GoniwHuOn73CMp490zi YKdiYNrXBTW1atkJiUV4Xuo85bjcngzhIG3NPR9AUMEb7mTivHlSr5yw4cj1EujjX7 bikASeEA9I6PVm0zOjbeGyWuxOsPF6Mrugc4qOFQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hyunwoo Kim , Helge Deller , Sasha Levin Subject: [PATCH 4.19 17/58] video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write Date: Mon, 26 Sep 2022 12:11:36 +0200 Message-Id: <20220926100742.062048441@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Hyunwoo Kim [ 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 u= sed as the third argument of copy_from_user(). Signed-off-by: Hyunwoo Kim Signed-off-by: Helge Deller Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/video/fbdev/pxa3xx-gcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/pxa3xx-gcu.c b/drivers/video/fbdev/pxa3xx-= gcu.c index 43695a33f062..aec0b85db5bf 100644 --- a/drivers/video/fbdev/pxa3xx-gcu.c +++ b/drivers/video/fbdev/pxa3xx-gcu.c @@ -394,7 +394,7 @@ pxa3xx_gcu_write(struct file *file, const char *buff, struct pxa3xx_gcu_batch *buffer; struct pxa3xx_gcu_priv *priv =3D to_pxa3xx_gcu_priv(file); =20 - int words =3D count / 4; + size_t words =3D count / 4; =20 /* Does not need to be atomic. There's a lock in user space, * but anyhow, this is just for statistics. */ --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12D17C32771 for ; Mon, 26 Sep 2022 10:32:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235803AbiIZKcM (ORCPT ); Mon, 26 Sep 2022 06:32:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235888AbiIZK3a (ORCPT ); Mon, 26 Sep 2022 06:29:30 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E2042BB; Mon, 26 Sep 2022 03:19:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9A0DBB80924; Mon, 26 Sep 2022 10:19:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFF58C433C1; Mon, 26 Sep 2022 10:19:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187568; bh=cdHcAB4/dis4RO+D6MmA8ltr6MyAr4cUR1crfy3Nswo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rrJaCzpKMFFJcXSAA8QrNNViMQLWqo7o3JC5xLD+4xSzbWHYqA2w5rxaj5PusWQif kFxI1ePH8AKpn+TzNVpeCfM4kgvAyRc0cEIW/LeIoTbEGPr6UJRK8zvgD20yxqN6aj N2Um/SiNwZxYLl2PILWWGLHKfOyZBTyUrb0CJ30c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Takashi Iwai Subject: [PATCH 4.19 18/58] ALSA: hda/sigmatel: Fix unused variable warning for beep power change Date: Mon, 26 Sep 2022 12:11:37 +0200 Message-Id: <20220926100742.105349650@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Takashi Iwai commit 51bdc8bb82525cd70feb92279c8b7660ad7948dd upstream. The newly added stac_check_power_status() caused a compile warning when CONFIG_SND_HDA_INPUT_BEEP is disabled. Fix it. Fixes: 414d38ba8710 ("ALSA: hda/sigmatel: Keep power up while beep is enabl= ed") Reported-by: kernel test robot Link: https://lore.kernel.org/r/20220905130630.2845-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- sound/pci/hda/patch_sigmatel.c | 2 ++ 1 file changed, 2 insertions(+) --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -4467,7 +4467,9 @@ static int stac_suspend(struct hda_codec =20 static int stac_check_power_status(struct hda_codec *codec, hda_nid_t nid) { +#ifdef CONFIG_SND_HDA_INPUT_BEEP struct sigmatel_spec *spec =3D codec->spec; +#endif int ret =3D snd_hda_gen_check_power_status(codec, nid); =20 #ifdef CONFIG_SND_HDA_INPUT_BEEP From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5710C32771 for ; Mon, 26 Sep 2022 10:32:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235787AbiIZKcF (ORCPT ); Mon, 26 Sep 2022 06:32:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235871AbiIZK31 (ORCPT ); Mon, 26 Sep 2022 06:29:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2FE1A4; Mon, 26 Sep 2022 03:19:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E39D9B80918; Mon, 26 Sep 2022 10:19:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30F93C433C1; Mon, 26 Sep 2022 10:19:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187571; bh=cunuopUqk2Evaz2JERyZfUP05fYhKKKEXN2E3X1JHFY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kr4Ns4v2SLnWI6Umz2tlWuV6NhxULkIuUHgmiSyHgdTsL/fjQfC8wLvUyD7rb6mtT it+rVRFVzqcjloV125aS04jlpiYNnrWtf17hQ3aSIKvZ0hhXtv/7gDntkesstqjA77 kgT+B8pc91pwTjdB8Lv9rw9Y3IC3kegak+HkWbls= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Felipe Balbi , Sasha Levin Subject: [PATCH 4.19 19/58] usb: dwc3: pci: Add Support for Intel Elkhart Lake Devices Date: Mon, 26 Sep 2022 12:11:38 +0200 Message-Id: <20220926100742.142523645@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Felipe Balbi [ Upstream commit dbb0569de852fb4576d6f62078d515f989a181ca ] This patch simply adds a new PCI Device ID Signed-off-by: Felipe Balbi Stable-dep-of: bad0d1d726ac ("usb: dwc3: pci: Add support for Intel Raptor = Lake") Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/usb/dwc3/dwc3-pci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 527938eee846..5d5166373aa1 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c @@ -36,6 +36,7 @@ #define PCI_DEVICE_ID_INTEL_CNPH 0xa36e #define PCI_DEVICE_ID_INTEL_CNPV 0xa3b0 #define PCI_DEVICE_ID_INTEL_ICLLP 0x34ee +#define PCI_DEVICE_ID_INTEL_EHLLP 0x4b7e =20 #define PCI_INTEL_BXT_DSM_GUID "732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511" #define PCI_INTEL_BXT_FUNC_PMU_PWR 4 @@ -351,6 +352,9 @@ static const struct pci_device_id dwc3_pci_id_table[] = =3D { { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICLLP), (kernel_ulong_t) &dwc3_pci_intel_properties, }, =20 + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_EHLLP), + (kernel_ulong_t) &dwc3_pci_intel_properties, }, + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_NL_USB), (kernel_ulong_t) &dwc3_pci_amd_properties, }, { } /* Terminating Entry */ --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CA9AC32771 for ; Mon, 26 Sep 2022 10:32:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235795AbiIZKcK (ORCPT ); Mon, 26 Sep 2022 06:32:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235877AbiIZK33 (ORCPT ); Mon, 26 Sep 2022 06:29:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D86B0D118; Mon, 26 Sep 2022 03:19:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5163760687; Mon, 26 Sep 2022 10:19:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41E79C433C1; Mon, 26 Sep 2022 10:19:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187574; bh=0mJTwtfsM3JU847gcuOVwTHGzf5FOEHdXTIF2GM5PXc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U1ziJMiKDwBGwP9S7/sZVkr3lepEY6xcNgS+hoT29a8HP2F0IUynFuH6xkCsKUb7R PlWirCe7EU5LUDnPhO2vsYQq1fkl+QlbvlJ1Aq5YMvkYlqJiPIGdtOtzVPEiyPwdTv p4NZgCWyPhTo2mh0STQj4UCRnAXayOezAKe9zTX4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Felipe Balbi , Sasha Levin Subject: [PATCH 4.19 20/58] usb: dwc3: pci: add support for TigerLake Devices Date: Mon, 26 Sep 2022 12:11:39 +0200 Message-Id: <20220926100742.179235864@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Felipe Balbi [ Upstream commit b3649dee5fbb0f6585010e6e9313dfcbb075b22b ] This patch adds the necessary PCI ID for TGP-LP devices. Signed-off-by: Felipe Balbi Stable-dep-of: bad0d1d726ac ("usb: dwc3: pci: Add support for Intel Raptor = Lake") Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/usb/dwc3/dwc3-pci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 5d5166373aa1..3ca582127f94 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c @@ -37,6 +37,7 @@ #define PCI_DEVICE_ID_INTEL_CNPV 0xa3b0 #define PCI_DEVICE_ID_INTEL_ICLLP 0x34ee #define PCI_DEVICE_ID_INTEL_EHLLP 0x4b7e +#define PCI_DEVICE_ID_INTEL_TGPLP 0xa0ee =20 #define PCI_INTEL_BXT_DSM_GUID "732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511" #define PCI_INTEL_BXT_FUNC_PMU_PWR 4 @@ -355,6 +356,9 @@ static const struct pci_device_id dwc3_pci_id_table[] = =3D { { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_EHLLP), (kernel_ulong_t) &dwc3_pci_intel_properties, }, =20 + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGPLP), + (kernel_ulong_t) &dwc3_pci_intel_properties, }, + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_NL_USB), (kernel_ulong_t) &dwc3_pci_amd_properties, }, { } /* Terminating Entry */ --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80F6CC6FA83 for ; Mon, 26 Sep 2022 10:32:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235839AbiIZKcT (ORCPT ); Mon, 26 Sep 2022 06:32:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235523AbiIZK3n (ORCPT ); Mon, 26 Sep 2022 06:29:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 818CD1CFD3; Mon, 26 Sep 2022 03:19:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 91CA760B5E; Mon, 26 Sep 2022 10:19:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5350FC433C1; Mon, 26 Sep 2022 10:19:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187578; bh=YXoY+8Ekv8pDLCFBht7bLPBMrzFnxeNVRxc1tuAOeUQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yOGNyrO4m91mqAgtQk1nO5SVhc4NJzrp1XI5soSq3rRJ45XtZNavDejp2ne4fCiXr QGN9e9mv8H4H++og200DsCCG+ScyWIetP9s2pQzYCBNt3/qZLsnMXVYyni645MmkkP i/6JYCs0/TsDZuA/m1j4Vw+2tCWwf7GrpK5qL03E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Heikki Krogerus , Felipe Balbi , Sasha Levin Subject: [PATCH 4.19 21/58] usb: dwc3: pci: add support for the Intel Tiger Lake PCH -H variant Date: Mon, 26 Sep 2022 12:11:40 +0200 Message-Id: <20220926100742.209837549@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Heikki Krogerus [ Upstream commit c3f595a8119207cc0f82b3dc6ec5bbf6f3e6b135 ] This patch adds the necessary PCI ID for TGP-H devices. Signed-off-by: Heikki Krogerus Signed-off-by: Felipe Balbi Stable-dep-of: bad0d1d726ac ("usb: dwc3: pci: Add support for Intel Raptor = Lake") Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/usb/dwc3/dwc3-pci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 3ca582127f94..cddf02add6f1 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c @@ -38,6 +38,7 @@ #define PCI_DEVICE_ID_INTEL_ICLLP 0x34ee #define PCI_DEVICE_ID_INTEL_EHLLP 0x4b7e #define PCI_DEVICE_ID_INTEL_TGPLP 0xa0ee +#define PCI_DEVICE_ID_INTEL_TGPH 0x43ee =20 #define PCI_INTEL_BXT_DSM_GUID "732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511" #define PCI_INTEL_BXT_FUNC_PMU_PWR 4 @@ -359,6 +360,9 @@ static const struct pci_device_id dwc3_pci_id_table[] = =3D { { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGPLP), (kernel_ulong_t) &dwc3_pci_intel_properties, }, =20 + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGPH), + (kernel_ulong_t) &dwc3_pci_intel_properties, }, + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_NL_USB), (kernel_ulong_t) &dwc3_pci_amd_properties, }, { } /* Terminating Entry */ --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E881AC32771 for ; Mon, 26 Sep 2022 10:32:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235721AbiIZKcX (ORCPT ); Mon, 26 Sep 2022 06:32:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235682AbiIZKaR (ORCPT ); Mon, 26 Sep 2022 06:30:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2AB695BC; Mon, 26 Sep 2022 03:19:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 874C360B60; Mon, 26 Sep 2022 10:19:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D70DC433D7; Mon, 26 Sep 2022 10:19:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187581; bh=g+vMcxNmAy28LBGEzMAhjU8n7hjEgxGZ9DO/fXUrtSo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k2ix0zKxYZ0SS8KamVm503e0siyxkBIivPGdeSgIf4XfsU7ZoYFBX5RLk4AnsIzdE AasZIVEDdE9AH65VHrjwl2PIFxPMA6dPh9iv9HLwORrkmUmfcsVLbv1fOrpfGTXUGD NWMeUeJsl48m4YHwADQfRuH1kpq4nB+DzcBGVqOw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Heikki Krogerus , Felipe Balbi , Sasha Levin Subject: [PATCH 4.19 22/58] usb: dwc3: pci: add support for the Intel Jasper Lake Date: Mon, 26 Sep 2022 12:11:41 +0200 Message-Id: <20220926100742.249054602@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Heikki Krogerus [ Upstream commit e25d1e8532c3d84f075deca1580a7d61e0f43ce6 ] This patch adds the necessary PCI ID for Intel Jasper Lake devices. Signed-off-by: Heikki Krogerus Signed-off-by: Felipe Balbi Stable-dep-of: bad0d1d726ac ("usb: dwc3: pci: Add support for Intel Raptor = Lake") Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/usb/dwc3/dwc3-pci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index cddf02add6f1..125cecb1bc99 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c @@ -39,6 +39,7 @@ #define PCI_DEVICE_ID_INTEL_EHLLP 0x4b7e #define PCI_DEVICE_ID_INTEL_TGPLP 0xa0ee #define PCI_DEVICE_ID_INTEL_TGPH 0x43ee +#define PCI_DEVICE_ID_INTEL_JSP 0x4dee =20 #define PCI_INTEL_BXT_DSM_GUID "732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511" #define PCI_INTEL_BXT_FUNC_PMU_PWR 4 @@ -363,6 +364,9 @@ static const struct pci_device_id dwc3_pci_id_table[] = =3D { { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGPH), (kernel_ulong_t) &dwc3_pci_intel_properties, }, =20 + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_JSP), + (kernel_ulong_t) &dwc3_pci_intel_properties, }, + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_NL_USB), (kernel_ulong_t) &dwc3_pci_amd_properties, }, { } /* Terminating Entry */ --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64B17C32771 for ; Mon, 26 Sep 2022 10:32:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235742AbiIZKc2 (ORCPT ); Mon, 26 Sep 2022 06:32:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235704AbiIZKaT (ORCPT ); Mon, 26 Sep 2022 06:30:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E58B41658D; Mon, 26 Sep 2022 03:19:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A180B60BB1; Mon, 26 Sep 2022 10:19:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F1CDC433C1; Mon, 26 Sep 2022 10:19:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187584; bh=OKB7sDthagfc4CiDnzYEepFMAYz3D5hkcJdLt/uvffs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xeP6N6I8M0F07O7zHrcB0NyyLMHA9SfzTwPa8LlYr8rpMvMZcDnxdNjFaymrrxjqx HmmaOoQbEayF2CjAtTEemfi5qv0ML1wl7aQt5gXEgYueZhuz0FoJ6FyLFDI/TMyvBg KSe1DD+no1R4jftTO2BUXfpwzyb5mCKEUFGG/e6c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Heikki Krogerus , Felipe Balbi , Sasha Levin Subject: [PATCH 4.19 23/58] usb: dwc3: pci: add support for the Intel Alder Lake-S Date: Mon, 26 Sep 2022 12:11:42 +0200 Message-Id: <20220926100742.297863807@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Heikki Krogerus [ Upstream commit 1384ab4fee12c4c4f8bd37bc9f8686881587b286 ] This patch adds the necessary PCI ID for Intel Alder Lake-S devices. Signed-off-by: Heikki Krogerus Signed-off-by: Felipe Balbi Stable-dep-of: bad0d1d726ac ("usb: dwc3: pci: Add support for Intel Raptor = Lake") Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/usb/dwc3/dwc3-pci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 125cecb1bc99..ec7063e63436 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c @@ -40,6 +40,7 @@ #define PCI_DEVICE_ID_INTEL_TGPLP 0xa0ee #define PCI_DEVICE_ID_INTEL_TGPH 0x43ee #define PCI_DEVICE_ID_INTEL_JSP 0x4dee +#define PCI_DEVICE_ID_INTEL_ADLS 0x7ae1 =20 #define PCI_INTEL_BXT_DSM_GUID "732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511" #define PCI_INTEL_BXT_FUNC_PMU_PWR 4 @@ -367,6 +368,9 @@ static const struct pci_device_id dwc3_pci_id_table[] = =3D { { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_JSP), (kernel_ulong_t) &dwc3_pci_intel_properties, }, =20 + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ADLS), + (kernel_ulong_t) &dwc3_pci_intel_properties, }, + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_NL_USB), (kernel_ulong_t) &dwc3_pci_amd_properties, }, { } /* Terminating Entry */ --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 827B0C32771 for ; Mon, 26 Sep 2022 10:30:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235785AbiIZKak (ORCPT ); Mon, 26 Sep 2022 06:30:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235640AbiIZK2n (ORCPT ); Mon, 26 Sep 2022 06:28:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12BF44E61E; Mon, 26 Sep 2022 03:19:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EAFF4B80915; Mon, 26 Sep 2022 10:18:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49862C433C1; Mon, 26 Sep 2022 10:18:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187488; bh=Gws39Zod51pQ7ojLk/9ZwRkZ9aRl9dDPPARiAQhVGa4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d08FGmpmPjgSIjd5QwvSnCOKriSKGa0aLl0CSjCqEuTgAhDNtxV7+2c4K0WzXJk9d /nLmfCye7TeiwYqbhZykBZg3stmXYgg8rdf6GZI9EoDfIkoceC8BOjjDjpK8SCZIlt /PvlJnGWkBIFZqyZNiOxi1eKgQb1RGDzYbfgAHwY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+f9acff9bf08a845f225d@syzkaller.appspotmail.com, Johannes Berg , Siddh Raman Pant , Johannes Berg , Sasha Levin Subject: [PATCH 4.19 24/58] wifi: mac80211: Fix UAF in ieee80211_scan_rx() Date: Mon, 26 Sep 2022 12:11:43 +0200 Message-Id: <20220926100742.330172253@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Siddh Raman Pant [ Upstream commit 60deb9f10eec5c6a20252ed36238b55d8b614a2c ] ieee80211_scan_rx() tries to access scan_req->flags after a null check, but a UAF is observed when the scan is completed and __ieee80211_scan_completed() executes, which then calls cfg80211_scan_done() leading to the freeing of scan_req. Since scan_req is rcu_dereference()'d, prevent the racing in __ieee80211_scan_completed() by ensuring that from mac80211's POV it is no longer accessed from an RCU read critical section before we call cfg80211_scan_done(). Cc: stable@vger.kernel.org Link: https://syzkaller.appspot.com/bug?extid=3Df9acff9bf08a845f225d Reported-by: syzbot+f9acff9bf08a845f225d@syzkaller.appspotmail.com Suggested-by: Johannes Berg Signed-off-by: Siddh Raman Pant Link: https://lore.kernel.org/r/20220819200340.34826-1-code@siddh.me Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- net/mac80211/scan.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index de42bcfeda9c..e3d8be4feea5 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -412,10 +412,6 @@ static void __ieee80211_scan_completed(struct ieee8021= 1_hw *hw, bool aborted) scan_req =3D rcu_dereference_protected(local->scan_req, lockdep_is_held(&local->mtx)); =20 - if (scan_req !=3D local->int_scan_req) { - local->scan_info.aborted =3D aborted; - cfg80211_scan_done(scan_req, &local->scan_info); - } RCU_INIT_POINTER(local->scan_req, NULL); =20 scan_sdata =3D rcu_dereference_protected(local->scan_sdata, @@ -425,6 +421,13 @@ static void __ieee80211_scan_completed(struct ieee8021= 1_hw *hw, bool aborted) local->scanning =3D 0; local->scan_chandef.chan =3D NULL; =20 + synchronize_rcu(); + + if (scan_req !=3D local->int_scan_req) { + local->scan_info.aborted =3D aborted; + cfg80211_scan_done(scan_req, &local->scan_info); + } + /* Set power back to normal operating levels. */ ieee80211_hw_config(local, 0); =20 --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21FA2C32771 for ; Mon, 26 Sep 2022 10:28:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235402AbiIZK2M (ORCPT ); Mon, 26 Sep 2022 06:28:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235752AbiIZKY6 (ORCPT ); Mon, 26 Sep 2022 06:24:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D92DA4DB27; Mon, 26 Sep 2022 03:18:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DF2FFB80835; Mon, 26 Sep 2022 10:18:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 499D3C433D6; Mon, 26 Sep 2022 10:18:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187491; bh=QkgGLY6ojXfsFX8zbq5zAU0p6m3ZpG+WK/cJf+TUKpU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uTGXNT68s2LngR/fovuY5qCcuMlWsjteZlPjefytu4oxxJR+pHSuEyOsZh4dcfbWL GwCRy7JXyQK89TvJkIwZqZjgtCnRjtptmXnVC2h6H/TWctpj6a9mJagh1uZEcTobZe XkniqoDIjg8OQNiqppRG9UoDBCOtEQxZ3G3axcPY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stephen Rothwell , Bagas Sanjaya , Alan Stern Subject: [PATCH 4.19 25/58] USB: core: Fix RST error in hub.c Date: Mon, 26 Sep 2022 12:11:44 +0200 Message-Id: <20220926100742.369703644@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Alan Stern commit 766a96dc558385be735a370db867e302c8f22153 upstream. A recent commit added an invalid RST expression to a kerneldoc comment in hub.c. The fix is trivial. Fixes: 9c6d778800b9 ("USB: core: Prevent nested device-reset calls") Cc: Reported-by: Stephen Rothwell Reviewed-by: Bagas Sanjaya Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/YxDDcsLtRZ7c20pq@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/usb/core/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -5852,7 +5852,7 @@ re_enumerate_no_bos: * * Return: The same as for usb_reset_and_verify_device(). * However, if a reset is already in progress (for instance, if a - * driver doesn't have pre_ or post_reset() callbacks, and while + * driver doesn't have pre_reset() or post_reset() callbacks, and while * being unbound or re-bound during the ongoing reset its disconnect() * or probe() routine tries to perform a second, nested reset), the * routine returns -EINPROGRESS. From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0394C32771 for ; Mon, 26 Sep 2022 10:31:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235842AbiIZKa6 (ORCPT ); Mon, 26 Sep 2022 06:30:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235711AbiIZK24 (ORCPT ); Mon, 26 Sep 2022 06:28:56 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32C2D4E611; Mon, 26 Sep 2022 03:19:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E531DB80924; Mon, 26 Sep 2022 10:18:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2EA07C433C1; Mon, 26 Sep 2022 10:18:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187494; bh=4dbwDwZ0eBnfjVz2XPlQVhmi10ewahaSZNSGTnSir1w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wcIuVbyX12DA6ARl8Ozde+Vbf5C8+oFdNZ44HxhgOGmHF57Pjv5Ehw3Vt5M9fUTeu 395PMaAfCb6K0puV8iUhQs0UjTdZ+sM4OYqYu+ntSBhCx5mrca117iICWiWfIK4LTn SHppCcDuSPdIh7pxf+O0AZZef/lyFglfLZS1SDUc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Carl Yin , Johan Hovold Subject: [PATCH 4.19 26/58] USB: serial: option: add Quectel BG95 0x0203 composition Date: Mon, 26 Sep 2022 12:11:45 +0200 Message-Id: <20220926100742.407107628@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Carl Yin(=E6=AE=B7=E5=BC=A0=E6=88=90) commit f8f67eff6847f9b8d753fa029723bcc54296055a upstream. Add support for the following Quectel BG95 composition: 0x0203: Diag + GNSS + Modem + ECM usb-devices output: T: Bus=3D01 Lev=3D01 Prnt=3D01 Port=3D03 Cnt=3D01 Dev#=3D 2 Spd=3D480 Mx= Ch=3D 0 D: Ver=3D 2.00 Cls=3Def(misc ) Sub=3D02 Prot=3D01 MxPS=3D64 #Cfgs=3D 1 P: Vendor=3D2c7c ProdID=3D0203 Rev=3D 0.00 S: Manufacturer=3DQuectel, Incorporated S: Product=3DQuectel LPWA Module S: SerialNumber=3D71d3a21b C:* #Ifs=3D 5 Cfg#=3D 1 Atr=3De0 MxPwr=3D500mA A: FirstIf#=3D 3 IfCount=3D 2 Cls=3D02(comm.) Sub=3D00 Prot=3D00 I:* If#=3D 0 Alt=3D 0 #EPs=3D 2 Cls=3Dff(vend.) Sub=3Dff Prot=3D30 Driver= =3Doption E: Ad=3D81(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D01(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms I:* If#=3D 1 Alt=3D 0 #EPs=3D 2 Cls=3Dff(vend.) Sub=3Dff Prot=3D60 Driver= =3Doption E: Ad=3D82(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D02(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms I:* If#=3D 2 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3Dff Prot=3Dff Driver= =3Doption E: Ad=3D83(I) Atr=3D03(Int.) MxPS=3D 64 Ivl=3D2ms E: Ad=3D84(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D03(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms I:* If#=3D 3 Alt=3D 0 #EPs=3D 1 Cls=3D02(comm.) Sub=3D06 Prot=3D00 Driver= =3Dcdc_ether E: Ad=3D85(I) Atr=3D03(Int.) MxPS=3D 64 Ivl=3D2ms I: If#=3D 4 Alt=3D 0 #EPs=3D 0 Cls=3D0a(data ) Sub=3D00 Prot=3D00 Driver= =3Dcdc_ether I:* If#=3D 4 Alt=3D 1 #EPs=3D 2 Cls=3D0a(data ) Sub=3D00 Prot=3D00 Driver= =3Dcdc_ether E: Ad=3D86(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D04(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms Signed-off-by: Carl Yin Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1138,6 +1138,8 @@ static const struct usb_device_id option { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, = 0xff, 0xff, 0xff), .driver_info =3D NUMEP2 }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, = 0xff, 0, 0) }, + { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, 0x0203, 0xff), /* BG95-M3= */ + .driver_info =3D ZLP }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), .driver_info =3D RSVD(4) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, = 0xff, 0xff, 0xff), From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35269C07E9D for ; Mon, 26 Sep 2022 10:28:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235574AbiIZK2V (ORCPT ); Mon, 26 Sep 2022 06:28:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235311AbiIZKZd (ORCPT ); Mon, 26 Sep 2022 06:25:33 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3B6E4DB3E; Mon, 26 Sep 2022 03:18:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E4E74B8092F; Mon, 26 Sep 2022 10:18:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37761C433D6; Mon, 26 Sep 2022 10:18:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187497; bh=OnHJPjH4h6Nbsq01JGvqFhs1so7/TP+GxApbv3kVy+0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0b5xuGkAzgVzCH3H7TWfOtFCKM9WVTzNqpOW6ew1eSSHHjsWWn4jzbAK4mWSW8Pey f6rPZtfgPDh1/uqmzQex+/cEAhdZx6ND0RXUD//Rm81cPM6YeK034k1e0h7Isbd1Ap anY+t80d5Oup+hDWI0syeyN66N7wl3rC5P+OBXV4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, jerry meng , Johan Hovold Subject: [PATCH 4.19 27/58] USB: serial: option: add Quectel RM520N Date: Mon, 26 Sep 2022 12:11:46 +0200 Message-Id: <20220926100742.446125622@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: jerry meng commit d640c4cb8f2f933c0ca896541f9de7fb1ae245f4 upstream. add support for Quectel RM520N which is based on Qualcomm SDX62 chip. 0x0801: DIAG + NMEA + AT + MODEM + RMNET T: Bus=3D03 Lev=3D01 Prnt=3D01 Port=3D01 Cnt=3D02 Dev#=3D 10 Spd=3D480 Mx= Ch=3D 0 D: Ver=3D 2.10 Cls=3D00(>ifc ) Sub=3D00 Prot=3D00 MxPS=3D64 #Cfgs=3D 1 P: Vendor=3D2c7c ProdID=3D0801 Rev=3D 5.04 S: Manufacturer=3DQuectel S: Product=3DRM520N-GL S: SerialNumber=3D384af524 C:* #Ifs=3D 5 Cfg#=3D 1 Atr=3Da0 MxPwr=3D500mA I:* If#=3D 0 Alt=3D 0 #EPs=3D 2 Cls=3Dff(vend.) Sub=3Dff Prot=3D30 Driver= =3Doption E: Ad=3D01(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D81(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms I:* If#=3D 1 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3D00 Prot=3D40 Driver= =3Doption E: Ad=3D83(I) Atr=3D03(Int.) MxPS=3D 10 Ivl=3D32ms E: Ad=3D82(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D02(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms I:* If#=3D 2 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3D00 Prot=3D00 Driver= =3Doption E: Ad=3D85(I) Atr=3D03(Int.) MxPS=3D 10 Ivl=3D32ms E: Ad=3D84(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D03(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms I:* If#=3D 3 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3D00 Prot=3D00 Driver= =3Doption E: Ad=3D87(I) Atr=3D03(Int.) MxPS=3D 10 Ivl=3D32ms E: Ad=3D86(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D04(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms I:* If#=3D 4 Alt=3D 0 #EPs=3D 3 Cls=3Dff(vend.) Sub=3Dff Prot=3Dff Driver= =3Dqmi_wwan E: Ad=3D88(I) Atr=3D03(Int.) MxPS=3D 8 Ivl=3D32ms E: Ad=3D8e(I) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms E: Ad=3D0f(O) Atr=3D02(Bulk) MxPS=3D 512 Ivl=3D0ms Signed-off-by: jerry meng Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/usb/serial/option.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -256,6 +256,7 @@ static void option_instat_callback(struc #define QUECTEL_PRODUCT_EM060K 0x030b #define QUECTEL_PRODUCT_EM12 0x0512 #define QUECTEL_PRODUCT_RM500Q 0x0800 +#define QUECTEL_PRODUCT_RM520N 0x0801 #define QUECTEL_PRODUCT_EC200S_CN 0x6002 #define QUECTEL_PRODUCT_EC200T 0x6026 #define QUECTEL_PRODUCT_RM500K 0x7001 @@ -1161,6 +1162,9 @@ static const struct usb_device_id option { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q= , 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q= , 0xff, 0xff, 0x10), .driver_info =3D ZLP }, + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N= , 0xff, 0xff, 0x30) }, + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N= , 0xff, 0, 0x40) }, + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N= , 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S= _CN, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T= , 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K= , 0xff, 0x00, 0x00) }, From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3DEEC07E9D for ; Mon, 26 Sep 2022 10:28:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235589AbiIZK22 (ORCPT ); Mon, 26 Sep 2022 06:28:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235412AbiIZK0X (ORCPT ); Mon, 26 Sep 2022 06:26:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47F8B1EC4E; Mon, 26 Sep 2022 03:18:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 03227B80942; Mon, 26 Sep 2022 10:18:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51F87C433C1; Mon, 26 Sep 2022 10:18:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187500; bh=rroXjO0hPS+la9RzEK8lIbpNpqMPNTiAv9RECnaoBgo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r3FTvtzPxBC93tc4WKE89rrG222PRN2JnalcDz1yUZhR79nCbTpWCdf+42IQls5VK RYCAbWpI19k8cGe/vl6dzV/g+UascX4AQ35PNQ9YM2/cJmqCmYbA2aPzMw8x2DgrYY mt34O0D8GB1FyKUbLOPB32xjrSy/tJiypAgVmiIc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mohan Kumar , Takashi Iwai Subject: [PATCH 4.19 28/58] ALSA: hda/tegra: set depop delay for tegra Date: Mon, 26 Sep 2022 12:11:47 +0200 Message-Id: <20220926100742.490384416@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Mohan Kumar commit 3c4d8c24fb6c44f426e447b04800b0ed61a7b5ae upstream. Reduce the suspend time by setting depop delay to 10ms for tegra. Signed-off-by: Mohan Kumar Cc: Link: https://lore.kernel.org/r/20220913053641.23299-1-mkumard@nvidia.com Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- sound/pci/hda/patch_hdmi.c | 1 + 1 file changed, 1 insertion(+) --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -3455,6 +3455,7 @@ static int patch_tegra_hdmi(struct hda_c if (err) return err; =20 + codec->depop_delay =3D 10; codec->patch_ops.build_pcms =3D tegra_hdmi_build_pcms; spec =3D codec->spec; spec->chmap.ops.chmap_cea_alloc_validate_get_type =3D From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0735FC6FA93 for ; Mon, 26 Sep 2022 10:29:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235444AbiIZK3e (ORCPT ); Mon, 26 Sep 2022 06:29:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235467AbiIZK0x (ORCPT ); Mon, 26 Sep 2022 06:26:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE7CA3FA12; Mon, 26 Sep 2022 03:18:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3EE0DB80930; Mon, 26 Sep 2022 10:18:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BEAFC433C1; Mon, 26 Sep 2022 10:18:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187503; bh=Tbxxrcgh3NePnoXuNMJDxvg8ntbWKR5LUqSxLZ3lIHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uNWxOJXYGLWyEtVvoc0/Q17o2PI5bnr56L9ABJU0i1aGVa82+KwEUo8O7O4ts9Xqo LKuOAXiE+zo0hmPiopcdGDeZ1ac0UrCnVi82aikVRie2SXdGCbhDpTcV1ss1zcEg4l IBYYFxi3wmU67qqJOT9fFnVCC27QCDS/5alkcn/I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kai Vehmanen , Takashi Iwai Subject: [PATCH 4.19 29/58] ALSA: hda: add Intel 5 Series / 3400 PCI DID Date: Mon, 26 Sep 2022 12:11:48 +0200 Message-Id: <20220926100742.529655798@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Kai Vehmanen commit 4d40ceef4745536289012670103c59264e0fb3ec upstream. Handle 0x3b57 variant with same AZX_DCAPS_INTEL_PCH_NOPM capabilities as 0x3b56. In practise this allow use of HDMI/DP display audio via i915. BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/2751 Signed-off-by: Kai Vehmanen Cc: Link: https://lore.kernel.org/r/20220912183716.2126312-1-kai.vehmanen@linux= .intel.com Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- sound/pci/hda/hda_intel.c | 2 ++ 1 file changed, 2 insertions(+) --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2634,6 +2634,8 @@ static const struct pci_device_id azx_id /* 5 Series/3400 */ { PCI_DEVICE(0x8086, 0x3b56), .driver_data =3D AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM }, + { PCI_DEVICE(0x8086, 0x3b57), + .driver_data =3D AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM }, /* Poulsbo */ { PCI_DEVICE(0x8086, 0x811b), .driver_data =3D AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE }, From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1D97C6FA90 for ; Mon, 26 Sep 2022 10:29:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235492AbiIZK3m (ORCPT ); Mon, 26 Sep 2022 06:29:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235524AbiIZK1f (ORCPT ); Mon, 26 Sep 2022 06:27:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56AE33FA24; Mon, 26 Sep 2022 03:18:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2AA50B80920; Mon, 26 Sep 2022 10:18:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D834C433D7; Mon, 26 Sep 2022 10:18:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187506; bh=SAVVjF0InU0cnF+duHjbPwXQwadgfhiTlKvZmvn6UOc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XyOUXDyUtE7I9SpTxCd7beUzaNiNopNkI5yEFuDKQzOdOS5mO6gJFYz+DsmVm78N0 i4YDSy1ujuBvIKMjU74BzzrX430whVV51F1bXwvpySPOvRt28vOfY8KxYHb9t0bKh5 AWXjB8RPNFzc6nuIdPj4avQm1YtHTX6++ACXMiXg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Callum Osmotherly , Takashi Iwai Subject: [PATCH 4.19 30/58] ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5530 laptop Date: Mon, 26 Sep 2022 12:11:49 +0200 Message-Id: <20220926100742.569112860@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Callum Osmotherly commit 1885ff13d4c42910b37a0e3f7c2f182520f4eed1 upstream. Just as with the 5570 (and the other Dell laptops), this enables the two subwoofer speakers on the Dell Precision 5530 together with the main ones, significantly increasing the audio quality. I've tested this myself on a 5530 and can confirm it's working as expected. Signed-off-by: Callum Osmotherly Cc: Link: https://lore.kernel.org/r/YyMjQO3mhyXlMbCf@piranha Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7081,6 +7081,7 @@ static const struct snd_pci_quirk alc269 SND_PCI_QUIRK(0x1028, 0x0871, "Dell Precision 3630", ALC255_FIXUP_DELL_HE= ADSET_MIC), SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HE= ADSET_MIC), SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_L= INEOUT_VERB), + SND_PCI_QUIRK(0x1028, 0x087d, "Dell Precision 5530", ALC289_FIXUP_DUAL_SP= K), SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO= _MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_P= RESENCE), SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB), From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1C05C07E9D for ; Mon, 26 Sep 2022 10:30:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235808AbiIZKat (ORCPT ); Mon, 26 Sep 2022 06:30:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235702AbiIZK2y (ORCPT ); Mon, 26 Sep 2022 06:28:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 602E24E84C; Mon, 26 Sep 2022 03:19:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 78A0160AD6; Mon, 26 Sep 2022 10:18:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86B07C433C1; Mon, 26 Sep 2022 10:18:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187509; bh=GLloAbWf1ibfp4C7gKCcO5fNiAAMTzZrSFe2GtoRA7I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yy2aX7GN00JMifX93pO/y0heXKP7D7Nhm3baPZQjN3TOgTQwSCMDxa8OLQxd8lz1v 5MgPYj6oU6uITW0yc1/eOx84dRHeSNGFfZtrYWKUjufnlDHe62wHM4IiHmkVqLi370 6WWrnD1o0xAnzDC9lKa45L6R+q5lZkgE0OnI7xvg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel , Ilias Apalodimas , Peter Jones Subject: [PATCH 4.19 31/58] efi: libstub: check Shim mode using MokSBStateRT Date: Mon, 26 Sep 2022 12:11:50 +0200 Message-Id: <20220926100742.617625457@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Ard Biesheuvel commit 5f56a74cc0a6d9b9f8ba89cea29cd7c4774cb2b1 upstream. We currently check the MokSBState variable to decide whether we should treat UEFI secure boot as being disabled, even if the firmware thinks otherwise. This is used by shim to indicate that it is not checking signatures on boot images. In the kernel, we use this to relax lockdown policies. However, in cases where shim is not even being used, we don't want this variable to interfere with lockdown, given that the variable may be non-volatile and therefore persist across a reboot. This means setting it once will persistently disable lockdown checks on a given system. So switch to the mirrored version of this variable, called MokSBStateRT, which is supposed to be volatile, and this is something we can check. Cc: # v4.19+ Signed-off-by: Ard Biesheuvel Reviewed-by: Ilias Apalodimas Reviewed-by: Peter Jones Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/firmware/efi/libstub/secureboot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/firmware/efi/libstub/secureboot.c +++ b/drivers/firmware/efi/libstub/secureboot.c @@ -21,7 +21,7 @@ static const efi_char16_t efi_SetupMode_ =20 /* SHIM variables */ static const efi_guid_t shim_guid =3D EFI_SHIM_LOCK_GUID; -static const efi_char16_t shim_MokSBState_name[] =3D L"MokSBState"; +static const efi_char16_t shim_MokSBState_name[] =3D L"MokSBStateRT"; =20 #define get_efi_var(name, vendor, ...) \ efi_call_runtime(get_variable, \ @@ -60,8 +60,8 @@ enum efi_secureboot_mode efi_get_secureb =20 /* * See if a user has put the shim into insecure mode. If so, and if the - * variable doesn't have the runtime attribute set, we might as well - * honor that. + * variable doesn't have the non-volatile attribute set, we might as + * well honor that. */ size =3D sizeof(moksbstate); status =3D get_efi_var(shim_MokSBState_name, &shim_guid, @@ -70,7 +70,7 @@ enum efi_secureboot_mode efi_get_secureb /* If it fails, we don't care why. Default to secure */ if (status !=3D EFI_SUCCESS) goto secure_boot_enabled; - if (!(attr & EFI_VARIABLE_RUNTIME_ACCESS) && moksbstate =3D=3D 1) + if (!(attr & EFI_VARIABLE_NON_VOLATILE) && moksbstate =3D=3D 1) return efi_secureboot_mode_disabled; =20 secure_boot_enabled: From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 860C7C6FA90 for ; Mon, 26 Sep 2022 10:29:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235544AbiIZK3q (ORCPT ); Mon, 26 Sep 2022 06:29:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235529AbiIZK1l (ORCPT ); Mon, 26 Sep 2022 06:27:41 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E71D14DF30; Mon, 26 Sep 2022 03:18:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id AF349CE10E7; Mon, 26 Sep 2022 10:18:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80D9FC433C1; Mon, 26 Sep 2022 10:18:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187513; bh=pbT2fg2QOVi6U/rK8F+6R/wuL+JzTs9OXgQB/IY9PK8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cB0izfC79FybZE3P4Ec3pU+Cg0bCwYKdDmqZWDkWe9FGtzFGW2xpqS7sai91vgyCA Rs47hYdDwi9K+sY9VkLfS39Y2ka4nj0EQuua4eKCI5byGX5Gw2uY1OrTPtw6//0bDu fIXkmmxY+JBUWlmy/EMrEL/KxDMr/bZ+bxZaCZ5E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Al Viro , Palmer Dabbelt Subject: [PATCH 4.19 32/58] riscv: fix a nasty sigreturn bug... Date: Mon, 26 Sep 2022 12:11:51 +0200 Message-Id: <20220926100742.656986719@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Al Viro commit 762df359aa5849e010ef04c3ed79d57588ce17d9 upstream. riscv has an equivalent of arm bug fixed by 653d48b22166 ("arm: fix really nasty sigreturn bug"); if signal gets caught by an interrupt that hits when we have the right value in a0 (-513), *and* another signal gets delivered upon sigreturn() (e.g. included into the blocked mask for the first signal and posted while the handler had been running), the syscall restart logics will see regs->cause equal to EXC_SYSCALL (we are in a syscall, after all) and a0 already restored to its original value (-513, which happens to be -ERESTARTNOINTR) and assume that we need to apply the usual syscall restart logics. Signed-off-by: Al Viro Fixes: e2c0cdfba7f6 ("RISC-V: User-facing API") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/YxJEiSq%2FCGaL6Gm9@ZenIV/ Signed-off-by: Palmer Dabbelt Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- arch/riscv/kernel/signal.c | 2 ++ 1 file changed, 2 insertions(+) --- a/arch/riscv/kernel/signal.c +++ b/arch/riscv/kernel/signal.c @@ -105,6 +105,8 @@ SYSCALL_DEFINE0(rt_sigreturn) if (restore_altstack(&frame->uc.uc_stack)) goto badframe; =20 + regs->cause =3D -1UL; + return regs->a0; =20 badframe: From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EA1BC32771 for ; Mon, 26 Sep 2022 10:31:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235345AbiIZKbD (ORCPT ); Mon, 26 Sep 2022 06:31:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235715AbiIZK24 (ORCPT ); Mon, 26 Sep 2022 06:28:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BA243F1D1; Mon, 26 Sep 2022 03:19:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9CDEA60BAF; Mon, 26 Sep 2022 10:18:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90F23C433D6; Mon, 26 Sep 2022 10:18:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187516; bh=Xxye98JGPI4GyYixY64MCmnFMNGAoGdty1aT4L4zjRU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JWmx3OcPQQX/t7WnY17lJkLtOzOwMdCSt+oi/gIYI8lswOoYg2xVe4ieJvO3OBST5 8PJzc8vqefAKAdAYz4+Gnv3nfyee0bNRCauypEAwxzOqPS2hH87VvXGrKvYxSUAvWl hS9jyqIgbZnxQll9qmUe0su76t0bggxLKvo7wZhM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, stable@kernel.org, syzbot+81684812ea68216e08c5@syzkaller.appspotmail.com, Muchun Song , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Chao Yu , David Rientjes , Vlastimil Babka Subject: [PATCH 4.19 33/58] mm/slub: fix to return errno if kmalloc() fails Date: Mon, 26 Sep 2022 12:11:52 +0200 Message-Id: <20220926100742.686423372@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Chao Yu commit 7e9c323c52b379d261a72dc7bd38120a761a93cd upstream. In create_unique_id(), kmalloc(, GFP_KERNEL) can fail due to out-of-memory, if it fails, return errno correctly rather than triggering panic via BUG_ON(); kernel BUG at mm/slub.c:5893! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP Call trace: sysfs_slab_add+0x258/0x260 mm/slub.c:5973 __kmem_cache_create+0x60/0x118 mm/slub.c:4899 create_cache mm/slab_common.c:229 [inline] kmem_cache_create_usercopy+0x19c/0x31c mm/slab_common.c:335 kmem_cache_create+0x1c/0x28 mm/slab_common.c:390 f2fs_kmem_cache_create fs/f2fs/f2fs.h:2766 [inline] f2fs_init_xattr_caches+0x78/0xb4 fs/f2fs/xattr.c:808 f2fs_fill_super+0x1050/0x1e0c fs/f2fs/super.c:4149 mount_bdev+0x1b8/0x210 fs/super.c:1400 f2fs_mount+0x44/0x58 fs/f2fs/super.c:4512 legacy_get_tree+0x30/0x74 fs/fs_context.c:610 vfs_get_tree+0x40/0x140 fs/super.c:1530 do_new_mount+0x1dc/0x4e4 fs/namespace.c:3040 path_mount+0x358/0x914 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __arm64_sys_mount+0x2f8/0x408 fs/namespace.c:3568 Cc: Fixes: 81819f0fc8285 ("SLUB core") Reported-by: syzbot+81684812ea68216e08c5@syzkaller.appspotmail.com Reviewed-by: Muchun Song Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Chao Yu Acked-by: David Rientjes Signed-off-by: Vlastimil Babka Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- mm/slub.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/mm/slub.c +++ b/mm/slub.c @@ -5688,7 +5688,8 @@ static char *create_unique_id(struct kme char *name =3D kmalloc(ID_STR_LENGTH, GFP_KERNEL); char *p =3D name; =20 - BUG_ON(!name); + if (!name) + return ERR_PTR(-ENOMEM); =20 *p++ =3D ':'; /* @@ -5770,6 +5771,8 @@ static int sysfs_slab_add(struct kmem_ca * for the symlinks. */ name =3D create_unique_id(s); + if (IS_ERR(name)) + return PTR_ERR(name); } =20 s->kobj.kset =3D kset; From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90C0DC32771 for ; Mon, 26 Sep 2022 10:31:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235461AbiIZKbO (ORCPT ); Mon, 26 Sep 2022 06:31:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235739AbiIZK3B (ORCPT ); Mon, 26 Sep 2022 06:29:01 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 610714E85C; Mon, 26 Sep 2022 03:19:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5057FB8091F; Mon, 26 Sep 2022 10:18:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A649C433D6; Mon, 26 Sep 2022 10:18:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187522; bh=1JVInhKzRgYxeBtuLIgpRUdjVEz6qTPyMirFBcB/qzE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U41rnF2j21EcWkp84f3JFBxpSV9xn05go53B3Q0wmOLW69fFxz+XXOMtzYSGu+Mz/ 0VFp4wM/GiQaHLpJCFSHKuvjsBc4r/LFk/QrCw4qooM0ID9hiB9uSEfiLJyHjwJXAn BHsh34+THufjLs7TZFmyrFt7PX/wWscCrKKajJ/g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Douglas Anderson , zain wang , Brian Norris , Heiko Stuebner , Sasha Levin Subject: [PATCH 4.19 34/58] arm64: dts: rockchip: Set RK3399-Gru PCLK_EDP to 24 MHz Date: Mon, 26 Sep 2022 12:11:53 +0200 Message-Id: <20220926100742.725846454@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: zain wang [ Upstream commit 8123437cf46ea5a0f6ca5cb3c528d8b6db97b9c2 ] We've found the AUX channel to be less reliable with PCLK_EDP at a higher rate (typically 25 MHz). This is especially important on systems with PSR-enabled panels (like Gru-Kevin), since we make heavy, constant use of AUX. According to Rockchip, using any rate other than 24 MHz can cause "problems between syncing the PHY an PCLK", which leads to all sorts of unreliabilities around register operations. Fixes: d67a38c5a623 ("arm64: dts: rockchip: move core edp from rk3399-kevin= to shared chromebook") Reviewed-by: Douglas Anderson Signed-off-by: zain wang Signed-off-by: Brian Norris Link: https://lore.kernel.org/r/20220830131212.v2.1.I98d30623f13b785ca77094= d0c0fd4339550553b6@changeid Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi b/arch= /arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi index ff81dfda3b95..3ba927f30347 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi @@ -232,6 +232,14 @@ &cdn_dp { &edp { status =3D "okay"; =20 + /* + * eDP PHY/clk don't sync reliably at anything other than 24 MHz. Only + * set this here, because rk3399-gru.dtsi ensures we can generate this + * off GPLL=3D600MHz, whereas some other RK3399 boards may not. + */ + assigned-clocks =3D <&cru PCLK_EDP>; + assigned-clock-rates =3D <24000000>; + ports { edp_out: port@1 { reg =3D <1>; --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E0C9C32771 for ; Mon, 26 Sep 2022 10:30:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235656AbiIZKaO (ORCPT ); Mon, 26 Sep 2022 06:30:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235375AbiIZK2A (ORCPT ); Mon, 26 Sep 2022 06:28:00 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA6FF491E9; Mon, 26 Sep 2022 03:18:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 950A6B80835; Mon, 26 Sep 2022 10:18:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDDBDC433D6; Mon, 26 Sep 2022 10:18:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187525; bh=ca5roythMhaHkBzdHtuMVgWqhylGKDcDLuIspWrIoLY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nctFH5MG/FFUDvMoULgUK6/XKt1vLAmfgfZepSwmX5wniRzX0n1M0FOurCMCPm17f Fh6U+o7HpqGMIuAzKYBQwxFlnB4g5uUO04buYyaj4IA/GWTQS4M+Un0aoAgK0D9z1N stbjOqQ/WeuVDb6MWYrOVQ5S091uXfzG9S44XIBI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Fabio Estevam , Heiko Stuebner , Sasha Levin Subject: [PATCH 4.19 35/58] arm64: dts: rockchip: Remove enable-active-low from rk3399-puma Date: Mon, 26 Sep 2022 12:11:54 +0200 Message-Id: <20220926100742.755484965@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Fabio Estevam [ Upstream commit a994b34b9abb9c08ee09e835b4027ff2147f9d94 ] The 'enable-active-low' property is not a valid one. Only 'enable-active-high' is valid, and when this property is absent the gpio regulator will act as active low by default. Remove the invalid 'enable-active-low' property. Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM") Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20220827175140.1696699-1-festevam@denx.de Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boo= t/dts/rockchip/rk3399-puma.dtsi index ce1320e4c106..6750b8100421 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi @@ -102,7 +102,6 @@ vcc3v3_sys: vcc3v3-sys { vcc5v0_host: vcc5v0-host-regulator { compatible =3D "regulator-fixed"; gpio =3D <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>; - enable-active-low; pinctrl-names =3D "default"; pinctrl-0 =3D <&vcc5v0_host_en>; regulator-name =3D "vcc5v0_host"; --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92822C6FA83 for ; Mon, 26 Sep 2022 10:30:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235706AbiIZKaT (ORCPT ); Mon, 26 Sep 2022 06:30:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235560AbiIZK2L (ORCPT ); Mon, 26 Sep 2022 06:28:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05AA44DB71; Mon, 26 Sep 2022 03:18:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BFDD3B80936; Mon, 26 Sep 2022 10:18:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7045C433D6; Mon, 26 Sep 2022 10:18:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187528; bh=5yVkGeIa9tVEy8jpr69BZmy26C/8lkf9me70+HR20uY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ObD+37BJFWKHV/6CpWjVhmT+P+UYDotgm0hVv/HQBrYK41t4CUJpPAnf5Qy4+WdIS /DEfBVbNEXgjvPhowEGxgikhCIz+SlsGAyakqZ+qBRYj4WwIgvbfMzm7lt57WkNE9e sN04xTHF5npxcldVaAw3/vQEIkbhN+NTyxY6MglA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Igor Ryzhov , Florian Westphal , Sasha Levin Subject: [PATCH 4.19 36/58] netfilter: nf_conntrack_sip: fix ct_sip_walk_headers Date: Mon, 26 Sep 2022 12:11:55 +0200 Message-Id: <20220926100742.797555771@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Igor Ryzhov [ Upstream commit 39aebedeaaa95757f5c1f2ddb5f43fdddbf478ca ] ct_sip_next_header and ct_sip_get_header return an absolute value of matchoff, not a shift from current dataoff. So dataoff should be assigned matchoff, not incremented by it. This issue can be seen in the scenario when there are multiple Contact headers and the first one is using a hostname and other headers use IP addresses. In this case, ct_sip_walk_headers will work as follows: The first ct_sip_get_header call to will find the first Contact header but will return -1 as the header uses a hostname. But matchoff will be changed to the offset of this header. After that, dataoff should be set to matchoff, so that the next ct_sip_get_header call find the next Contact header. But instead of assigning dataoff to matchoff, it is incremented by it, which is not correct, as matchoff is an absolute value of the offset. So on the next call to the ct_sip_get_header, dataoff will be incorrect, and the next Contact header may not be found at all. Fixes: 05e3ced297fe ("[NETFILTER]: nf_conntrack_sip: introduce SIP-URI pars= ing helper") Signed-off-by: Igor Ryzhov Signed-off-by: Florian Westphal Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- net/netfilter/nf_conntrack_sip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_= sip.c index c8d2b6688a2a..046f118dea06 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c @@ -471,7 +471,7 @@ static int ct_sip_walk_headers(const struct nf_conn *ct= , const char *dptr, return ret; if (ret =3D=3D 0) break; - dataoff +=3D *matchoff; + dataoff =3D *matchoff; } *in_header =3D 0; } @@ -483,7 +483,7 @@ static int ct_sip_walk_headers(const struct nf_conn *ct= , const char *dptr, break; if (ret =3D=3D 0) return ret; - dataoff +=3D *matchoff; + dataoff =3D *matchoff; } =20 if (in_header) --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A975C07E9D for ; Mon, 26 Sep 2022 10:30:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235727AbiIZKaX (ORCPT ); Mon, 26 Sep 2022 06:30:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235620AbiIZK2k (ORCPT ); Mon, 26 Sep 2022 06:28:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 465864E600; Mon, 26 Sep 2022 03:18:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 97148B8092F; Mon, 26 Sep 2022 10:18:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8912C433B5; Mon, 26 Sep 2022 10:18:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187531; bh=3CAaS5EwBCW3W9RTHzr/UqlF5QrWtFo6WelZq7ipWko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cKYnIOS1K6wg3TReNm9GFP1ILzy0o340Txtfk2welSKi8Vv7wYYIEZwsWH/Wwy33K Y1dAhKY3txYtQ8Q2Joi+/wbvDPdv5d+tku4f18+Lp/VBhHKrnoapPDoxe3yV3I3aMo QP6Zb5kE/LLNWJupww45SgnXhp1S5OVgHxPC9Tvc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Leadbeater , Florian Westphal , Sasha Levin Subject: [PATCH 4.19 37/58] netfilter: nf_conntrack_irc: Tighten matching on DCC message Date: Mon, 26 Sep 2022 12:11:56 +0200 Message-Id: <20220926100742.830158315@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: David Leadbeater [ Upstream commit e8d5dfd1d8747b56077d02664a8838c71ced948e ] CTCP messages should only be at the start of an IRC message, not anywhere within it. While the helper only decodes packes in the ORIGINAL direction, its possible to make a client send a CTCP message back by empedding one into a PING request. As-is, thats enough to make the helper believe that it saw a CTCP message. Fixes: 869f37d8e48f ("[NETFILTER]: nf_conntrack/nf_nat: add IRC helper port= ") Signed-off-by: David Leadbeater Signed-off-by: Florian Westphal Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- net/netfilter/nf_conntrack_irc.c | 34 ++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/net/netfilter/nf_conntrack_irc.c b/net/netfilter/nf_conntrack_= irc.c index b7436935b57d..23ead02c6aa5 100644 --- a/net/netfilter/nf_conntrack_irc.c +++ b/net/netfilter/nf_conntrack_irc.c @@ -150,15 +150,37 @@ static int help(struct sk_buff *skb, unsigned int pro= toff, data =3D ib_ptr; data_limit =3D ib_ptr + skb->len - dataoff; =20 - /* strlen("\1DCC SENT t AAAAAAAA P\1\n")=3D24 - * 5+MINMATCHLEN+strlen("t AAAAAAAA P\1\n")=3D14 */ - while (data < data_limit - (19 + MINMATCHLEN)) { - if (memcmp(data, "\1DCC ", 5)) { + /* Skip any whitespace */ + while (data < data_limit - 10) { + if (*data =3D=3D ' ' || *data =3D=3D '\r' || *data =3D=3D '\n') + data++; + else + break; + } + + /* strlen("PRIVMSG x ")=3D10 */ + if (data < data_limit - 10) { + if (strncasecmp("PRIVMSG ", data, 8)) + goto out; + data +=3D 8; + } + + /* strlen(" :\1DCC SENT t AAAAAAAA P\1\n")=3D26 + * 7+MINMATCHLEN+strlen("t AAAAAAAA P\1\n")=3D26 + */ + while (data < data_limit - (21 + MINMATCHLEN)) { + /* Find first " :", the start of message */ + if (memcmp(data, " :", 2)) { data++; continue; } + data +=3D 2; + + /* then check that place only for the DCC command */ + if (memcmp(data, "\1DCC ", 5)) + goto out; data +=3D 5; - /* we have at least (19+MINMATCHLEN)-5 bytes valid data left */ + /* we have at least (21+MINMATCHLEN)-(2+5) bytes valid data left */ =20 iph =3D ip_hdr(skb); pr_debug("DCC found in master %pI4:%u %pI4:%u\n", @@ -174,7 +196,7 @@ static int help(struct sk_buff *skb, unsigned int proto= ff, pr_debug("DCC %s detected\n", dccprotos[i]); =20 /* we have at least - * (19+MINMATCHLEN)-5-dccprotos[i].matchlen bytes valid + * (21+MINMATCHLEN)-7-dccprotos[i].matchlen bytes valid * data left (=3D=3D 14/13 bytes) */ if (parse_dcc(data, data_limit, &dcc_ip, &dcc_port, &addr_beg_p, &addr_end_p)) { --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F5ABC32771 for ; Mon, 26 Sep 2022 10:30:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235751AbiIZKad (ORCPT ); Mon, 26 Sep 2022 06:30:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235621AbiIZK2k (ORCPT ); Mon, 26 Sep 2022 06:28:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 556BA4E606; Mon, 26 Sep 2022 03:18:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BA98AB80942; Mon, 26 Sep 2022 10:18:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14526C433D7; Mon, 26 Sep 2022 10:18:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187534; bh=d2uCZmzDO+E2wDJVSs97t4uBGEI64Dq855m06/aUQsE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XsW4rux2NILvKiQWO/LjB/FPKe2zoEVIapTHAls/qpZcVvbY3hNxrHOButujLrc/g 7768+Y7XgviIoPQ27wsc9Qnq8KjRAYX+KnsvBmKWofbqSJgF+k9yJeaoGTGIjN/v3e jhgzvkw+yFdnd08Rlg5IaP9dw72CgaGB/jWXTB24= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Brett Creeley , Norbert Zulinski , Mateusz Palczewski , Konrad Jankowski , Tony Nguyen , Sasha Levin Subject: [PATCH 4.19 38/58] iavf: Fix cached head and tail value for iavf_get_tx_pending Date: Mon, 26 Sep 2022 12:11:57 +0200 Message-Id: <20220926100742.858004096@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Brett Creeley [ Upstream commit 809f23c0423a43266e47a7dc67e95b5cb4d1cbfc ] The underlying hardware may or may not allow reading of the head or tail registers and it really makes no difference if we use the software cached values. So, always used the software cached values. Fixes: 9c6c12595b73 ("i40e: Detection and recovery of TX queue hung logic m= oved to service_task from tx_timeout") Signed-off-by: Brett Creeley Co-developed-by: Norbert Zulinski Signed-off-by: Norbert Zulinski Signed-off-by: Mateusz Palczewski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/et= hernet/intel/i40evf/i40e_txrx.c index b56d22b530a7..1bf9734ae9cf 100644 --- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c +++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c @@ -115,8 +115,11 @@ u32 i40evf_get_tx_pending(struct i40e_ring *ring, bool= in_sw) { u32 head, tail; =20 + /* underlying hardware might not allow access and/or always return + * 0 for the head/tail registers so just use the cached values + */ head =3D ring->next_to_clean; - tail =3D readl(ring->tail); + tail =3D ring->next_to_use; =20 if (head !=3D tail) return (head < tail) ? --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9D9DC32771 for ; Mon, 26 Sep 2022 10:30:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235797AbiIZKan (ORCPT ); Mon, 26 Sep 2022 06:30:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235639AbiIZK2n (ORCPT ); Mon, 26 Sep 2022 06:28:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 604054E617; Mon, 26 Sep 2022 03:18:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DAC1CB8092B; Mon, 26 Sep 2022 10:18:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3031FC433D6; Mon, 26 Sep 2022 10:18:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187537; bh=kilsucVro4tNf5JKW2sp1Ded+vAtCYD4sJLn071u4M4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c7MSPkkj2K+Y7FDvi0NDSqI6Rsri+CN++bj/2AvpvSNLLNyPt0gPqriU1x5aO5GwX ms1V8I2xQdMYgZs1v2sUnLSY8wTolL80g64nlCd2D/gm7TMbs4WKkq5HszArNp4wg4 WZ0SLeb518oy6kY4oYPZ66QtIvf9l9eyVgo5R3A0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lu Wei , Eric Dumazet , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 39/58] ipvlan: Fix out-of-bound bugs caused by unset skb->mac_header Date: Mon, 26 Sep 2022 12:11:58 +0200 Message-Id: <20220926100742.891632544@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Lu Wei [ Upstream commit 81225b2ea161af48e093f58e8dfee6d705b16af4 ] If an AF_PACKET socket is used to send packets through ipvlan and the default xmit function of the AF_PACKET socket is changed from dev_queue_xmit() to packet_direct_xmit() via setsockopt() with the option name of PACKET_QDISC_BYPASS, the skb->mac_header may not be reset and remains as the initial value of 65535, this may trigger slab-out-of-bounds bugs as following: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D UG: KASAN: slab-out-of-bounds in ipvlan_xmit_mode_l2+0xdb/0x330 [ipvlan] PU: 2 PID: 1768 Comm: raw_send Kdump: loaded Not tainted 6.0.0-rc4+ #6 ardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 all Trace: print_address_description.constprop.0+0x1d/0x160 print_report.cold+0x4f/0x112 kasan_report+0xa3/0x130 ipvlan_xmit_mode_l2+0xdb/0x330 [ipvlan] ipvlan_start_xmit+0x29/0xa0 [ipvlan] __dev_direct_xmit+0x2e2/0x380 packet_direct_xmit+0x22/0x60 packet_snd+0x7c9/0xc40 sock_sendmsg+0x9a/0xa0 __sys_sendto+0x18a/0x230 __x64_sys_sendto+0x74/0x90 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd The root cause is: 1. packet_snd() only reset skb->mac_header when sock->type is SOCK_RAW and skb->protocol is not specified as in packet_parse_headers() 2. packet_direct_xmit() doesn't reset skb->mac_header as dev_queue_xmit() In this case, skb->mac_header is 65535 when ipvlan_xmit_mode_l2() is called. So when ipvlan_xmit_mode_l2() gets mac header with eth_hdr() which use "skb->head + skb->mac_header", out-of-bound access occurs. This patch replaces eth_hdr() with skb_eth_hdr() in ipvlan_xmit_mode_l2() and reset mac header in multicast to solve this out-of-bound bug. Fixes: 2ad7bf363841 ("ipvlan: Initial check-in of the IPVLAN driver.") Signed-off-by: Lu Wei Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/net/ipvlan/ipvlan_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_c= ore.c index 40ac60904c8d..63f0226b0a70 100644 --- a/drivers/net/ipvlan/ipvlan_core.c +++ b/drivers/net/ipvlan/ipvlan_core.c @@ -502,7 +502,6 @@ static int ipvlan_process_v6_outbound(struct sk_buff *s= kb) =20 static int ipvlan_process_outbound(struct sk_buff *skb) { - struct ethhdr *ethh =3D eth_hdr(skb); int ret =3D NET_XMIT_DROP; =20 /* The ipvlan is a pseudo-L2 device, so the packets that we receive @@ -512,6 +511,8 @@ static int ipvlan_process_outbound(struct sk_buff *skb) if (skb_mac_header_was_set(skb)) { /* In this mode we dont care about * multicast and broadcast traffic */ + struct ethhdr *ethh =3D eth_hdr(skb); + if (is_multicast_ether_addr(ethh->h_dest)) { pr_debug_ratelimited( "Dropped {multi|broad}cast of type=3D[%x]\n", @@ -596,7 +597,7 @@ static int ipvlan_xmit_mode_l3(struct sk_buff *skb, str= uct net_device *dev) static int ipvlan_xmit_mode_l2(struct sk_buff *skb, struct net_device *dev) { const struct ipvl_dev *ipvlan =3D netdev_priv(dev); - struct ethhdr *eth =3D eth_hdr(skb); + struct ethhdr *eth =3D skb_eth_hdr(skb); struct ipvl_addr *addr; void *lyr3h; int addr_type; @@ -626,6 +627,7 @@ static int ipvlan_xmit_mode_l2(struct sk_buff *skb, str= uct net_device *dev) return dev_forward_skb(ipvlan->phy_dev, skb); =20 } else if (is_multicast_ether_addr(eth->h_dest)) { + skb_reset_mac_header(skb); ipvlan_skb_crossing_ns(skb, NULL); ipvlan_multicast_enqueue(ipvlan->port, skb, true); return NET_XMIT_SUCCESS; --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF5A4C07E9D for ; Mon, 26 Sep 2022 10:30:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235765AbiIZKag (ORCPT ); Mon, 26 Sep 2022 06:30:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235641AbiIZK2o (ORCPT ); Mon, 26 Sep 2022 06:28:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 158964E623; Mon, 26 Sep 2022 03:19:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B16B0B80926; Mon, 26 Sep 2022 10:19:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2AA02C433D6; Mon, 26 Sep 2022 10:18:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187540; bh=7GK2AKFlWUrcqmq7eNKe1bJ+5y4F9zZSwGlM48csltU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vrOa5QDabZLoOg7GKsVTA5q6mfXI6PlPbWHKEomfVj1GmNYvu2px2MSvDzyiD0LHH UDgFm6emeXn+3B9OseIepAOjqL8Gc2wx7En8yTLkDvOfKyTv4CT6ZaTGrPzsc5b5g+ 5IrzieCYHF+IfUAxdEUI3/PBXThAXQ3sZcv34Q48= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benjamin Poirier , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 40/58] net: team: Unsync device addresses on ndo_stop Date: Mon, 26 Sep 2022 12:11:59 +0200 Message-Id: <20220926100742.930754398@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Benjamin Poirier [ Upstream commit bd60234222b2fd5573526da7bcd422801f271f5f ] Netdev drivers are expected to call dev_{uc,mc}_sync() in their ndo_set_rx_mode method and dev_{uc,mc}_unsync() in their ndo_stop method. This is mentioned in the kerneldoc for those dev_* functions. The team driver calls dev_{uc,mc}_unsync() during ndo_uninit instead of ndo_stop. This is ineffective because address lists (dev->{uc,mc}) have already been emptied in unregister_netdevice_many() before ndo_uninit is called. This mistake can result in addresses being leftover on former team ports after a team device has been deleted; see test_LAG_cleanup() in the last patch in this series. Add unsync calls at their expected location, team_close(). v3: * When adding or deleting a port, only sync/unsync addresses if the team device is up. In other cases, it is taken care of at the right time by ndo_open/ndo_set_rx_mode/ndo_stop. Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device") Signed-off-by: Benjamin Poirier Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/net/team/team.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 8a1e9dba1249..2410f08e2bb5 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -1280,10 +1280,12 @@ static int team_port_add(struct team *team, struct = net_device *port_dev, } } =20 - netif_addr_lock_bh(dev); - dev_uc_sync_multiple(port_dev, dev); - dev_mc_sync_multiple(port_dev, dev); - netif_addr_unlock_bh(dev); + if (dev->flags & IFF_UP) { + netif_addr_lock_bh(dev); + dev_uc_sync_multiple(port_dev, dev); + dev_mc_sync_multiple(port_dev, dev); + netif_addr_unlock_bh(dev); + } =20 port->index =3D -1; list_add_tail_rcu(&port->list, &team->port_list); @@ -1354,8 +1356,10 @@ static int team_port_del(struct team *team, struct n= et_device *port_dev) netdev_rx_handler_unregister(port_dev); team_port_disable_netpoll(port); vlan_vids_del_by_dev(port_dev, dev); - dev_uc_unsync(port_dev, dev); - dev_mc_unsync(port_dev, dev); + if (dev->flags & IFF_UP) { + dev_uc_unsync(port_dev, dev); + dev_mc_unsync(port_dev, dev); + } dev_close(port_dev); team_port_leave(team, port); =20 @@ -1703,6 +1707,14 @@ static int team_open(struct net_device *dev) =20 static int team_close(struct net_device *dev) { + struct team *team =3D netdev_priv(dev); + struct team_port *port; + + list_for_each_entry(port, &team->port_list, list) { + dev_uc_unsync(port->dev, dev); + dev_mc_unsync(port->dev, dev); + } + return 0; } =20 --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A24DC32771 for ; Mon, 26 Sep 2022 10:31:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235622AbiIZKbU (ORCPT ); Mon, 26 Sep 2022 06:31:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235668AbiIZK2s (ORCPT ); Mon, 26 Sep 2022 06:28:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C3864E635; Mon, 26 Sep 2022 03:19:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2AFE560B9A; Mon, 26 Sep 2022 10:19:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B912C433D6; Mon, 26 Sep 2022 10:19:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187543; bh=YPPEjoCPjC9HlGhDQWssN0d3LCxUhreMTxZRurIUMl8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u+zuHRepmM/TGfyPZr6WRE5mVod6qUeb6Ndk7Vx4x6cN0aaLSI/e1ao6h96heJG36 LesoH+9WRukqhz/Tw+DibMDh9BjMRW4u+gi5xv/38bYL0mBUfbjHKohRqhMddjHRav hCve4iYBHB0zWW42HiDztfWLNmvoy6V2FoG9SHo8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , kernel test robot , Thomas Bogendoerfer , John Crispin , linux-mips@vger.kernel.org, Sasha Levin Subject: [PATCH 4.19 41/58] MIPS: lantiq: export clk_get_io() for lantiq_wdt.ko Date: Mon, 26 Sep 2022 12:12:00 +0200 Message-Id: <20220926100742.963610389@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Randy Dunlap [ Upstream commit 502550123bee6a2ffa438409b5b9aad4d6db3a8c ] The lantiq WDT driver uses clk_get_io(), which is not exported, so export it to fix a build error: ERROR: modpost: "clk_get_io" [drivers/watchdog/lantiq_wdt.ko] undefined! Fixes: 287e3f3f4e68 ("MIPS: lantiq: implement support for clkdev api") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Thomas Bogendoerfer Cc: John Crispin Cc: linux-mips@vger.kernel.org Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- arch/mips/lantiq/clk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/lantiq/clk.c b/arch/mips/lantiq/clk.c index f5fab99d1751..851f6bf925a6 100644 --- a/arch/mips/lantiq/clk.c +++ b/arch/mips/lantiq/clk.c @@ -52,6 +52,7 @@ struct clk *clk_get_io(void) { return &cpu_clk_generic[2]; } +EXPORT_SYMBOL_GPL(clk_get_io); =20 struct clk *clk_get_ppe(void) { --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4AD9C32771 for ; Mon, 26 Sep 2022 10:30:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235817AbiIZKay (ORCPT ); Mon, 26 Sep 2022 06:30:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235696AbiIZK2x (ORCPT ); Mon, 26 Sep 2022 06:28:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B12914E844; Mon, 26 Sep 2022 03:19:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4119A60B7E; Mon, 26 Sep 2022 10:19:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 333B4C433D7; Mon, 26 Sep 2022 10:19:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187546; bh=Bj2v3nwe6fdlLQ3qvbwTokg5tL8tDF3wlKOTFLUxep0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gYrrODSQWwCuVTp0DSfBpgpg3nsc90Y5dEJJ9B14e+r/bCe98sm1ZF5Dzvyqe9z+a FJAREayE6QyShdd4ABNfHhx7Rpr5mlciPAf1UFQDsVdUXRqmgnIEt81nr47J4UvR4z lXRCv9ZDxE9yBu/l2K2MLCuVaOv/tfMc5mk6MquE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michal Jaron , Mateusz Palczewski , Konrad Jankowski , Tony Nguyen , Sasha Levin Subject: [PATCH 4.19 42/58] i40e: Fix VF set max MTU size Date: Mon, 26 Sep 2022 12:12:01 +0200 Message-Id: <20220926100742.992724603@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Michal Jaron [ Upstream commit 372539def2824c43b6afe2403045b140f65c5acc ] Max MTU sent to VF is set to 0 during memory allocation. It cause that max MTU on VF is changed to IAVF_MAX_RXBUFFER and does not depend on data from HW. Set max_mtu field in virtchnl_vf_resource struct to inform VF in GET_VF_RESOURCES msg what size should be max frame. Fixes: dab86afdbbd1 ("i40e/i40evf: Change the way we limit the maximum fram= e size for Rx") Signed-off-by: Michal Jaron Signed-off-by: Mateusz Palczewski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- .../ethernet/intel/i40e/i40e_virtchnl_pf.c | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/n= et/ethernet/intel/i40e/i40e_virtchnl_pf.c index a39a8fe073ca..973350b34e08 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -1712,6 +1712,25 @@ static void i40e_del_qch(struct i40e_vf *vf) } } =20 +/** + * i40e_vc_get_max_frame_size + * @vf: pointer to the VF + * + * Max frame size is determined based on the current port's max frame size= and + * whether a port VLAN is configured on this VF. The VF is not aware wheth= er + * it's in a port VLAN so the PF needs to account for this in max frame si= ze + * checks and sending the max frame size to the VF. + **/ +static u16 i40e_vc_get_max_frame_size(struct i40e_vf *vf) +{ + u16 max_frame_size =3D vf->pf->hw.phy.link_info.max_frame_size; + + if (vf->port_vlan_id) + max_frame_size -=3D VLAN_HLEN; + + return max_frame_size; +} + /** * i40e_vc_get_vf_resources_msg * @vf: pointer to the VF info @@ -1814,6 +1833,7 @@ static int i40e_vc_get_vf_resources_msg(struct i40e_v= f *vf, u8 *msg) vfres->max_vectors =3D pf->hw.func_caps.num_msix_vectors_vf; vfres->rss_key_size =3D I40E_HKEY_ARRAY_SIZE; vfres->rss_lut_size =3D I40E_VF_HLUT_ARRAY_SIZE; + vfres->max_mtu =3D i40e_vc_get_max_frame_size(vf); =20 if (vf->lan_vsi_idx) { vfres->vsi_res[0].vsi_id =3D vf->lan_vsi_id; --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 526C3C07E9D for ; Mon, 26 Sep 2022 10:31:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235860AbiIZKbI (ORCPT ); Mon, 26 Sep 2022 06:31:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235731AbiIZK3A (ORCPT ); Mon, 26 Sep 2022 06:29:00 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86494371B7; Mon, 26 Sep 2022 03:19:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0060AB80915; Mon, 26 Sep 2022 10:19:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4485DC433C1; Mon, 26 Sep 2022 10:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187549; bh=QrpR7eGmWGJOFeCxljvXhM5dhUNxn0kd5pVLLRFuS/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cgJBad8oV+ZvGIk7d/ZeuKl4Tryqf67/EkyTmJwYGcaXY3Evoq4tOY8glRWF9AaGq Ehev3tBm272mhc2r/2OjfVbUIeme46W3CevdPWgsjWGqbMPKInTWi1n+2gzbr9KZ5Q CAeWQ5BW2NO3GhMEjCXylExmEdE8k0kqFmq9xtqE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michal Jaron , Andrii Staikov , Bharathi Sreenivas , Tony Nguyen , Sasha Levin Subject: [PATCH 4.19 43/58] i40e: Fix set max_tx_rate when it is lower than 1 Mbps Date: Mon, 26 Sep 2022 12:12:02 +0200 Message-Id: <20220926100743.020399776@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Michal Jaron [ Upstream commit 198eb7e1b81d8ba676d0f4f120c092032ae69a8e ] While converting max_tx_rate from bytes to Mbps, this value was set to 0, if the original value was lower than 125000 bytes (1 Mbps). This would cause no transmission rate limiting to occur. This happened due to lack of check of max_tx_rate against the 1 Mbps value for max_tx_rate and the following division by 125000. Fix this issue by adding a helper i40e_bw_bytes_to_mbits() which sets max_tx_rate to minimum usable value of 50 Mbps, if its value is less than 1 Mbps, otherwise do the required conversion by dividing by 125000. Fixes: 5ecae4120a6b ("i40e: Refactor VF BW rate limiting") Signed-off-by: Michal Jaron Signed-off-by: Andrii Staikov Tested-by: Bharathi Sreenivas Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/net/ethernet/intel/i40e/i40e_main.c | 32 +++++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethe= rnet/intel/i40e/i40e_main.c index 85337806efc7..9669d8c8b6c7 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -5487,6 +5487,26 @@ static int i40e_get_link_speed(struct i40e_vsi *vsi) } } =20 +/** + * i40e_bw_bytes_to_mbits - Convert max_tx_rate from bytes to mbits + * @vsi: Pointer to vsi structure + * @max_tx_rate: max TX rate in bytes to be converted into Mbits + * + * Helper function to convert units before send to set BW limit + **/ +static u64 i40e_bw_bytes_to_mbits(struct i40e_vsi *vsi, u64 max_tx_rate) +{ + if (max_tx_rate < I40E_BW_MBPS_DIVISOR) { + dev_warn(&vsi->back->pdev->dev, + "Setting max tx rate to minimum usable value of 50Mbps.\n"); + max_tx_rate =3D I40E_BW_CREDIT_DIVISOR; + } else { + do_div(max_tx_rate, I40E_BW_MBPS_DIVISOR); + } + + return max_tx_rate; +} + /** * i40e_set_bw_limit - setup BW limit for Tx traffic based on max_tx_rate * @vsi: VSI to be configured @@ -5509,10 +5529,10 @@ int i40e_set_bw_limit(struct i40e_vsi *vsi, u16 sei= d, u64 max_tx_rate) max_tx_rate, seid); return -EINVAL; } - if (max_tx_rate && max_tx_rate < 50) { + if (max_tx_rate && max_tx_rate < I40E_BW_CREDIT_DIVISOR) { dev_warn(&pf->pdev->dev, "Setting max tx rate to minimum usable value of 50Mbps.\n"); - max_tx_rate =3D 50; + max_tx_rate =3D I40E_BW_CREDIT_DIVISOR; } =20 /* Tx rate credits are in values of 50Mbps, 0 is disabled */ @@ -6949,9 +6969,9 @@ static int i40e_setup_tc(struct net_device *netdev, v= oid *type_data) =20 if (pf->flags & I40E_FLAG_TC_MQPRIO) { if (vsi->mqprio_qopt.max_rate[0]) { - u64 max_tx_rate =3D vsi->mqprio_qopt.max_rate[0]; + u64 max_tx_rate =3D i40e_bw_bytes_to_mbits(vsi, + vsi->mqprio_qopt.max_rate[0]); =20 - do_div(max_tx_rate, I40E_BW_MBPS_DIVISOR); ret =3D i40e_set_bw_limit(vsi, vsi->seid, max_tx_rate); if (!ret) { u64 credits =3D max_tx_rate; @@ -9613,10 +9633,10 @@ static void i40e_rebuild(struct i40e_pf *pf, bool r= einit, bool lock_acquired) } =20 if (vsi->mqprio_qopt.max_rate[0]) { - u64 max_tx_rate =3D vsi->mqprio_qopt.max_rate[0]; + u64 max_tx_rate =3D i40e_bw_bytes_to_mbits(vsi, + vsi->mqprio_qopt.max_rate[0]); u64 credits =3D 0; =20 - do_div(max_tx_rate, I40E_BW_MBPS_DIVISOR); ret =3D i40e_set_bw_limit(vsi, vsi->seid, max_tx_rate); if (ret) goto end_unlock; --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E36D2C32771 for ; Mon, 26 Sep 2022 10:31:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235671AbiIZKbn (ORCPT ); Mon, 26 Sep 2022 06:31:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235832AbiIZK3W (ORCPT ); Mon, 26 Sep 2022 06:29:22 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29F7B4DB1E; Mon, 26 Sep 2022 03:19:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id AE2E4CE10E0; Mon, 26 Sep 2022 10:19:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83C39C433D6; Mon, 26 Sep 2022 10:19:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187556; bh=bXYP9ZTEEApxdXMoWaLzr91TPKZYdnrgJpmYCepzV2Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gl1omk+4GXCqzYVHBkcRz1xHMTHeQjyG1lrM2fi0omHFgi9kcOR19MmtL0IogYKQZ pFKHgx9vyHYu6BbI4tJmoi6wV5AuufQJ5tEseBQlrr8yRLS/HRoWrbD9+bGi/I4b65 icPaOL2v2MgxUje+yWg+iObQ8KoMmtHmF/BiY/t8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Liang He , Jakub Kicinski , Sasha Levin Subject: [PATCH 4.19 44/58] of: mdio: Add of_node_put() when breaking out of for_each_xx Date: Mon, 26 Sep 2022 12:12:03 +0200 Message-Id: <20220926100743.058052699@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Liang He [ Upstream commit 1c48709e6d9d353acaaac1d8e33474756b121d78 ] In of_mdiobus_register(), we should call of_node_put() for 'child' escaped out of for_each_available_child_of_node(). Fixes: 66bdede495c7 ("of_mdio: Fix broken PHY IRQ in case of probe deferral= ") Co-developed-by: Miaoqian Lin Signed-off-by: Miaoqian Lin Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220913125659.3331969-1-windhl@126.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/of/of_mdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index 100adacfdca9..9031c57aa1b5 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -283,6 +283,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct de= vice_node *np) return 0; =20 unregister: + of_node_put(child); mdiobus_unregister(mdio); return rc; } --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDF4DC07E9D for ; Mon, 26 Sep 2022 10:31:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235627AbiIZKbf (ORCPT ); Mon, 26 Sep 2022 06:31:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235840AbiIZK3X (ORCPT ); Mon, 26 Sep 2022 06:29:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DB984F18D; Mon, 26 Sep 2022 03:19:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5481DB80915; Mon, 26 Sep 2022 10:19:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92143C433D6; Mon, 26 Sep 2022 10:19:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187559; bh=jV757kq0hb6E2aZNzIB+EPxXTX261i872YgWBNjWJWs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PxNdxUqCYWIMDicHZU60K/YpkknpdG+7b5pukfAG1UNp/J+fpRpax4IjICOCAygbC q4AjEI5ibZvl5EYPYow4016RLWmkXOMHuC4maT4eYGn6faIIlRE+/O1dOMa5JJNLPi hJDt8bnVvdo2Ac8Yoa+L5XmM6kNQdDTjZyO7X4C8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Florian Westphal , Sasha Levin , syzbot+a24c5252f3e3ab733464@syzkaller.appspotmail.com Subject: [PATCH 4.19 45/58] netfilter: ebtables: fix memory leak when blob is malformed Date: Mon, 26 Sep 2022 12:12:04 +0200 Message-Id: <20220926100743.096771934@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Florian Westphal [ Upstream commit 62ce44c4fff947eebdf10bb582267e686e6835c9 ] The bug fix was incomplete, it "replaced" crash with a memory leak. The old code had an assignment to "ret" embedded into the conditional, restore this. Fixes: 7997eff82828 ("netfilter: ebtables: reject blobs that don't provide = all entry points") Reported-and-tested-by: syzbot+a24c5252f3e3ab733464@syzkaller.appspotmail.c= om Signed-off-by: Florian Westphal Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- net/bridge/netfilter/ebtables.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtable= s.c index ea27bacbd005..59d8974ee92b 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c @@ -1003,8 +1003,10 @@ static int do_replace_finish(struct net *net, struct= ebt_replace *repl, goto free_iterate; } =20 - if (repl->valid_hooks !=3D t->valid_hooks) + if (repl->valid_hooks !=3D t->valid_hooks) { + ret =3D -EINVAL; goto free_unlock; + } =20 if (repl->num_counters && repl->num_counters !=3D t->private->nentries) { ret =3D -EINVAL; --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7454C6FA83 for ; Mon, 26 Sep 2022 10:32:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235634AbiIZKb5 (ORCPT ); Mon, 26 Sep 2022 06:31:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235853AbiIZK3Z (ORCPT ); Mon, 26 Sep 2022 06:29:25 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83B024F1A3; Mon, 26 Sep 2022 03:19:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 53395B8092B; Mon, 26 Sep 2022 10:19:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4ABAC433D7; Mon, 26 Sep 2022 10:19:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187562; bh=ymJG0BjZD0x8Z2sX6CSifbF+Ybf81aI2fY5y2fBtQcw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C3NN1oQhxYNeth8wX20CknnydicgyZtLpk+8G+81blmb9bfZhuByjs7XyomNaA9il FghQWaInmj52mWGBlRhFeehI+OCMNwhuGgnsjCFxMrjda3KbFxbJSuaPZ2MAvacTR7 c/Z5fxcABAsCydkFe8sd4HUamj1G383zfM72uRew= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marc Kleine-Budde , Sasha Levin Subject: [PATCH 4.19 46/58] can: gs_usb: gs_can_open(): fix race dev->can.state condition Date: Mon, 26 Sep 2022 12:12:05 +0200 Message-Id: <20220926100743.135293511@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Marc Kleine-Budde [ Upstream commit 5440428b3da65408dba0241985acb7a05258b85e ] The dev->can.state is set to CAN_STATE_ERROR_ACTIVE, after the device has been started. On busy networks the CAN controller might receive CAN frame between and go into an error state before the dev->can.state is assigned. Assign dev->can.state before starting the controller to close the race window. Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices= ") Link: https://lore.kernel.org/all/20220920195216.232481-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/net/can/usb/gs_usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c index 2101b2fab7df..62ca4964a863 100644 --- a/drivers/net/can/usb/gs_usb.c +++ b/drivers/net/can/usb/gs_usb.c @@ -686,6 +686,7 @@ static int gs_can_open(struct net_device *netdev) flags |=3D GS_CAN_MODE_TRIPLE_SAMPLE; =20 /* finally start device */ + dev->can.state =3D CAN_STATE_ERROR_ACTIVE; dm->mode =3D cpu_to_le32(GS_CAN_MODE_START); dm->flags =3D cpu_to_le32(flags); rc =3D usb_control_msg(interface_to_usbdev(dev->iface), @@ -702,13 +703,12 @@ static int gs_can_open(struct net_device *netdev) if (rc < 0) { netdev_err(netdev, "Couldn't start device (err=3D%d)\n", rc); kfree(dm); + dev->can.state =3D CAN_STATE_STOPPED; return rc; } =20 kfree(dm); =20 - dev->can.state =3D CAN_STATE_ERROR_ACTIVE; - parent->active_channels++; if (!(dev->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)) netif_start_queue(netdev); --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17421C07E9D for ; Mon, 26 Sep 2022 10:32:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235764AbiIZKcC (ORCPT ); Mon, 26 Sep 2022 06:32:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235863AbiIZK31 (ORCPT ); Mon, 26 Sep 2022 06:29:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 754B34F1A6; Mon, 26 Sep 2022 03:19:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DEE5460BB1; Mon, 26 Sep 2022 10:19:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEDE3C433D7; Mon, 26 Sep 2022 10:19:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187565; bh=BeLwktw184kwrMLr9iq2nkZ4gwzXwvVuNsdWxpXBr+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o8VzaV0ycCBl0Sg6oySDUorbt+JyYAPT+H7WFKVQ5hVSznZZMMt0b++LOgu+COCSe r5Xu9t0hLvc/EsNMsfbOYZsulGB7TT0QfW880xnTaGyLfdBtwRU56R4nYc/dPYLeTO CVF9hyEhVXmtiveTjwEgTmnDWihqc9efCrpVMU1E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leo Yan , Lieven Hey , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 4.19 47/58] perf jit: Include program header in ELF files Date: Mon, 26 Sep 2022 12:12:06 +0200 Message-Id: <20220926100743.163390892@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Lieven Hey [ Upstream commit babd04386b1df8c364cdaa39ac0e54349502e1e5 ] The missing header makes it hard for programs like elfutils to open these files. Fixes: 2d86612aacb7805f ("perf symbol: Correct address for bss symbols") Reviewed-by: Leo Yan Signed-off-by: Lieven Hey Tested-by: Leo Yan Cc: Leo Yan Link: https://lore.kernel.org/r/20220915092910.711036-1-lieven.hey@kdab.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- tools/perf/util/genelf.c | 14 ++++++++++++++ tools/perf/util/genelf.h | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/tools/perf/util/genelf.c b/tools/perf/util/genelf.c index afb8fe3a8e35..65e41e259af8 100644 --- a/tools/perf/util/genelf.c +++ b/tools/perf/util/genelf.c @@ -256,6 +256,7 @@ jit_write_elf(int fd, uint64_t load_addr, const char *s= ym, Elf_Data *d; Elf_Scn *scn; Elf_Ehdr *ehdr; + Elf_Phdr *phdr; Elf_Shdr *shdr; uint64_t eh_frame_base_offset; char *strsym =3D NULL; @@ -290,6 +291,19 @@ jit_write_elf(int fd, uint64_t load_addr, const char *= sym, ehdr->e_version =3D EV_CURRENT; ehdr->e_shstrndx=3D unwinding ? 4 : 2; /* shdr index for section name */ =20 + /* + * setup program header + */ + phdr =3D elf_newphdr(e, 1); + phdr[0].p_type =3D PT_LOAD; + phdr[0].p_offset =3D 0; + phdr[0].p_vaddr =3D 0; + phdr[0].p_paddr =3D 0; + phdr[0].p_filesz =3D csize; + phdr[0].p_memsz =3D csize; + phdr[0].p_flags =3D PF_X | PF_R; + phdr[0].p_align =3D 8; + /* * setup text section */ diff --git a/tools/perf/util/genelf.h b/tools/perf/util/genelf.h index de322d51c7fe..23a7401a63d0 100644 --- a/tools/perf/util/genelf.h +++ b/tools/perf/util/genelf.h @@ -41,8 +41,10 @@ int jit_add_debug_info(Elf *e, uint64_t code_addr, void = *debug, int nr_debug_ent =20 #if GEN_ELF_CLASS =3D=3D ELFCLASS64 #define elf_newehdr elf64_newehdr +#define elf_newphdr elf64_newphdr #define elf_getshdr elf64_getshdr #define Elf_Ehdr Elf64_Ehdr +#define Elf_Phdr Elf64_Phdr #define Elf_Shdr Elf64_Shdr #define Elf_Sym Elf64_Sym #define ELF_ST_TYPE(a) ELF64_ST_TYPE(a) @@ -50,8 +52,10 @@ int jit_add_debug_info(Elf *e, uint64_t code_addr, void = *debug, int nr_debug_ent #define ELF_ST_VIS(a) ELF64_ST_VISIBILITY(a) #else #define elf_newehdr elf32_newehdr +#define elf_newphdr elf32_newphdr #define elf_getshdr elf32_getshdr #define Elf_Ehdr Elf32_Ehdr +#define Elf_Phdr Elf32_Phdr #define Elf_Shdr Elf32_Shdr #define Elf_Sym Elf32_Sym #define ELF_ST_TYPE(a) ELF32_ST_TYPE(a) --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C92CDC32771 for ; Mon, 26 Sep 2022 10:36:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235918AbiIZKgF (ORCPT ); Mon, 26 Sep 2022 06:36:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235943AbiIZKdk (ORCPT ); Mon, 26 Sep 2022 06:33:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 691614F187; Mon, 26 Sep 2022 03:20:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E018060C2C; Mon, 26 Sep 2022 10:20:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1F9DC433D6; Mon, 26 Sep 2022 10:20:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187621; bh=zoFwJNAV8OYE3aCPPkf1bJp38WO9tMqisyaY5w41r3w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lE94j3upy1GPbuTlt6sg4NzntwWfYHHXfmho3Jz6cDLdraBXtJFi/lnHmdpltpJfl TpRrdwWwgVk8+MFTTVKF2a86csGZdTspha8eEH3pd+40GGea+CnTiBOSEiM+GuOItk qhZbdrNuOxu//XB0qQJ0DeEG6lOiT42tB/IOSLww= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Dao , Adrian Hunter , Namhyung Kim , Ian Rogers , Jiri Olsa , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 4.19 48/58] perf kcore_copy: Do not check /proc/modules is unchanged Date: Mon, 26 Sep 2022 12:12:07 +0200 Message-Id: <20220926100743.209738261@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Adrian Hunter [ Upstream commit 5b427df27b94aec1312cace48a746782a0925c53 ] /proc/kallsyms and /proc/modules are compared before and after the copy in order to ensure no changes during the copy. However /proc/modules also might change due to reference counts changing even though that does not make any difference. Any modules loaded or unloaded should be visible in changes to kallsyms, so it is not necessary to check /proc/modules also anyway. Remove the comparison checking that /proc/modules is unchanged. Fixes: fc1b691d7651d949 ("perf buildid-cache: Add ability to add kcore to t= he cache") Reported-by: Daniel Dao Signed-off-by: Adrian Hunter Tested-by: Daniel Dao Acked-by: Namhyung Kim Cc: Ian Rogers Cc: Jiri Olsa Link: https://lore.kernel.org/r/20220914122429.8770-1-adrian.hunter@intel.c= om Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- tools/perf/util/symbol-elf.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index bd33d6613929..5fba57c10edd 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -1871,8 +1871,8 @@ static int kcore_copy__compare_file(const char *from_= dir, const char *to_dir, * unusual. One significant peculiarity is that the mapping (start -> pgo= ff) * is not the same for the kernel map and the modules map. That happens b= ecause * the data is copied adjacently whereas the original kcore has gaps. Fin= ally, - * kallsyms and modules files are compared with their copies to check that - * modules have not been loaded or unloaded while the copies were taking p= lace. + * kallsyms file is compared with its copy to check that modules have not = been + * loaded or unloaded while the copies were taking place. * * Return: %0 on success, %-1 on failure. */ @@ -1935,9 +1935,6 @@ int kcore_copy(const char *from_dir, const char *to_d= ir) goto out_extract_close; } =20 - if (kcore_copy__compare_file(from_dir, to_dir, "modules")) - goto out_extract_close; - if (kcore_copy__compare_file(from_dir, to_dir, "kallsyms")) goto out_extract_close; =20 --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C565EC6FA83 for ; Mon, 26 Sep 2022 10:32:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235700AbiIZKcU (ORCPT ); Mon, 26 Sep 2022 06:32:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235632AbiIZKaJ (ORCPT ); Mon, 26 Sep 2022 06:30:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5FBF1AD99; Mon, 26 Sep 2022 03:19:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 023D660B5E; Mon, 26 Sep 2022 10:19:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4CA6C433D6; Mon, 26 Sep 2022 10:19:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187590; bh=xpf3VBCUV+vbajoUKGEU25izfAZdtkyl5dtrqwY9HQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gOrCPghycjvRnRiePZWm3q0arGCj6pHAOmKwVKyGoECvReubu0uLqXH0wLLJW/O8Y 4XIYxmPZw9gAlQOUEGy9mRKvtTnVaKI7PYYbkeUUTqx2VYf+gY0p7Wr4Ee1zW2yvSm q2dUcMUB9En8L/5aeuIOlbdL+KUbwMasdliMPDLY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sean Anderson , Andrew Lunn , Jakub Kicinski , Sasha Levin Subject: [PATCH 4.19 49/58] net: sunhme: Fix packet reception for len < RX_COPY_THRESHOLD Date: Mon, 26 Sep 2022 12:12:08 +0200 Message-Id: <20220926100743.247701751@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sean Anderson [ Upstream commit 878e2405710aacfeeb19364c300f38b7a9abfe8f ] There is a separate receive path for small packets (under 256 bytes). Instead of allocating a new dma-capable skb to be used for the next packet, this path allocates a skb and copies the data into it (reusing the existing sbk for the next packet). There are two bytes of junk data at the beginning of every packet. I believe these are inserted in order to allow aligned DMA and IP headers. We skip over them using skb_reserve. Before copying over the data, we must use a barrier to ensure we see the whole packet. The current code only synchronizes len bytes, starting from the beginning of the packet, including the junk bytes. However, this leaves off the final two bytes in the packet. Synchronize the whole packet. To reproduce this problem, ping a HME with a payload size between 17 and 214 $ ping -s 17 which will complain rather loudly about the data mismatch. Small packets (below 60 bytes on the wire) do not have this issue. I suspect this is related to the padding added to increase the minimum packet size. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Sean Anderson Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220920235018.1675956-1-seanga2@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/net/ethernet/sun/sunhme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/s= unhme.c index 882908e74cc9..a4090163d870 100644 --- a/drivers/net/ethernet/sun/sunhme.c +++ b/drivers/net/ethernet/sun/sunhme.c @@ -2064,9 +2064,9 @@ static void happy_meal_rx(struct happy_meal *hp, stru= ct net_device *dev) =20 skb_reserve(copy_skb, 2); skb_put(copy_skb, len); - dma_sync_single_for_cpu(hp->dma_dev, dma_addr, len, DMA_FROM_DEVICE); + dma_sync_single_for_cpu(hp->dma_dev, dma_addr, len + 2, DMA_FROM_DEVICE= ); skb_copy_from_linear_data(skb, copy_skb->data, len); - dma_sync_single_for_device(hp->dma_dev, dma_addr, len, DMA_FROM_DEVICE); + dma_sync_single_for_device(hp->dma_dev, dma_addr, len + 2, DMA_FROM_DEV= ICE); /* Reuse original ring buffer. */ hme_write_rxd(hp, this, (RXFLAG_OWN|((RX_BUF_ALLOC_SIZE-RX_OFFSET)<<16)), --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97635C07E9D for ; Mon, 26 Sep 2022 10:33:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235683AbiIZKdM (ORCPT ); Mon, 26 Sep 2022 06:33:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235838AbiIZKcR (ORCPT ); Mon, 26 Sep 2022 06:32:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BD2313D58; Mon, 26 Sep 2022 03:20:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3B4EC60C13; Mon, 26 Sep 2022 10:19:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C199C433B5; Mon, 26 Sep 2022 10:19:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187596; bh=7HBmAuhPb5o3FENGESmDLJQKWU/eOkJ36nJ8sQoppRU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=klXYiK3TlpxPhR0kInrwPoLLnUPfee2vL+frQaBdwMW0Wpr4JinMQrmMU0iABwwma 43WOmchn9o1YATIJdGOY0zHOPBohP+nOufbG1uMHlOMrkbF4yCd8X7jr1/4VY1G2Sj f59Ungh/ALzkXOuZWTCNYf8WHqChcR7DX7UlA+Ag= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Shevchenko , stable , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 4.19 50/58] serial: Create uart_xmit_advance() Date: Mon, 26 Sep 2022 12:12:09 +0200 Message-Id: <20220926100743.282052924@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ilpo J=C3=A4rvinen commit e77cab77f2cb3a1ca2ba8df4af45bb35617ac16d upstream. A very common pattern in the drivers is to advance xmit tail index and do bookkeeping of Tx'ed characters. Create uart_xmit_advance() to handle it. Reviewed-by: Andy Shevchenko Cc: stable Signed-off-by: Ilpo J=C3=A4rvinen Link: https://lore.kernel.org/r/20220901143934.8850-2-ilpo.jarvinen@linux.i= ntel.com Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- include/linux/serial_core.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -306,6 +306,23 @@ struct uart_state { /* number of characters left in xmit buffer before we ask for more */ #define WAKEUP_CHARS 256 =20 +/** + * uart_xmit_advance - Advance xmit buffer and account Tx'ed chars + * @up: uart_port structure describing the port + * @chars: number of characters sent + * + * This function advances the tail of circular xmit buffer by the number of + * @chars transmitted and handles accounting of transmitted bytes (into + * @up's icount.tx). + */ +static inline void uart_xmit_advance(struct uart_port *up, unsigned int ch= ars) +{ + struct circ_buf *xmit =3D &up->state->xmit; + + xmit->tail =3D (xmit->tail + chars) & (UART_XMIT_SIZE - 1); + up->icount.tx +=3D chars; +} + struct module; struct tty_driver; =20 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02B80C32771 for ; Mon, 26 Sep 2022 10:34:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235900AbiIZKdd (ORCPT ); Mon, 26 Sep 2022 06:33:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235876AbiIZKc7 (ORCPT ); Mon, 26 Sep 2022 06:32:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 115AD1AF0F; Mon, 26 Sep 2022 03:20:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 42DB660B7E; Mon, 26 Sep 2022 10:20:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D6F1C433D6; Mon, 26 Sep 2022 10:19:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187599; bh=UrYpoJkOcC+Z/4HedVZyNA5cwMtyJQfPL+QJGcXp3k0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KNbWDlr1TQJpJDk2DG2FdQ3fCkqT5gZJMxrcxE4sUnwEj8uMY1bm9DNah2jb5/Zu0 agDBPfyIdPudnVKg0dMYdRtgbIIIl3rwHu9ZQtNHhsy5Fngl/4JeC5fzMsOMvj/ZUg 5rKYLKwx5f96t+81l2d3bLhTcNVB9ED4EKZI2HJw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Shevchenko , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 4.19 51/58] serial: tegra: Use uart_xmit_advance(), fixes icount.tx accounting Date: Mon, 26 Sep 2022 12:12:10 +0200 Message-Id: <20220926100743.320354793@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ilpo J=C3=A4rvinen commit 754f68044c7dd6c52534ba3e0f664830285c4b15 upstream. DMA complete & stop paths did not correctly account Tx'ed characters into icount.tx. Using uart_xmit_advance() fixes the problem. Fixes: e9ea096dd225 ("serial: tegra: add serial driver") Cc: # serial: Create uart_xmit_advance() Reviewed-by: Andy Shevchenko Signed-off-by: Ilpo J=C3=A4rvinen Link: https://lore.kernel.org/r/20220901143934.8850-3-ilpo.jarvinen@linux.i= ntel.com Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/tty/serial/serial-tegra.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/drivers/tty/serial/serial-tegra.c +++ b/drivers/tty/serial/serial-tegra.c @@ -398,7 +398,7 @@ static void tegra_uart_tx_dma_complete(v count =3D tup->tx_bytes_requested - state.residue; async_tx_ack(tup->tx_dma_desc); spin_lock_irqsave(&tup->uport.lock, flags); - xmit->tail =3D (xmit->tail + count) & (UART_XMIT_SIZE - 1); + uart_xmit_advance(&tup->uport, count); tup->tx_in_progress =3D 0; if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(&tup->uport); @@ -482,7 +482,6 @@ static unsigned int tegra_uart_tx_empty( static void tegra_uart_stop_tx(struct uart_port *u) { struct tegra_uart_port *tup =3D to_tegra_uport(u); - struct circ_buf *xmit =3D &tup->uport.state->xmit; struct dma_tx_state state; unsigned int count; =20 @@ -493,7 +492,7 @@ static void tegra_uart_stop_tx(struct ua dmaengine_tx_status(tup->tx_dma_chan, tup->tx_cookie, &state); count =3D tup->tx_bytes_requested - state.residue; async_tx_ack(tup->tx_dma_desc); - xmit->tail =3D (xmit->tail + count) & (UART_XMIT_SIZE - 1); + uart_xmit_advance(&tup->uport, count); tup->tx_in_progress =3D 0; } =20 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EA3BC32771 for ; Mon, 26 Sep 2022 10:33:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235869AbiIZKd0 (ORCPT ); Mon, 26 Sep 2022 06:33:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235675AbiIZKc5 (ORCPT ); Mon, 26 Sep 2022 06:32:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 318C82250C; Mon, 26 Sep 2022 03:20:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 70F6960BAF; Mon, 26 Sep 2022 10:20:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6941EC433C1; Mon, 26 Sep 2022 10:20:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187602; bh=75DfJ5Yqg1z2SFT3L+O7MKMIFpGoOqNpgcehWq6lixc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bIYqc2LMs/2lqB3N8UKZJjg+8lXWEkC9iq9ffMP5rj6mP34SpAZJz91RbMdc3N+tA 51M+AHb3iycGfUMmuiFPhVtdeTJ8BcI5LgSP9ZpE1vUTu+gP/TvWx0p69xQZHM+6KI SBcFGmW6CxfSrojF9gIKhJ9Eqndl1AytlFq2tyy0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Haberland , Jan Hoeppner , Jens Axboe Subject: [PATCH 4.19 52/58] s390/dasd: fix Oops in dasd_alias_get_start_dev due to missing pavgroup Date: Mon, 26 Sep 2022 12:12:11 +0200 Message-Id: <20220926100743.366856012@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Stefan Haberland commit db7ba07108a48c0f95b74fabbfd5d63e924f992d upstream. Fix Oops in dasd_alias_get_start_dev() function caused by the pavgroup pointer being NULL. The pavgroup pointer is checked on the entrance of the function but without the lcu->lock being held. Therefore there is a race window between dasd_alias_get_start_dev() and _lcu_update() which sets pavgroup to NULL with the lcu->lock held. Fix by checking the pavgroup pointer with lcu->lock held. Cc: # 2.6.25+ Fixes: 8e09f21574ea ("[S390] dasd: add hyper PAV support to DASD device dri= ver, part 1") Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Link: https://lore.kernel.org/r/20220919154931.4123002-2-sth@linux.ibm.com Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/s390/block/dasd_alias.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- a/drivers/s390/block/dasd_alias.c +++ b/drivers/s390/block/dasd_alias.c @@ -675,12 +675,12 @@ int dasd_alias_remove_device(struct dasd struct dasd_device *dasd_alias_get_start_dev(struct dasd_device *base_devi= ce) { struct dasd_eckd_private *alias_priv, *private =3D base_device->private; - struct alias_pav_group *group =3D private->pavgroup; struct alias_lcu *lcu =3D private->lcu; struct dasd_device *alias_device; + struct alias_pav_group *group; unsigned long flags; =20 - if (!group || !lcu) + if (!lcu) return NULL; if (lcu->pav =3D=3D NO_PAV || lcu->flags & (NEED_UAC_UPDATE | UPDATE_PENDING)) @@ -697,6 +697,11 @@ struct dasd_device *dasd_alias_get_start } =20 spin_lock_irqsave(&lcu->lock, flags); + group =3D private->pavgroup; + if (!group) { + spin_unlock_irqrestore(&lcu->lock, flags); + return NULL; + } alias_device =3D group->next; if (!alias_device) { if (list_empty(&group->aliaslist)) { From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA0F8C32771 for ; Mon, 26 Sep 2022 10:35:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235941AbiIZKff (ORCPT ); Mon, 26 Sep 2022 06:35:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235866AbiIZKdU (ORCPT ); Mon, 26 Sep 2022 06:33:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71DBB24089; Mon, 26 Sep 2022 03:20:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5AB4DB80930; Mon, 26 Sep 2022 10:20:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95135C433C1; Mon, 26 Sep 2022 10:20:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187606; bh=Xl9DQuwvvXNb/6SB5ZGg1HtsmmbR8/7Nu6p+aHx3wMs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZXRhdJlt3uqLuU90g0y4ZWkZc5xdl3FsHe/nRLKvUdJ+gROLh2Srhfl1CBxWTOyOL 6ConAUsfZE4ZsNIrdsd7BNbDN5u5g/6dw4eHehrBoJMszOBd5TJoAGgIfzI6mEb6s/ YyPMS4b+gvWhCvgjkaXpb5cjIm/u69i3PWLasOSI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Kelley , Vitaly Kuznetsov , Wei Liu , Sasha Levin Subject: [PATCH 4.19 53/58] Drivers: hv: Never allocate anything besides framebuffer from framebuffer memory region Date: Mon, 26 Sep 2022 12:12:12 +0200 Message-Id: <20220926100743.414849782@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Vitaly Kuznetsov [ Upstream commit f0880e2cb7e1f8039a048fdd01ce45ab77247221 ] Passed through PCI device sometimes misbehave on Gen1 VMs when Hyper-V DRM driver is also loaded. Looking at IOMEM assignment, we can see e.g. $ cat /proc/iomem ... f8000000-fffbffff : PCI Bus 0000:00 f8000000-fbffffff : 0000:00:08.0 f8000000-f8001fff : bb8c4f33-2ba2-4808-9f7f-02f3b4da22fe ... fe0000000-fffffffff : PCI Bus 0000:00 fe0000000-fe07fffff : bb8c4f33-2ba2-4808-9f7f-02f3b4da22fe fe0000000-fe07fffff : 2ba2:00:02.0 fe0000000-fe07fffff : mlx4_core the interesting part is the 'f8000000' region as it is actually the VM's framebuffer: $ lspci -v ... 0000:00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtu= al VGA (prog-if 00 [VGA controller]) Flags: bus master, fast devsel, latency 0, IRQ 11 Memory at f8000000 (32-bit, non-prefetchable) [size=3D64M] ... hv_vmbus: registering driver hyperv_drm hyperv_drm 5620e0c7-8062-4dce-aeb7-520c7ef76171: [drm] Synthvid Version ma= jor 3, minor 5 hyperv_drm 0000:00:08.0: vgaarb: deactivate vga console hyperv_drm 0000:00:08.0: BAR 0: can't reserve [mem 0xf8000000-0xfbffffff] hyperv_drm 5620e0c7-8062-4dce-aeb7-520c7ef76171: [drm] Cannot request fram= ebuffer, boot fb still active? Note: "Cannot request framebuffer" is not a fatal error in hyperv_setup_gen1() as the code assumes there's some other framebuffer device there but we actually have some other PCI device (mlx4 in this case) config space there! The problem appears to be that vmbus_allocate_mmio() can use dedicated framebuffer region to serve any MMIO request from any device. The semantics one might assume of a parameter named "fb_overlap_ok" aren't implemented because !fb_overlap_ok essentially has no effect. The existing semantics are really "prefer_fb_overlap". This patch implements the expected and needed semantics, which is to not allocate from the frame buffer space when !fb_overlap_ok. Note, Gen2 VMs are usually unaffected by the issue because framebuffer region is already taken by EFI fb (in case kernel supports it) but Gen1 VMs may have this region unclaimed by the time Hyper-V PCI pass-through driver tries allocating MMIO space if Hyper-V DRM/FB drivers load after it. Devices can be brought up in any sequence so let's resolve the issue by always ignoring 'fb_mmio' region for non-FB requests, even if the region is unclaimed. Reviewed-by: Michael Kelley Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20220827130345.1320254-4-vkuznets@redhat.com Signed-off-by: Wei Liu Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/hv/vmbus_drv.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index fca092cfe200..9cbe0b00ebf7 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -1846,7 +1846,7 @@ int vmbus_allocate_mmio(struct resource **new, struct= hv_device *device_obj, bool fb_overlap_ok) { struct resource *iter, *shadow; - resource_size_t range_min, range_max, start; + resource_size_t range_min, range_max, start, end; const char *dev_n =3D dev_name(&device_obj->device); int retval; =20 @@ -1881,6 +1881,14 @@ int vmbus_allocate_mmio(struct resource **new, struc= t hv_device *device_obj, range_max =3D iter->end; start =3D (range_min + align - 1) & ~(align - 1); for (; start + size - 1 <=3D range_max; start +=3D align) { + end =3D start + size - 1; + + /* Skip the whole fb_mmio region if not fb_overlap_ok */ + if (!fb_overlap_ok && fb_mmio && + (((start >=3D fb_mmio->start) && (start <=3D fb_mmio->end)) || + ((end >=3D fb_mmio->start) && (end <=3D fb_mmio->end)))) + continue; + shadow =3D __request_region(iter, start, size, NULL, IORESOURCE_BUSY); if (!shadow) --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCE06C07E9D for ; Mon, 26 Sep 2022 10:35:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235850AbiIZKfR (ORCPT ); Mon, 26 Sep 2022 06:35:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235882AbiIZKdK (ORCPT ); Mon, 26 Sep 2022 06:33:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D9E337FB0; Mon, 26 Sep 2022 03:20:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 92690B80924; Mon, 26 Sep 2022 10:20:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD5B5C433D6; Mon, 26 Sep 2022 10:20:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187609; bh=7lT88kymb+yHRk7aKUfmIghEeBPzIMSI+gUmp/ehBBM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vq9j9A1HYZW/FFCr/9iYrNELwYVk3edG9WN0cC8vN1FEJQmP0oPIQNSOK3pxVk+1e EJErgr2e2LMyxU6kJvWHUx/vzpnYWAzrwNMhRaWDe5FWbsmWEGyfUSC7Xv9EV5/04M de/EYYOS5kv7o1OTIUB3qR9yCBQ9Ey6A2xkDvOTI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Wheeler , Krunoslav Kovac , Aric Cyr , Pavle Kotarac , Yao Wang1 , Alex Deucher , Sasha Levin Subject: [PATCH 4.19 54/58] drm/amd/display: Limit user regamma to a valid value Date: Mon, 26 Sep 2022 12:12:13 +0200 Message-Id: <20220926100743.464586670@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Yao Wang1 [ Upstream commit 3601d620f22e37740cf73f8278eabf9f2aa19eb7 ] [Why] For HDR mode, we get total 512 tf_point and after switching to SDR mode we actually get 400 tf_point and the rest of points(401~512) still use dirty value from HDR mode. We should limit the rest of the points to max value. [How] Limit the value when coordinates_x.x > 1, just like what we do in translate_from_linear_space for other re-gamma build paths. Tested-by: Daniel Wheeler Reviewed-by: Krunoslav Kovac Reviewed-by: Aric Cyr Acked-by: Pavle Kotarac Signed-off-by: Yao Wang1 Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/driv= ers/gpu/drm/amd/display/modules/color/color_gamma.c index 11ea1a0e629b..4e866317ec25 100644 --- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c +++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c @@ -1206,6 +1206,7 @@ static void interpolate_user_regamma(uint32_t hw_poin= ts_num, struct fixed31_32 lut2; struct fixed31_32 delta_lut; struct fixed31_32 delta_index; + const struct fixed31_32 one =3D dc_fixpt_from_int(1); =20 i =3D 0; /* fixed_pt library has problems handling too small values */ @@ -1234,6 +1235,9 @@ static void interpolate_user_regamma(uint32_t hw_poin= ts_num, } else hw_x =3D coordinates_x[i].x; =20 + if (dc_fixpt_le(one, hw_x)) + hw_x =3D one; + norm_x =3D dc_fixpt_mul(norm_factor, hw_x); index =3D dc_fixpt_floor(norm_x); if (index < 0 || index > 255) --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67272C6FA90 for ; Mon, 26 Sep 2022 10:35:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235761AbiIZKfF (ORCPT ); Mon, 26 Sep 2022 06:35:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235883AbiIZKdK (ORCPT ); Mon, 26 Sep 2022 06:33:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DC343844E; Mon, 26 Sep 2022 03:20:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C34F960C00; Mon, 26 Sep 2022 10:20:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D01C2C433D6; Mon, 26 Sep 2022 10:20:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187612; bh=VwNcnLR2/LA/fz5sKeoJt9Vzelm+E+Rs4audF7yv7p4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wr9czHlyaqk7bdxkEIbpWUnet7dpOSP2w3hRvj45cY9fYW5b6I5S1AsP/UfmqhkVA a/g2LS9qrFCii/yqcoF/9CUEKPah8cq7rWnNjv9VtqqIC+qvzOE2mACsvs2uhukZTT EXVh0p1OZjB5MDjATVfKse7Zh4fooqmg0r8csd0M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , llvm@lists.linux.dev, Nathan Huckleberry , Nathan Chancellor , Heiko Stuebner , Sasha Levin Subject: [PATCH 4.19 55/58] drm/rockchip: Fix return type of cdn_dp_connector_mode_valid Date: Mon, 26 Sep 2022 12:12:14 +0200 Message-Id: <20220926100743.502824630@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Nathan Huckleberry [ Upstream commit b0b9408f132623dc88e78adb5282f74e4b64bb57 ] The mode_valid field in drm_connector_helper_funcs is expected to be of type: enum drm_mode_status (* mode_valid) (struct drm_connector *connector, struct drm_display_mode *mode); The mismatched return type breaks forward edge kCFI since the underlying function definition does not match the function hook definition. The return type of cdn_dp_connector_mode_valid should be changed from int to enum drm_mode_status. Reported-by: Dan Carpenter Link: https://github.com/ClangBuiltLinux/linux/issues/1703 Cc: llvm@lists.linux.dev Signed-off-by: Nathan Huckleberry Reviewed-by: Nathan Chancellor Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20220913205555.155149-1= -nhuck@google.com Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/gpu/drm/rockchip/cdn-dp-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockc= hip/cdn-dp-core.c index 3feab563e50a..3f992e5a75c9 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c @@ -284,8 +284,9 @@ static int cdn_dp_connector_get_modes(struct drm_connec= tor *connector) return ret; } =20 -static int cdn_dp_connector_mode_valid(struct drm_connector *connector, - struct drm_display_mode *mode) +static enum drm_mode_status +cdn_dp_connector_mode_valid(struct drm_connector *connector, + struct drm_display_mode *mode) { struct cdn_dp_device *dp =3D connector_to_dp(connector); struct drm_display_info *display_info =3D &dp->connector.display_info; --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8CDDC6FA86 for ; Mon, 26 Sep 2022 10:35:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235833AbiIZKfN (ORCPT ); Mon, 26 Sep 2022 06:35:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235885AbiIZKdK (ORCPT ); Mon, 26 Sep 2022 06:33:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C675E46DB7; Mon, 26 Sep 2022 03:20:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6FC14B80942; Mon, 26 Sep 2022 10:20:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF650C433D6; Mon, 26 Sep 2022 10:20:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187615; bh=/lA8fMFsNi5naxqFFBOpSbNzw7wEV7l9A2vxjowuVPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1y7+/RpPNtajYwd1NuCXtM1XJxIKFLouzrZccnXpNpJs9d8swaWSzOoudRPZ0E9kq trvb4EK3n9vF9yEagoWH0wwCyLzh3sWY1upioX2Qqf8s/9XYzIdSoiE0MUSNla8Zho ftKQjzPpeSyO6YBDjCzzsIGd0Z1sxaulv43xkWL0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hillf Danton , Lai Jiangshan , Johannes Berg , Tetsuo Handa , Tejun Heo , Sasha Levin Subject: [PATCH 4.19 56/58] workqueue: dont skip lockdep work dependency in cancel_work_sync() Date: Mon, 26 Sep 2022 12:12:15 +0200 Message-Id: <20220926100743.531837914@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Tetsuo Handa [ Upstream commit c0feea594e058223973db94c1c32a830c9807c86 ] Like Hillf Danton mentioned syzbot should have been able to catch cancel_work_sync() in work context by checking lockdep_map in __flush_work() for both flush and cancel. in [1], being unable to report an obvious deadlock scenario shown below is broken. From locking dependency perspective, sync version of cancel request should behave as if flush request, for it waits for completion of work if that work has already started execution. ---------- #include #include static DEFINE_MUTEX(mutex); static void work_fn(struct work_struct *work) { schedule_timeout_uninterruptible(HZ / 5); mutex_lock(&mutex); mutex_unlock(&mutex); } static DECLARE_WORK(work, work_fn); static int __init test_init(void) { schedule_work(&work); schedule_timeout_uninterruptible(HZ / 10); mutex_lock(&mutex); cancel_work_sync(&work); mutex_unlock(&mutex); return -EINVAL; } module_init(test_init); MODULE_LICENSE("GPL"); ---------- The check this patch restores was added by commit 0976dfc1d0cd80a4 ("workqueue: Catch more locking problems with flush_work()"). Then, lockdep's crossrelease feature was added by commit b09be676e0ff25bd ("locking/lockdep: Implement the 'crossrelease' feature"). As a result, this check was once removed by commit fd1a5b04dfb899f8 ("workqueue: Remove now redundant lock acquisitions wrt. workqueue flushes"). But lockdep's crossrelease feature was removed by commit e966eaeeb623f099 ("locking/lockdep: Remove the cross-release locking checks"). At this point, this check should have been restored. Then, commit d6e89786bed977f3 ("workqueue: skip lockdep wq dependency in cancel_work_sync()") introduced a boolean flag in order to distinguish flush_work() and cancel_work_sync(), for checking "struct workqueue_struct" dependency when called from cancel_work_sync() was causing false positives. Then, commit 87915adc3f0acdf0 ("workqueue: re-add lockdep dependencies for flushing") tried to restore "struct work_struct" dependency check, but by error checked this boolean flag. Like an example shown above indicates, "struct work_struct" dependency needs to be checked for both flush_work() and cancel_work_sync(). Link: https://lkml.kernel.org/r/20220504044800.4966-1-hdanton@sina.com [1] Reported-by: Hillf Danton Suggested-by: Lai Jiangshan Fixes: 87915adc3f0acdf0 ("workqueue: re-add lockdep dependencies for flushi= ng") Cc: Johannes Berg Signed-off-by: Tetsuo Handa Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- kernel/workqueue.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index b1bb6cb5802e..4ea2f7fd20ce 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -2917,10 +2917,8 @@ static bool __flush_work(struct work_struct *work, b= ool from_cancel) if (WARN_ON(!work->func)) return false; =20 - if (!from_cancel) { - lock_map_acquire(&work->lockdep_map); - lock_map_release(&work->lockdep_map); - } + lock_map_acquire(&work->lockdep_map); + lock_map_release(&work->lockdep_map); =20 if (start_flush_work(work, &barr, from_cancel)) { wait_for_completion(&barr.done); --=20 2.35.1 From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22A74C32771 for ; Mon, 26 Sep 2022 10:35:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235911AbiIZKfZ (ORCPT ); Mon, 26 Sep 2022 06:35:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235840AbiIZKdM (ORCPT ); Mon, 26 Sep 2022 06:33:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E57A449B51; Mon, 26 Sep 2022 03:20:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CE92A60B60; Mon, 26 Sep 2022 10:20:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C434CC433C1; Mon, 26 Sep 2022 10:20:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187618; bh=olcYasHuW7BIezTv9Mi3hwjM/yjhD8t6eRgTA7tM4sU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HGhFBKmepNeOn6Pfss/nHnlVZ09w2W8+3LVRP498kKB0LJXHmMfQXt3NdCKJilzR6 rY1GkzYggcf9H7STJyRe2f/M8SEb85sMkcF2Exbu4maoqvZDx8fU1DYzr5d/RixDqJ IuJu8K/f087LhnENsReCGk4ZRAMwNNFOzrtSKAsk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Wahren , Ojaswin Mujoo , stable@kernel.org, Jan Kara , Theodore Tso Subject: [PATCH 4.19 57/58] ext4: make directory inode spreading reflect flexbg size Date: Mon, 26 Sep 2022 12:12:16 +0200 Message-Id: <20220926100743.569623445@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Jan Kara commit 613c5a85898d1cd44e68f28d65eccf64a8ace9cf upstream. Currently the Orlov inode allocator searches for free inodes for a directory only in flex block groups with at most inodes_per_group/16 more directory inodes than average per flex block group. However with growing size of flex block group this becomes unnecessarily strict. Scale allowed difference from average directory count per flex block group with flex block group size as we do with other metrics. Tested-by: Stefan Wahren Tested-by: Ojaswin Mujoo Cc: stable@kernel.org Link: https://lore.kernel.org/all/0d81a7c2-46b7-6010-62a4-3e6cfc1628d6@i2se= .com/ Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20220908092136.11770-3-jack@suse.cz Signed-off-by: Theodore Ts'o Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- fs/ext4/ialloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -505,7 +505,7 @@ static int find_group_orlov(struct super goto fallback; } =20 - max_dirs =3D ndirs / ngroups + inodes_per_group / 16; + max_dirs =3D ndirs / ngroups + inodes_per_group*flex_size / 16; min_inodes =3D avefreei - inodes_per_group*flex_size / 4; if (min_inodes < 1) min_inodes =3D 1; From nobody Thu Apr 2 11:46:35 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BC7EC6FA83 for ; Mon, 26 Sep 2022 10:33:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235768AbiIZKdA (ORCPT ); Mon, 26 Sep 2022 06:33:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235712AbiIZKb1 (ORCPT ); Mon, 26 Sep 2022 06:31:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D280311834; Mon, 26 Sep 2022 03:20:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AFCF3B80918; Mon, 26 Sep 2022 10:19:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01E2AC433D6; Mon, 26 Sep 2022 10:19:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187593; bh=tlvUgMkU11HBDwNbeCOwRwnKt9TSsz61+tOrT9iIo/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XFcl2wG3oak5DYqEM0eHSaSt03/QuvgonV5AMapjnRalRDsY0KMkETXidvoG7C8Ye p2y6acdxzVfi7IjUVlqgSQlDcRhRPLXgCew/bmI+Rfvtim44PqnXJrCsLUSMdofFXi T8nBXd51tXShDCmoqJhtIBLFfsl6ldtSr7ndzpdI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Raymond Tan , Heikki Krogerus , Felipe Balbi Subject: [PATCH 4.19 58/58] usb: dwc3: pci: Allow Elkhart Lake to utilize DSM method for PM functionality Date: Mon, 26 Sep 2022 12:12:17 +0200 Message-Id: <20220926100743.599371856@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Raymond Tan commit a609ce2a13360d639b384b6ca783b38c1247f2db upstream. Similar to some other IA platforms, Elkhart Lake too depends on the PMU register write to request transition of Dx power state. Thus, we add the PCI_DEVICE_ID_INTEL_EHLLP to the list of devices that shall execute the ACPI _DSM method during D0/D3 sequence. [heikki.krogerus@linux.intel.com: included Fixes tag] Fixes: dbb0569de852 ("usb: dwc3: pci: Add Support for Intel Elkhart Lake De= vices") Cc: stable@vger.kernel.org Signed-off-by: Raymond Tan Signed-off-by: Heikki Krogerus Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman Tested-by: Pavel Machek (CIP) Tested-by: Shuah Khan --- drivers/usb/dwc3/dwc3-pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c @@ -149,7 +149,8 @@ static int dwc3_pci_quirks(struct dwc3_p =20 if (pdev->vendor =3D=3D PCI_VENDOR_ID_INTEL) { if (pdev->device =3D=3D PCI_DEVICE_ID_INTEL_BXT || - pdev->device =3D=3D PCI_DEVICE_ID_INTEL_BXT_M) { + pdev->device =3D=3D PCI_DEVICE_ID_INTEL_BXT_M || + pdev->device =3D=3D PCI_DEVICE_ID_INTEL_EHLLP) { guid_parse(PCI_INTEL_BXT_DSM_GUID, &dwc->guid); dwc->has_dsm_for_pm =3D true; }