* [PATCH AUTOSEL 5.10 1/9] drm/bridge: tc358762: Instruct DSI host to generate HSE packets
@ 2023-09-08 19:36 Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 2/9] samples/hw_breakpoint: Fix kernel BUG 'invalid opcode: 0000' Sasha Levin
` (7 more replies)
0 siblings, 8 replies; 10+ messages in thread
From: Sasha Levin @ 2023-09-08 19:36 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Marek Vasut, Sam Ravnborg, Robert Foss, Sasha Levin,
andrzej.hajda, neil.armstrong, airlied, daniel, dri-devel
From: Marek Vasut <marex@denx.de>
[ Upstream commit 362fa8f6e6a05089872809f4465bab9d011d05b3 ]
This bridge seems to need the HSE packet, otherwise the image is
shifted up and corrupted at the bottom. This makes the bridge
work with Samsung DSIM on i.MX8MM and i.MX8MP.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230615201902.566182-3-marex@denx.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/bridge/tc358762.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/tc358762.c b/drivers/gpu/drm/bridge/tc358762.c
index 1bfdfc6affafe..21c57d3435687 100644
--- a/drivers/gpu/drm/bridge/tc358762.c
+++ b/drivers/gpu/drm/bridge/tc358762.c
@@ -224,7 +224,7 @@ static int tc358762_probe(struct mipi_dsi_device *dsi)
dsi->lanes = 1;
dsi->format = MIPI_DSI_FMT_RGB888;
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
- MIPI_DSI_MODE_LPM;
+ MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_VIDEO_HSE;
ret = tc358762_parse_dt(ctx);
if (ret < 0)
--
2.40.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH AUTOSEL 5.10 2/9] samples/hw_breakpoint: Fix kernel BUG 'invalid opcode: 0000'
2023-09-08 19:36 [PATCH AUTOSEL 5.10 1/9] drm/bridge: tc358762: Instruct DSI host to generate HSE packets Sasha Levin
@ 2023-09-08 19:36 ` Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 3/9] ASoC: Intel: sof_sdw: Update BT offload config for soundwire config Sasha Levin
` (6 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2023-09-08 19:36 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Rong Tao, Petr Mladek, Luis Chamberlain, Sasha Levin, arnd, chenjiahao16
From: Rong Tao <rongtao@cestc.cn>
[ Upstream commit 910e230d5f1bb72c54532e94fbb1705095c7bab6 ]
Macro symbol_put() is defined as __symbol_put(__stringify(x))
ksym_name = "jiffies"
symbol_put(ksym_name)
will be resolved as
__symbol_put("ksym_name")
which is clearly wrong. So symbol_put must be replaced with __symbol_put.
When we uninstall hw_breakpoint.ko (rmmod), a kernel bug occurs with the
following error:
[11381.854152] kernel BUG at kernel/module/main.c:779!
[11381.854159] invalid opcode: 0000 [#2] PREEMPT SMP PTI
[11381.854163] CPU: 8 PID: 59623 Comm: rmmod Tainted: G D OE 6.2.9-200.fc37.x86_64 #1
[11381.854167] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./B360M-HDV, BIOS P3.20 10/23/2018
[11381.854169] RIP: 0010:__symbol_put+0xa2/0xb0
[11381.854175] Code: 00 e8 92 d2 f7 ff 65 8b 05 c3 2f e6 78 85 c0 74 1b 48 8b 44 24 30 65 48 2b 04 25 28 00 00 00 75 12 48 83 c4 38 c3 cc cc cc cc <0f> 0b 0f 1f 44 00 00 eb de e8 c0 df d8 00 90 90 90 90 90 90 90 90
[11381.854178] RSP: 0018:ffffad8ec6ae7dd0 EFLAGS: 00010246
[11381.854181] RAX: 0000000000000000 RBX: ffffffffc1fd1240 RCX: 000000000000000c
[11381.854184] RDX: 000000000000006b RSI: ffffffffc02bf7c7 RDI: ffffffffc1fd001c
[11381.854186] RBP: 000055a38b76e7c8 R08: ffffffff871ccfe0 R09: 0000000000000000
[11381.854188] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[11381.854190] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[11381.854192] FS: 00007fbf7c62c740(0000) GS:ffff8c5badc00000(0000) knlGS:0000000000000000
[11381.854195] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[11381.854197] CR2: 000055a38b7793f8 CR3: 0000000363e1e001 CR4: 00000000003726e0
[11381.854200] DR0: ffffffffb3407980 DR1: 0000000000000000 DR2: 0000000000000000
[11381.854202] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[11381.854204] Call Trace:
[11381.854207] <TASK>
[11381.854212] s_module_exit+0xc/0xff0 [symbol_getput]
[11381.854219] __do_sys_delete_module.constprop.0+0x198/0x2f0
[11381.854225] do_syscall_64+0x58/0x80
[11381.854231] ? exit_to_user_mode_prepare+0x180/0x1f0
[11381.854237] ? syscall_exit_to_user_mode+0x17/0x40
[11381.854241] ? do_syscall_64+0x67/0x80
[11381.854245] ? syscall_exit_to_user_mode+0x17/0x40
[11381.854248] ? do_syscall_64+0x67/0x80
[11381.854252] ? exc_page_fault+0x70/0x170
[11381.854256] entry_SYSCALL_64_after_hwframe+0x72/0xdc
Signed-off-by: Rong Tao <rongtao@cestc.cn>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
samples/hw_breakpoint/data_breakpoint.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/hw_breakpoint/data_breakpoint.c b/samples/hw_breakpoint/data_breakpoint.c
index 418c46fe5ffc3..9debd128b2ab8 100644
--- a/samples/hw_breakpoint/data_breakpoint.c
+++ b/samples/hw_breakpoint/data_breakpoint.c
@@ -70,7 +70,7 @@ static int __init hw_break_module_init(void)
static void __exit hw_break_module_exit(void)
{
unregister_wide_hw_breakpoint(sample_hbp);
- symbol_put(ksym_name);
+ __symbol_put(ksym_name);
printk(KERN_INFO "HW Breakpoint for %s write uninstalled\n", ksym_name);
}
--
2.40.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH AUTOSEL 5.10 3/9] ASoC: Intel: sof_sdw: Update BT offload config for soundwire config
2023-09-08 19:36 [PATCH AUTOSEL 5.10 1/9] drm/bridge: tc358762: Instruct DSI host to generate HSE packets Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 2/9] samples/hw_breakpoint: Fix kernel BUG 'invalid opcode: 0000' Sasha Levin
@ 2023-09-08 19:36 ` Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 4/9] ALSA: hda: intel-dsp-cfg: use common include for MeteorLake Sasha Levin
` (5 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2023-09-08 19:36 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Uday M Bhat, Kai Vehmanen, Ranjani Sridharan, Bard Liao,
Jairaj Arava, Pierre-Louis Bossart, Mark Brown, Sasha Levin,
cezary.rojewski, liam.r.girdwood, peter.ujfalusi, perex, tiwai,
ckeepax, gongjun.song, alsa-devel
From: Uday M Bhat <uday.m.bhat@intel.com>
[ Upstream commit a14aded9299187bb17ef90700eb2cf1120ef5885 ]
For soundwire config, SSP1 is used for BT offload. This is enabled
in sof_sdw_quirk_table
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230731214257.444605-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/intel/boards/sof_sdw.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index f36a0fda1b6ae..1955d277fdf20 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -214,7 +214,9 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
DMI_MATCH(DMI_PRODUCT_NAME, "Rex"),
},
- .driver_data = (void *)(SOF_SDW_PCH_DMIC),
+ .driver_data = (void *)(SOF_SDW_PCH_DMIC |
+ SOF_BT_OFFLOAD_SSP(1) |
+ SOF_SSP_BT_OFFLOAD_PRESENT),
},
/* LunarLake devices */
{
--
2.40.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH AUTOSEL 5.10 4/9] ALSA: hda: intel-dsp-cfg: use common include for MeteorLake
2023-09-08 19:36 [PATCH AUTOSEL 5.10 1/9] drm/bridge: tc358762: Instruct DSI host to generate HSE packets Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 2/9] samples/hw_breakpoint: Fix kernel BUG 'invalid opcode: 0000' Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 3/9] ASoC: Intel: sof_sdw: Update BT offload config for soundwire config Sasha Levin
@ 2023-09-08 19:36 ` Sasha Levin
2023-09-11 9:51 ` Pavel Machek
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 5/9] ALSA: hda: intel-dsp-cfg: add LunarLake support Sasha Levin
` (4 subsequent siblings)
7 siblings, 1 reply; 10+ messages in thread
From: Sasha Levin @ 2023-09-08 19:36 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Pierre-Louis Bossart, Ranjani Sridharan, Bard Liao, Takashi Iwai,
Sasha Levin, perex, tiwai, broonie, amadeuszx.slawinski,
bradynorander, muralidhar.reddy, alsa-devel
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
[ Upstream commit 73e6ebf6a21a62429282632eccb8aa4212489b3c ]
This was not updated in Commit 0cd0a7c2c599 ("ALSA: intel-dsp-config: Convert to PCI device IDs defines")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230802150105.24604-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/hda/intel-dsp-config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
index f96e70c85f84a..ae785d9588fee 100644
--- a/sound/hda/intel-dsp-config.c
+++ b/sound/hda/intel-dsp-config.c
@@ -364,7 +364,7 @@ static const struct config_entry config_table[] = {
/* Meteorlake-P */
{
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
- .device = 0x7e28,
+ .device = PCI_DEVICE_ID_INTEL_HDA_MTL,
},
#endif
--
2.40.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH AUTOSEL 5.10 5/9] ALSA: hda: intel-dsp-cfg: add LunarLake support
2023-09-08 19:36 [PATCH AUTOSEL 5.10 1/9] drm/bridge: tc358762: Instruct DSI host to generate HSE packets Sasha Levin
` (2 preceding siblings ...)
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 4/9] ALSA: hda: intel-dsp-cfg: use common include for MeteorLake Sasha Levin
@ 2023-09-08 19:36 ` Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 6/9] drm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_crtc_atomic_disable() Sasha Levin
` (3 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2023-09-08 19:36 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Pierre-Louis Bossart, Ranjani Sridharan, Bard Liao, Takashi Iwai,
Sasha Levin, perex, tiwai, broonie, amadeuszx.slawinski,
bradynorander, muralidhar.reddy, alsa-devel
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
[ Upstream commit d2852b8c045ebd31d753b06f2810df5be30ed56a ]
One more PCI ID for the road.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230802150105.24604-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/hda/intel-dsp-config.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
index ae785d9588fee..f616f00e349e7 100644
--- a/sound/hda/intel-dsp-config.c
+++ b/sound/hda/intel-dsp-config.c
@@ -368,6 +368,14 @@ static const struct config_entry config_table[] = {
},
#endif
+/* Lunar Lake */
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_LUNARLAKE)
+ /* Lunarlake-P */
+ {
+ .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .device = PCI_DEVICE_ID_INTEL_HDA_LNL_P,
+ },
+#endif
};
static const struct config_entry *snd_intel_dsp_find_config
--
2.40.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH AUTOSEL 5.10 6/9] drm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_crtc_atomic_disable()
2023-09-08 19:36 [PATCH AUTOSEL 5.10 1/9] drm/bridge: tc358762: Instruct DSI host to generate HSE packets Sasha Levin
` (3 preceding siblings ...)
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 5/9] ALSA: hda: intel-dsp-cfg: add LunarLake support Sasha Levin
@ 2023-09-08 19:36 ` Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 7/9] bus: ti-sysc: Configure uart quirks for k3 SoC Sasha Levin
` (2 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2023-09-08 19:36 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Tuo Li, BassCheck, Krzysztof Kozlowski, Inki Dae, Sasha Levin,
sw0312.kim, kyungmin.park, airlied, daniel, dri-devel,
linux-arm-kernel, linux-samsung-soc
From: Tuo Li <islituo@gmail.com>
[ Upstream commit 2e63972a2de14482d0eae1a03a73e379f1c3f44c ]
The variable crtc->state->event is often protected by the lock
crtc->dev->event_lock when is accessed. However, it is accessed as a
condition of an if statement in exynos_drm_crtc_atomic_disable() without
holding the lock:
if (crtc->state->event && !crtc->state->active)
However, if crtc->state->event is changed to NULL by another thread right
after the conditions of the if statement is checked to be true, a
null-pointer dereference can occur in drm_crtc_send_vblank_event():
e->pipe = pipe;
To fix this possible null-pointer dereference caused by data race, the
spin lock coverage is extended to protect the if statement as well as the
function call to drm_crtc_send_vblank_event().
Reported-by: BassCheck <bass@buaa.edu.cn>
Link: https://sites.google.com/view/basscheck/home
Signed-off-by: Tuo Li <islituo@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Added relevant link.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/exynos/exynos_drm_crtc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index 1c03485676efa..de9fadccf22e5 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -39,13 +39,12 @@ static void exynos_drm_crtc_atomic_disable(struct drm_crtc *crtc,
if (exynos_crtc->ops->atomic_disable)
exynos_crtc->ops->atomic_disable(exynos_crtc);
+ spin_lock_irq(&crtc->dev->event_lock);
if (crtc->state->event && !crtc->state->active) {
- spin_lock_irq(&crtc->dev->event_lock);
drm_crtc_send_vblank_event(crtc, crtc->state->event);
- spin_unlock_irq(&crtc->dev->event_lock);
-
crtc->state->event = NULL;
}
+ spin_unlock_irq(&crtc->dev->event_lock);
}
static int exynos_crtc_atomic_check(struct drm_crtc *crtc,
--
2.40.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH AUTOSEL 5.10 7/9] bus: ti-sysc: Configure uart quirks for k3 SoC
2023-09-08 19:36 [PATCH AUTOSEL 5.10 1/9] drm/bridge: tc358762: Instruct DSI host to generate HSE packets Sasha Levin
` (4 preceding siblings ...)
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 6/9] drm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_crtc_atomic_disable() Sasha Levin
@ 2023-09-08 19:36 ` Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 8/9] md: raid1: fix potential OOB in raid1_remove_disk() Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 9/9] ext2: fix datatype of block number in ext2_xattr_set2() Sasha Levin
7 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2023-09-08 19:36 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Tony Lindgren, Nishanth Menon, Sasha Levin, linux-omap
From: Tony Lindgren <tony@atomide.com>
[ Upstream commit 03a711d3cb83692733f865312f49e665c49de6de ]
Enable the uart quirks similar to the earlier SoCs. Let's assume we are
likely going to need a k3 specific quirk mask separate from the earlier
SoCs, so let's not start changing the revision register mask at this point.
Note that SYSC_QUIRK_LEGACY_IDLE will be needed until we can remove the
need for pm_runtime_irq_safe() from 8250_omap driver.
Reviewed-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/bus/ti-sysc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index fcfe4d16cc149..1bec5e04397ff 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -1504,6 +1504,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x47422e03, 0xffffffff,
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
+ SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x47424e03, 0xffffffff,
+ SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),
/* Quirks that need to be set based on the module address */
SYSC_QUIRK("mcpdm", 0x40132000, 0, 0x10, -ENODEV, 0x50000800, 0xffffffff,
--
2.40.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH AUTOSEL 5.10 8/9] md: raid1: fix potential OOB in raid1_remove_disk()
2023-09-08 19:36 [PATCH AUTOSEL 5.10 1/9] drm/bridge: tc358762: Instruct DSI host to generate HSE packets Sasha Levin
` (5 preceding siblings ...)
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 7/9] bus: ti-sysc: Configure uart quirks for k3 SoC Sasha Levin
@ 2023-09-08 19:36 ` Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 9/9] ext2: fix datatype of block number in ext2_xattr_set2() Sasha Levin
7 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2023-09-08 19:36 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Zhang Shurong, Yu Kuai, Song Liu, Sasha Levin, linux-raid
From: Zhang Shurong <zhang_shurong@foxmail.com>
[ Upstream commit 8b0472b50bcf0f19a5119b00a53b63579c8e1e4d ]
If rddev->raid_disk is greater than mddev->raid_disks, there will be
an out-of-bounds in raid1_remove_disk(). We have already found
similar reports as follows:
1) commit d17f744e883b ("md-raid10: fix KASAN warning")
2) commit 1ebc2cec0b7d ("dm raid: fix KASAN warning in raid5_remove_disk")
Fix this bug by checking whether the "number" variable is
valid.
Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/tencent_0D24426FAC6A21B69AC0C03CE4143A508F09@qq.com
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/md/raid1.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 6b5cc3f59fb39..25be491c1a6ac 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1791,6 +1791,10 @@ static int raid1_remove_disk(struct mddev *mddev, struct md_rdev *rdev)
struct r1conf *conf = mddev->private;
int err = 0;
int number = rdev->raid_disk;
+
+ if (unlikely(number >= conf->raid_disks))
+ goto abort;
+
struct raid1_info *p = conf->mirrors + number;
if (rdev != p->rdev)
--
2.40.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH AUTOSEL 5.10 9/9] ext2: fix datatype of block number in ext2_xattr_set2()
2023-09-08 19:36 [PATCH AUTOSEL 5.10 1/9] drm/bridge: tc358762: Instruct DSI host to generate HSE packets Sasha Levin
` (6 preceding siblings ...)
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 8/9] md: raid1: fix potential OOB in raid1_remove_disk() Sasha Levin
@ 2023-09-08 19:36 ` Sasha Levin
7 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2023-09-08 19:36 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Georg Ottinger, Jan Kara, Sasha Levin, jack, linux-ext4
From: Georg Ottinger <g.ottinger@gmx.at>
[ Upstream commit e88076348425b7d0491c8c98d8732a7df8de7aa3 ]
I run a small server that uses external hard drives for backups. The
backup software I use uses ext2 filesystems with 4KiB block size and
the server is running SELinux and therefore relies on xattr. I recently
upgraded the hard drives from 4TB to 12TB models. I noticed that after
transferring some TBs I got a filesystem error "Freeing blocks not in
datazone - block = 18446744071529317386, count = 1" and the backup
process stopped. Trying to fix the fs with e2fsck resulted in a
completely corrupted fs. The error probably came from ext2_free_blocks(),
and because of the large number 18e19 this problem immediately looked
like some kind of integer overflow. Whereas the 4TB fs was about 1e9
blocks, the new 12TB is about 3e9 blocks. So, searching the ext2 code,
I came across the line in fs/ext2/xattr.c:745 where ext2_new_block()
is called and the resulting block number is stored in the variable block
as an int datatype. If a block with a block number greater than
INT32_MAX is returned, this variable overflows and the call to
sb_getblk() at line fs/ext2/xattr.c:750 fails, then the call to
ext2_free_blocks() produces the error.
Signed-off-by: Georg Ottinger <g.ottinger@gmx.at>
Signed-off-by: Jan Kara <jack@suse.cz>
Message-Id: <20230815100340.22121-1-g.ottinger@gmx.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext2/xattr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
index 841fa6d9d744b..f1dc11dab0d88 100644
--- a/fs/ext2/xattr.c
+++ b/fs/ext2/xattr.c
@@ -694,10 +694,10 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,
/* We need to allocate a new block */
ext2_fsblk_t goal = ext2_group_first_block_no(sb,
EXT2_I(inode)->i_block_group);
- int block = ext2_new_block(inode, goal, &error);
+ ext2_fsblk_t block = ext2_new_block(inode, goal, &error);
if (error)
goto cleanup;
- ea_idebug(inode, "creating block %d", block);
+ ea_idebug(inode, "creating block %lu", block);
new_bh = sb_getblk(sb, block);
if (unlikely(!new_bh)) {
--
2.40.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH AUTOSEL 5.10 4/9] ALSA: hda: intel-dsp-cfg: use common include for MeteorLake
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 4/9] ALSA: hda: intel-dsp-cfg: use common include for MeteorLake Sasha Levin
@ 2023-09-11 9:51 ` Pavel Machek
0 siblings, 0 replies; 10+ messages in thread
From: Pavel Machek @ 2023-09-11 9:51 UTC (permalink / raw)
To: Sasha Levin
Cc: linux-kernel, stable, Pierre-Louis Bossart, Ranjani Sridharan,
Bard Liao, Takashi Iwai, perex, tiwai, broonie,
amadeuszx.slawinski, bradynorander, muralidhar.reddy, alsa-devel
[-- Attachment #1: Type: text/plain, Size: 489 bytes --]
Hi!
> From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>
> [ Upstream commit 73e6ebf6a21a62429282632eccb8aa4212489b3c ]
>
> This was not updated in Commit 0cd0a7c2c599 ("ALSA: intel-dsp-config: Convert to PCI device IDs defines")
>
AFAICT, this is not queued to 6.1. What went wrong here?
BR,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-09-11 22:07 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-08 19:36 [PATCH AUTOSEL 5.10 1/9] drm/bridge: tc358762: Instruct DSI host to generate HSE packets Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 2/9] samples/hw_breakpoint: Fix kernel BUG 'invalid opcode: 0000' Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 3/9] ASoC: Intel: sof_sdw: Update BT offload config for soundwire config Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 4/9] ALSA: hda: intel-dsp-cfg: use common include for MeteorLake Sasha Levin
2023-09-11 9:51 ` Pavel Machek
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 5/9] ALSA: hda: intel-dsp-cfg: add LunarLake support Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 6/9] drm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_crtc_atomic_disable() Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 7/9] bus: ti-sysc: Configure uart quirks for k3 SoC Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 8/9] md: raid1: fix potential OOB in raid1_remove_disk() Sasha Levin
2023-09-08 19:36 ` [PATCH AUTOSEL 5.10 9/9] ext2: fix datatype of block number in ext2_xattr_set2() Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®