lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251224-mtk-not-a-gate-v1-0-d4667e3b7856@collabora.com>
Date: Wed, 24 Dec 2025 08:30:09 +0100
From: Sjoerd Simons <sjoerd@...labora.com>
To: Michael Turquette <mturquette@...libre.com>, 
 Stephen Boyd <sboyd@...nel.org>, Matthias Brugger <matthias.bgg@...il.com>, 
 AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, 
 Jianhui Zhao <zhaojh329@...il.com>, Daniel Golle <daniel@...rotopia.org>, 
 Sam Shih <sam.shih@...iatek.com>, Ryder Lee <ryder.lee@...nel.org>
Cc: kernel@...labora.com, linux-clk@...r.kernel.org, 
 linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, 
 linux-mediatek@...ts.infradead.org, Sjoerd Simons <sjoerd@...labora.com>
Subject: [PATCH 0/4] clk: mediatek: Fix no-gate mux declarations

When booting a MT7981 board (OpenWRT One) with UBSAN, the following
error showed up:

```
UBSAN: shift-out-of-bounds in drivers/clk/mediatek/clk-mux.c:76:8
shift exponent 255 is too large for 64-bit type 'long unsigned int'
```

This is due to various infra muxes being declared as MUX_GATE_ even
though they don't actually have a gate.

First patch in this series adds a helper to make it easier to declare
muxes that neither have a gate nor update registers. This seems common
for MT798* infra muxes. The following ones corrects the incorrect mux
definitions by transitioning to this new declaration.

Signed-off-by: Sjoerd Simons <sjoerd@...labora.com>
---
Sjoerd Simons (4):
      clk: mediatek: clk-mux: Add helper for muxes without UPD
      clk: mediatek: Declare MT7981 infra muxes as no-gate muxes
      clk: mediatek: Declare MT7986 infra muxes as no-gate muxes
      clk: mediatek: Declare MT7988 infra muxes as no-gate muxes

 drivers/clk/mediatek/clk-mt7981-infracfg.c | 55 ++++++++-----------
 drivers/clk/mediatek/clk-mt7986-infracfg.c | 45 ++++++---------
 drivers/clk/mediatek/clk-mt7988-infracfg.c | 88 ++++++++++++++++--------------
 drivers/clk/mediatek/clk-mux.h             |  7 +++
 4 files changed, 93 insertions(+), 102 deletions(-)
---
base-commit: b927546677c876e26eba308550207c2ddf812a43
change-id: 20251224-mtk-not-a-gate-ec0b6b6851a8

Best regards,
-- 
Sjoerd Simons <sjoerd@...labora.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ