From nobody Thu Apr 9 10:29:07 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE5B73B95F7 for ; Mon, 9 Mar 2026 16:03:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773072192; cv=none; b=HbfrusAzWy+pcG0Y7yhMzbWlgaIrfvEK7eWoXnNPDPlKGK1DjJ/lF6zKT2lq701Mn5uHTbqwsltnga+U2UzcgoLdgL8IMIehmsWCiJaTqyLKfYGAHQAM8ZkkCijypGrOAmE/ZNcPPkknyqZWW7dZ830hjwEbRkglBeivbqDhQ3E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773072192; c=relaxed/simple; bh=IggE54/eCjn/84s2D0UlHxfX2QC0NMprcNHFgUXHpb4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JpeWa1WwnGVxLPFypT68ezKlW7ckTS9JK4n0Ji6w/L7+L9u8UrApMY6smRaqPQynmlRwiWSvf3cbxMlBCz6wa7+R+xFRm4fAR/JGiStrovWDNU0zDhQiS8i9lwQc4NDWFzFfOjIV+ntbfPSSANJ+X7yshLvNB5sMLtKT+6y/Qr0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eUuVUPj8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eUuVUPj8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 386C0C2BCAF; Mon, 9 Mar 2026 16:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773072192; bh=IggE54/eCjn/84s2D0UlHxfX2QC0NMprcNHFgUXHpb4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eUuVUPj8Gv06StVObZ7uONErpa2QiY58YFx2imku9ApY+cqpFxyT5A8i29QhzG8Mo 1AxxNfERArHJeun9cgXGTfhlpb8afulXuNbPxoqisAHmUUFyG/C3UjzqUIU6/zm536 8LWtCSk8/da2iNhL+2f12DDtYCT8U1fMbNDw/9go0Xedd3l/nYxn9TEjxFkNaJCsW0 JceuqcvgrqWTLd2XPrpgXzaPRseCpeXafeRuj0N4VZyQMWAj8ds1HfE6k8ZOFuvXP9 Vx51Kth9gKm8qFLvsUS2LiucZYccEwpcjbN75uvSDXwXjrH3Gx+1xOQNloPQEp5hwY 62Ur1y97atBxw== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , Peter Zijlstra , Nathan Chancellor Subject: [PATCH 1/3] objtool: Fix Clang jump table detection Date: Mon, 9 Mar 2026 09:03:05 -0700 Message-ID: <7d8600caed08901b6679767488acd639f6df9688.1773071992.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" With Clang, there can be a conditional forward jump between the load of the jump table address and the indirect branch. Fixes the following warning: vmlinux.o: warning: objtool: ___bpf_prog_run+0x1c5: sibling call from cal= lable instruction with modified stack frame Reported-by: Arnd Bergmann Closes: https://lore.kernel.org/a426d669-58bb-4be1-9eaa-6f3d83109e2d@app.fa= stmail.com Signed-off-by: Josh Poimboeuf --- tools/objtool/check.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 91b3ff4803cf..b6765e876507 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -2184,12 +2184,11 @@ static void mark_func_jump_tables(struct objtool_fi= le *file, last =3D insn; =20 /* - * Store back-pointers for unconditional forward jumps such + * Store back-pointers for forward jumps such * that find_jump_table() can back-track using those and * avoid some potentially confusing code. */ - if (insn->type =3D=3D INSN_JUMP_UNCONDITIONAL && insn->jump_dest && - insn->offset > last->offset && + if (insn->jump_dest && insn->jump_dest->offset > insn->offset && !insn->jump_dest->first_jump_src) { =20 --=20 2.53.0 From nobody Thu Apr 9 10:29:07 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 555CC3E5567 for ; Mon, 9 Mar 2026 16:03:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773072193; cv=none; b=dLsnPncX/00zmek0ySveDp0KSGUSgwVlbWFqoMwmJnxUzAMLcpAvIFcmQG1isIVs6Efr9tX2xPY9s9+YKFC5lWHiX42oPR4lkP4F2C6zy0gGvYMlGer1PZVGQfsL79BkytwCFVKc697M78aO2JrVyCp6ahZpvKrSdpZ6i9TXSoM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773072193; c=relaxed/simple; bh=mUMJwMeGQ+VHbJdW4aby8iHdbxkqijdRHjdJzO+zAbU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m8Q8HGolmfNTjnXHqqNQYWfQSh+U3yXOuUG8kGywL3PlGkcAx9H5Skl4wzwJvDMd06Isu15lffuxakQxtJEPzFFvclhz/wBXoRUSebC9yvlw6lzbmctKaXsPSOYGnvKZgfQmvVEPt4xvr84tG3xqu1JXtzL9s+P2LBT9mpQVgng= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XStoUOAL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XStoUOAL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90648C2BCB0; Mon, 9 Mar 2026 16:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773072192; bh=mUMJwMeGQ+VHbJdW4aby8iHdbxkqijdRHjdJzO+zAbU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XStoUOAL03h2EwbyyAYht8WVaO/86HCW9Nv1KEH51oi6IhSpPCKhnOfwqdKSexu+U gpHyrwTrnmSogM5EmK68ml0+la+8JaSdOvprYCNKjfx0gZVwB+EwBl0shn8HbU3OiX UkLGrMDLo7AXB5vrWEOlIozoH+CdVgfr6WQ/qOMI0CvY327g2YHsxU0cEkW7+ZnRaM 1LCjL7cB1X+0Y96iCh0d45mICjNOZuQMwcRuHUIFonK8/CdRmsugTU1uAunbe3XkY5 Kc/dSmHNtJlHoMri2z5PtqKs8nWq+Vm4fv3Kd/4FdU8LKAJZhz2ocjPQvump931tBj TsRw0tAOBn1/A== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , Peter Zijlstra , Nathan Chancellor , Srinivas Kandagatla , Liam Girdwood , Mark Brown Subject: [PATCH 2/3] ASoC: codecs: wcd9335: Remove potential undefined behavior in wcd9335_slimbus_irq() Date: Mon, 9 Mar 2026 09:03:06 -0700 Message-ID: <08dbb63519ef31a5457e07673b7b256fecb5989b.1773071992.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" If 'port_id' is negative, the shift counts in wcd9335_slimbus_irq() also become negative, resulting in undefined behavior due to shift out of bounds. That appears to be not possible, but with UBSAN enabled, Clang's range analysis isn't always able to determine that and generates undefined behavior. As a result the code generation isn't optimal, and undefined behavior should be avoided regardless. Improve code generation and remove the undefined behavior by converting the signed variables to unsigned. Fixes the following warning: sound/soc/codecs/wcd9335.o: warning: objtool: wcd9335_slimbus_irq() falls= through to next function __cfi_wcd9335_set_channel_map() This is very similar to a previous fix to wcd934x with commit 060aed9c0093 ("objtool, ASoC: codecs: wcd934x: Remove potential undefined behavior in wcd934x_slim_irq_handler()"). Cc: Srinivas Kandagatla Cc: Liam Girdwood Cc: Mark Brown Reported-by: Arnd Bergmann Closes: https://lore.kernel.org/a426d669-58bb-4be1-9eaa-6f3d83109e2d@app.fa= stmail.com Signed-off-by: Josh Poimboeuf Reviewed-by: Srinivas Kandagatla --- sound/soc/codecs/wcd9335.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 640e43ee1975..e3ca5ca6de3d 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -3907,7 +3907,7 @@ static irqreturn_t wcd9335_slimbus_irq(int irq, void = *data) { struct wcd9335_codec *wcd =3D data; unsigned long status =3D 0; - int i, j, port_id; + unsigned int i, j, port_id; unsigned int val, int_val =3D 0; irqreturn_t ret =3D IRQ_NONE; bool tx; --=20 2.53.0 From nobody Thu Apr 9 10:29:07 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA1E53B8BB2 for ; Mon, 9 Mar 2026 16:03:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773072193; cv=none; b=Kjw2RNKC8pKGmkEvh/jdLsJragNnIV4NbUyAoa0P35H7rJd12Bhksh7VBLtc7W9gN/tP0J1qfI3dwjdgnhHv+G379LsVgicrzu6LXaWGe5JCpFx5k6ZFPokMfwIsI2CwhRXybP/JTS7sOVTQhg8Uddh8Y7nfcVMc6rPdoJCmYYY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773072193; c=relaxed/simple; bh=Sh9XVKNFjztmYrgXaeD+xy3ZyHog2uAb5uadg6CDJoo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HGmLvMuCEzA5csCVtzXI/xJx5L7ksE4ikynoGNctlRP5SipWhN+j/ygJR3tFb4haFgjE5TXHMHVQE23Q8aJ9ppo1HPYxHZ61p0zaPw54XCDRERK8PqqqMEklQddU62cXZMgXYywLzNaciKuTxHa6QjillQQL4q+XTMUR2hxLZ9M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=e57zvjDu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="e57zvjDu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 096E4C2BCAF; Mon, 9 Mar 2026 16:03:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773072193; bh=Sh9XVKNFjztmYrgXaeD+xy3ZyHog2uAb5uadg6CDJoo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e57zvjDuucwCCeh6UYtRh/2heIQ3zGHyNLEHfF1JQX4m1cI+DnqYx8rdoMB0nkxGw qNkbCgDOVZK02lsPnpu6PCDLhVXxtj1ROgDlvGQKjzktmvDVVnyTlbMR7iTs4Smnb8 vtxlLizYq3sEnbS58EX8JHhGDeU4R5wSZfCELbB/p4GC95ADN4zfRaJng8sJDJNWgj z2+K7ilNdKpBqjYqZ188BkFI68FShGShCw5lSd+kwQTVZSSSfuV6d+jTWxA4u1zBCN sMLpYiQXVTw9QlJRnHHkivcqidbt9mJbofyiCNHHeNiryoHlIkMwB4Es2LAkAX7oyF H+Mzl36FF2zjQ== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , Peter Zijlstra , Nathan Chancellor , Jonathan Cameron , David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , Andy Shevchenko Subject: [PATCH 3/3] iio: imu: bmi160: Remove potential undefined behavior in bmi160_config_pin() Date: Mon, 9 Mar 2026 09:03:07 -0700 Message-ID: <84155f1de72b88d2841b16db97f47ffa4b0f747e.1773071992.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable If 'pin' is not one of its expected values, the value of 'int_out_ctrl_shift' is undefined. With UBSAN enabled, this causes Clang to generate undefined behavior, resulting in the following warning: drivers/iio/imu/bmi160/bmi160_core.o: warning: objtool: bmi160_setup_irq(= ) falls through to next function __cfi_bmi160_core_runtime_resume() Prevent the UB and improve error handling by adding a BUG() if 'pin' has an unexpected value. Cc: Jonathan Cameron Cc: David Lechner CC: Nuno S=C3=A1 Cc: Andy Shevchenko Fixes: 895bf81e6bbf ("iio:bmi160: add drdy interrupt support") Reported-by: Arnd Bergmann Closes: https://lore.kernel.org/a426d669-58bb-4be1-9eaa-6f3d83109e2d@app.fa= stmail.com Signed-off-by: Josh Poimboeuf --- drivers/iio/imu/bmi160/bmi160_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iio/imu/bmi160/bmi160_core.c b/drivers/iio/imu/bmi160/= bmi160_core.c index 5f47708b4c5d..e5326df75e49 100644 --- a/drivers/iio/imu/bmi160/bmi160_core.c +++ b/drivers/iio/imu/bmi160/bmi160_core.c @@ -579,6 +579,8 @@ static int bmi160_config_pin(struct regmap *regmap, enu= m bmi160_int_pin pin, int_latch_mask =3D BMI160_INT2_LATCH_MASK; int_map_mask =3D BMI160_INT2_MAP_DRDY_EN; break; + default: + BUG(); } int_out_ctrl_mask =3D BMI160_INT_OUT_CTRL_MASK << int_out_ctrl_shift; =20 --=20 2.53.0