public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: patchwork-bot+bluetooth@kernel.org
To: Andrej Shadura <andrew.shadura@collabora.co.uk>
Cc: linux-bluetooth@vger.kernel.org, nathan@kernel.org,
	justinstitt@google.com, vvvvvv@google.com, llvm@lists.linux.dev,
	kernel@collabora.com, gbiv@chromium.org, stable@vger.kernel.org
Subject: Re: [PATCH v2] Bluetooth: Fix type of len in rfcomm_sock_getsockopt{,_old}()
Date: Mon, 21 Oct 2024 17:10:27 +0000	[thread overview]
Message-ID: <172953062776.352920.15255836650338390690.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20241009121424.1472485-1-andrew.shadura@collabora.co.uk>

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed,  9 Oct 2024 14:14:24 +0200 you wrote:
> Commit 9bf4e919ccad worked around an issue introduced after an innocuous
> optimisation change in LLVM main:
> 
> > len is defined as an 'int' because it is assigned from
> > '__user int *optlen'. However, it is clamped against the result of
> > sizeof(), which has a type of 'size_t' ('unsigned long' for 64-bit
> > platforms). This is done with min_t() because min() requires compatible
> > types, which results in both len and the result of sizeof() being casted
> > to 'unsigned int', meaning len changes signs and the result of sizeof()
> > is truncated. From there, len is passed to copy_to_user(), which has a
> > third parameter type of 'unsigned long', so it is widened and changes
> > signs again. This excessive casting in combination with the KCSAN
> > instrumentation causes LLVM to fail to eliminate the __bad_copy_from()
> > call, failing the build.
> 
> [...]

Here is the summary with links:
  - [v2] Bluetooth: Fix type of len in rfcomm_sock_getsockopt{,_old}()
    https://git.kernel.org/bluetooth/bluetooth-next/c/c440001ad70d

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



      parent reply	other threads:[~2024-10-21 17:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09 12:14 [PATCH v2] Bluetooth: Fix type of len in rfcomm_sock_getsockopt{,_old}() Andrej Shadura
2024-10-09 16:37 ` David Laight
2024-10-10  6:51   ` Andrej Shadura
2024-10-17 13:46 ` Andrej Shadura
2024-10-17 14:39   ` Luiz Augusto von Dentz
2024-10-21 17:10 ` patchwork-bot+bluetooth [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=172953062776.352920.15255836650338390690.git-patchwork-notify@kernel.org \
    --to=patchwork-bot+bluetooth@kernel.org \
    --cc=andrew.shadura@collabora.co.uk \
    --cc=gbiv@chromium.org \
    --cc=justinstitt@google.com \
    --cc=kernel@collabora.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vvvvvv@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox