From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 180493B38A1 for ; Mon, 27 Apr 2026 09:48:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777283326; cv=none; b=ZsaEtaek8LwEwMmnXSt99eTXVxiE+LrU8HbNhhjTQs2hS0BSErhe+mUM8ySdAMm4QpA7rFufpfQ4G6+3dr65rH9jeGISgTRQAxRkwkQMCDROfuV8G0mNt9fZmoOQ7EhvN6S39xKH22C3RpIbU0+r+PJ0FlM5g/Ja8xpfj5wpHI8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777283326; c=relaxed/simple; bh=NWHIH3ouqqjU28LIsZMEpIlQaONQR66hx99uHDySAWw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LgijZjvm1MqcaNTvwANtTWSN+y/zWL++sWXn3eBe13/m6n5QlbIK2I1boGGw+dyF6FRXVYP95kxUIXNAbAMVU3dpzT9xBEcXY74QlbNLBComo2GzN3UM/5oCDTap34II9QXeobF7g8kpSrCJGdaaSAD922ciZVql90orp5DWvsA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Irb8qNzq; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Irb8qNzq" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4891c00e7aeso74034035e9.2 for ; Mon, 27 Apr 2026 02:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777283323; x=1777888123; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Y+utIrc2QBhWvwYujurwn2Jgp1vdBp2MWfdaAw3dv8I=; b=Irb8qNzqxyyiMPkuhFkkMRMjYMlY9uC+cqCzkXoGBA1oIJXpIqF6CcN6rMxIUR2i64 1ALwIorR9+PpjVdDMN+70uIHjl92tLulR2Bo088HjRXeHfbPoiqPg0QIALpUsa3T/4V8 2XijCHIZiGa7h2kl1EgaCieuiMYT4zN5ppCfCa6LH85LsttinAxrC8O6hfsixND28ByY F9k9cFtSF13ZC/UomIC0n6385ELvtghsE1PxVzfX1Gn04J/rfbjUIUE2FxZmWMjFCrNx Eqo0Tba43hAm+kSHGYqs4pHYSEaRmJBGqmB/9mVu/r9Y1mb7YOfWTnaRR/P8IjNXWJnh mFLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777283323; x=1777888123; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y+utIrc2QBhWvwYujurwn2Jgp1vdBp2MWfdaAw3dv8I=; b=L+w2B8sH3GvfP56zMBvHHB0StqRAzPmuZ5/xexAc3h/F98lOnTZ9YIErxozPmaxqjk tFePVFbx7dqhi1n8nKy9v9pv1huXZXo9yLdAw+sdXZgrWDePRqIILiDyQmFa87aL11TL 4hyXnLZXK7lu8CN+qc52YY3DZGhzVHJQGChMFb1lA8DeqLI/smmVHssee6RJHHcb1uu+ Fivdcu7rG4yIi3+VysnfM4Pls0MdqHjGErBhfKde+/d6mhTG0XzbCIVGcWR8HFtZqZQ7 OisQUVp8SPgW+k34546upPBmY0LvEHjrvEq0o8YvX/AA7zHFN/WNdRHni/VkHP6Y4z9J v0/g== X-Forwarded-Encrypted: i=1; AFNElJ9rFKsKN8eq40zuPkTyxLnQjqs9U4C2j+iNn/CHKhI1crAPBg5j/pxXORi24I46ExchpxF/TtI=@vger.kernel.org X-Gm-Message-State: AOJu0YyzuOZX0v+onWUseeAFqN1GHCIuy9XS+J3JG/pYEKlbCGUCQggv 4z4Iz3+l93ePrV+uF6T7JrWT7z7KwU5Ajp0tjSqVzHQq0TmWgCj1GFap X-Gm-Gg: AeBDieszrhBB/beuScjiqVpR6/Hd/GMI0is93KHj+QPwm5X/O9xuzPdM0GatHJXXeyv adIT/6ByKS6qVytA6tKLzOjJZ30NqgFkGC1DqSRGwXFZ6Pgsb6Hv3iDn6HhDjz3p1wuH3/66aNf Umany0kuHzyI6XM3pdcLk0C8yake+fFqu/NrkenSCz5So3VoxvxqK81tceNRrn/WMbovzFE+Mp0 /o7t/l3KDIPPDD2xEHN2U3fadSjXVJLnUloH3QmD34ScqI2tr/p/NV2xgy+Q4EiuODEtpEugyZA NjIfSPCUYDHvgRMNUBAoZZHFRpTLK9ejc6WAf7o+/6hUvvVkxaQ2KYKBWXqvBTHgpa1zFB4Yr0Q iM1tDUbORW3CgD7zmFq7c6N9YgjjRPxW1s92ZSmRVyIeCPLmjTxz0C00O4OScdT9scmQ9/2rmp8 WLocrqE1VDdq2NRxrOM/kqo9r81LEJeQ== X-Received: by 2002:a05:600c:450c:b0:487:55c:e0c1 with SMTP id 5b1f17b1804b1-488fb768816mr586188275e9.14.1777283323221; Mon, 27 Apr 2026 02:48:43 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a6124d7e7sm473159275e9.5.2026.04.27.02.48.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2026 02:48:42 -0700 (PDT) Date: Mon, 27 Apr 2026 12:48:38 +0300 From: Dan Carpenter To: Alexandru Hossu Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, luka.gejak@linux.dev, stable@vger.kernel.org Subject: Re: [PATCH v2 1/2] staging: rtl8723bs: fix OOB write in HT_caps_handler() Message-ID: References: <20260427081748.3407939-1-hossu.alexandru@gmail.com> <20260427081748.3407939-2-hossu.alexandru@gmail.com> <69ef2c47.5d0a0220.2e33d8.bde8@mx.google.com> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <69ef2c47.5d0a0220.2e33d8.bde8@mx.google.com> On Mon, Apr 27, 2026 at 02:28:39AM -0700, Alexandru Hossu wrote: > On Mon, Apr 27, 2026 at 11:17 AM, Dan Carpenter wrote: > > We need a little change log here. I was hoping you would provide > > a link to the AI review in the changelog. > > Hi Dan, > > Sorry about the missing changelog, will add it in v3. > > For the AI review link, I don't have a direct link to the bot output. > What I know is from Greg's reply in the v1 thread on lore.kernel.org, What about a link to the email on lore? > where he said both his fix and mine would break things on some systems > according to the review bot and asked me to use truncation instead. > I went with min_t() specifically because he asked for it. > > You're right that technically early return would have been strictly > better than the original, the original was already writing out of > bounds so it wasn't working to begin with. But since Greg asked for > truncation I kept it that way. This is the path of least resistance, but it's better to push back on bad advice from AI. Greg won't be offended. And if he still doesn't like after you push back then you can still do the min_t() version. Both versions are fine really, but I generally go with the stricter one when it doesn't break anything that wasn't already very broken. Better to use umin() instead of min_t(), btw. regards, dan carpenter