From 6709bb8f271d3553b2f56dbe173f3f47b2b7cbc9 Mon Sep 17 00:00:00 2001 From: Ivan T. Ivanov Date: May 29 2023 08:06:42 +0000 Subject: Merge branch 'users/tzimmermann/SLE12-SP5/for-next' into SLE12-SP5 --- diff --git a/blacklist.conf b/blacklist.conf index a106670..5ea7a9b 100644 --- a/blacklist.conf +++ b/blacklist.conf @@ -2848,3 +2848,4 @@ d823685486a3446d061fed7c7d2f80af984f119a # driver not enabled: fbdev: intelfb: F 44a3b36b42acfc433aaaf526191dd12fbb919fdb # driver not enabled: fbdev: au1200fb: Fix potential divide by zero 5a6bef734247c7a8c19511664ff77634ab86f45b # driver not enabled: fbdev: arcfb: Fix error handling in arcfb_probe() ed9de4ed39875706607fb08118a58344ae6c5f42 # driver not enabled: fbdev: udlfb: Fix endpoint check +12d5796d55f9fd9e4b621003127c99e176665064 # not needed; maybe fragile: Revert "fbcon: don't lose the console font across generic->chip driver switch" diff --git a/patches.suse/0001-backlight-lm3630a-Fix-return-code-of-.update_status-.patch b/patches.suse/0001-backlight-lm3630a-Fix-return-code-of-.update_status-.patch new file mode 100644 index 0000000..704aa42 --- /dev/null +++ b/patches.suse/0001-backlight-lm3630a-Fix-return-code-of-.update_status-.patch @@ -0,0 +1,73 @@ +From b9481a667a90ec739995e85f91f3672ca44d6ffa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= +Date: Mon, 21 Jun 2021 14:21:47 +0200 +Subject: backlight: lm3630a: Fix return code of .update_status() callback +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Git-commit: b9481a667a90ec739995e85f91f3672ca44d6ffa +Patch-mainline: v5.14-rc1 +References: bsc#1129770 + +According to .update_status() is supposed to +return 0 on success and a negative error code otherwise. Adapt +lm3630a_bank_a_update_status() and lm3630a_bank_b_update_status() to +actually do it. + +While touching that also add the error code to the failure message. + +Signed-off-by: Uwe Kleine-König +Reviewed-by: Daniel Thompson +Signed-off-by: Lee Jones +Acked-by: Thomas Zimmermann +--- + drivers/video/backlight/lm3630a_bl.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c +index 662029d6a3dc..419b0334cf08 100644 +--- a/drivers/video/backlight/lm3630a_bl.c ++++ b/drivers/video/backlight/lm3630a_bl.c +@@ -190,7 +190,7 @@ static int lm3630a_bank_a_update_status(struct backlight_device *bl) + if ((pwm_ctrl & LM3630A_PWM_BANK_A) != 0) { + lm3630a_pwm_ctrl(pchip, bl->props.brightness, + bl->props.max_brightness); +- return bl->props.brightness; ++ return 0; + } + + /* disable sleep */ +@@ -210,8 +210,8 @@ static int lm3630a_bank_a_update_status(struct backlight_device *bl) + return 0; + + out_i2c_err: +- dev_err(pchip->dev, "i2c failed to access\n"); +- return bl->props.brightness; ++ dev_err(pchip->dev, "i2c failed to access (%pe)\n", ERR_PTR(ret)); ++ return ret; + } + + static int lm3630a_bank_a_get_brightness(struct backlight_device *bl) +@@ -267,7 +267,7 @@ static int lm3630a_bank_b_update_status(struct backlight_device *bl) + if ((pwm_ctrl & LM3630A_PWM_BANK_B) != 0) { + lm3630a_pwm_ctrl(pchip, bl->props.brightness, + bl->props.max_brightness); +- return bl->props.brightness; ++ return 0; + } + + /* disable sleep */ +@@ -287,8 +287,8 @@ static int lm3630a_bank_b_update_status(struct backlight_device *bl) + return 0; + + out_i2c_err: +- dev_err(pchip->dev, "i2c failed to access REG_CTRL\n"); +- return bl->props.brightness; ++ dev_err(pchip->dev, "i2c failed to access (%pe)\n", ERR_PTR(ret)); ++ return ret; + } + + static int lm3630a_bank_b_get_brightness(struct backlight_device *bl) +-- +2.40.1 + diff --git a/patches.suse/0002-fbdev-uvesafb-Fixes-an-error-handling-path-in-uvesaf.patch b/patches.suse/0002-fbdev-uvesafb-Fixes-an-error-handling-path-in-uvesaf.patch new file mode 100644 index 0000000..74b9b23 --- /dev/null +++ b/patches.suse/0002-fbdev-uvesafb-Fixes-an-error-handling-path-in-uvesaf.patch @@ -0,0 +1,38 @@ +From a94371040712031ba129c7e9d8ff04a06a2f8207 Mon Sep 17 00:00:00 2001 +From: Christophe JAILLET +Date: Sat, 10 Dec 2022 12:35:22 +0100 +Subject: fbdev: uvesafb: Fixes an error handling path in uvesafb_probe() +Git-commit: a94371040712031ba129c7e9d8ff04a06a2f8207 +Patch-mainline: v6.2-rc1 +References: bsc#1154048 + +If an error occurs after a successful uvesafb_init_mtrr() call, it must be +undone by a corresponding arch_phys_wc_del() call, as already done in the +remove function. + +This has been added in the remove function in commit 63e28a7a5ffc +("uvesafb: Clean up MTRR code") + +Fixes: 8bdb3a2d7df4 ("uvesafb: the driver core") +Signed-off-by: Christophe JAILLET +Signed-off-by: Helge Deller +Acked-by: Thomas Zimmermann +--- + drivers/video/fbdev/uvesafb.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c +index 00d789b6c0fa..0e3cabbec4b4 100644 +--- a/drivers/video/fbdev/uvesafb.c ++++ b/drivers/video/fbdev/uvesafb.c +@@ -1758,6 +1758,7 @@ static int uvesafb_probe(struct platform_device *dev) + out_unmap: + iounmap(info->screen_base); + out_mem: ++ arch_phys_wc_del(par->mtrr_handle); + release_mem_region(info->fix.smem_start, info->fix.smem_len); + out_reg: + release_region(0x3c0, 32); +-- +2.40.1 + diff --git a/patches.suse/0003-fbcon-Check-font-dimension-limits.patch b/patches.suse/0003-fbcon-Check-font-dimension-limits.patch new file mode 100644 index 0000000..50c6ce3 --- /dev/null +++ b/patches.suse/0003-fbcon-Check-font-dimension-limits.patch @@ -0,0 +1,54 @@ +From 2b09d5d364986f724f17001ccfe4126b9b43a0be Mon Sep 17 00:00:00 2001 +From: Samuel Thibault +Date: Sun, 29 Jan 2023 16:17:40 +0100 +Subject: fbcon: Check font dimension limits +Git-commit: 2b09d5d364986f724f17001ccfe4126b9b43a0be +Patch-mainline: v6.2-rc7 +References: bsc#1154048 + +blit_x and blit_y are u32, so fbcon currently cannot support fonts +larger than 32x32. + +The 32x32 case also needs shifting an unsigned int, to properly set bit +31, otherwise we get "UBSAN: shift-out-of-bounds in fbcon_set_font", +as reported on: + +http://lore.kernel.org/all/IA1PR07MB98308653E259A6F2CE94A4AFABCE9@IA1PR07MB9830.namprd07.prod.outlook.com +Kernel Branch: 6.2.0-rc5-next-20230124 +Kernel config: https://drive.google.com/file/d/1F-LszDAizEEH0ZX0HcSR06v5q8FPl2Uv/view?usp=sharing +Reproducer: https://drive.google.com/file/d/1mP1jcLBY7vWCNM60OMf-ogw-urQRjNrm/view?usp=sharing + +Reported-by: Sanan Hasanov +Signed-off-by: Samuel Thibault +Fixes: 2d2699d98492 ("fbcon: font setting should check limitation of driver") +Cc: stable@vger.kernel.org +Tested-by: Miko Larsson +Reviewed-by: Greg Kroah-Hartman +Signed-off-by: Helge Deller +Acked-by: Thomas Zimmermann +--- + drivers/video/console/fbcon.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c +index 14a7d404062c..1b14c21af2b7 100644 +--- a/drivers/video/console/fbcon.c ++++ b/drivers/video/console/fbcon.c +@@ -2495,9 +2495,12 @@ static int fbcon_set_font(struct vc_data *vc, struct console_font *font, + h > FBCON_SWAP(info->var.rotate, info->var.yres, info->var.xres)) + return -EINVAL; + ++ if (font->width > 32 || font->height > 32) ++ return -EINVAL; ++ + /* Make sure drawing engine can handle the font */ +- if (!(info->pixmap.blit_x & (1 << (font->width - 1))) || +- !(info->pixmap.blit_y & (1 << (font->height - 1)))) ++ if (!(info->pixmap.blit_x & BIT(font->width - 1)) || ++ !(info->pixmap.blit_y & BIT(font->height - 1))) + return -EINVAL; + + /* Make sure driver can handle the font length */ +-- +2.40.1 + diff --git a/series.conf b/series.conf index 1565ba6..83d51d9 100644 --- a/series.conf +++ b/series.conf @@ -61162,6 +61162,7 @@ patches.suse/mmc-core-clear-flags-before-allowing-to-retune.patch patches.suse/mmc-sdhci-Fix-warning-message-when-accessing-RPMB-in.patch patches.suse/mfd-da9052-stmpe-Add-and-modify-MODULE_DEVICE_TABLE.patch + patches.suse/0001-backlight-lm3630a-Fix-return-code-of-.update_status-.patch patches.suse/w1-ds2438-fixing-bug-that-would-always-get-page0.patch patches.suse/char-pcmcia-error-out-if-num_bytes_read-is-greater-t.patch patches.suse/fpga-stratix10-soc-Add-missing-fpga_mgr_free-call.patch @@ -63244,6 +63245,7 @@ patches.suse/PCI-Check-for-alloc-failure-in-pci_request_irq.patch patches.suse/PCI-sysfs-Fix-double-free-in-error-path.patch patches.suse/crypto-arm64-Fix-unused-variable-compilation-warnings-of-cpu_feature.patch + patches.suse/0002-fbdev-uvesafb-Fixes-an-error-handling-path-in-uvesaf.patch patches.suse/tracing-Fix-infinite-loop-in-tracing_read_pipe-on-overflowed-print_trace_line.patch patches.suse/usb-typec-Check-for-ops-exit-instead-of-ops-enter-in.patch patches.suse/usb-dwc3-Fix-race-between-dwc3_set_mode-and-__dwc3_s.patch @@ -63285,6 +63287,7 @@ patches.suse/sctp-fail-if-no-bound-addresses-can-be-used-for-a-gi.patch patches.suse/tracing-Make-sure-trace_printk-can-output-as-soon-as-it-can-be-used.patch patches.suse/0001-netrom-Fix-use-after-free-caused-by-accept-on-alread.patch + patches.suse/0003-fbcon-Check-font-dimension-limits.patch patches.suse/net-USB-Fix-wrong-direction-WARNING-in-plusb.c.patch patches.suse/usb-typec-altmodes-displayport-Fix-probe-pin-assign-.patch patches.suse/net-sched-tcindex-update-imperfect-hash-filters-resp.patch