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 17FC93B38A0 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=1777283327; cv=none; b=FDvK907d4gv0zRE1xqmtzfYGOnI64gMklAEbLPwjUlmlrw2kC0Mj8m+oe7aC0/Y/mtPcDGmsXvE8X4ocptmyBghA/UJ2V6c+Tbmcz0gB0PR2kscsIQXMoZb1e4i5sNIm2YlBcwohB00qC42GDcbNln4r5J068JT0rTyEOzbiljc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777283327; c=relaxed/simple; bh=NWHIH3ouqqjU28LIsZMEpIlQaONQR66hx99uHDySAWw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Aa9SliBw10n1DdRoe92XRpNkWg+ymcFBpKsvuv0lc4+QDN+BSMAmAQsmEghbp8iaKxCiT8VaXGWXvvp44nO6oMU8v9sQHX9mZeqCZkzZqzrLlVb0kf3P5Mvgx5+/yytd2qNRf9paU6ryHTbAow4kKqHHrJ5bJAnG5JedpjO9nbA= 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-4852a9c6309so92231065e9.0 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=M1ime2P4nMyslt70bMWvfQw1Aib9lu5ovvIy/f5aPGXZSIGRJ4uUsW4AKgRMM7blV+ itR9ECUDjy5kFsRif86GJB1Iy7rRKz+V6/UA3SoslZalRNGV4fjbzSlKkTG8YeFZ7Y4N BOE0rrB/f01X6GXRE0ggjY5D2t882GI7BSwKV24OKohyLSKS+UzQOQcxZ8rDNtFUivR3 6ERcpuosHiorrfS1pFU1RagI9rGc/HC1XJbJq+DyDtKP4XUqqyUKff4l4hvwS8T2/YKQ eZH13Pn572QlesmLayd5iZlTR1YS1kia8sMFbUhEY5ba5akdUb084YcEW8XScWMRQRgq XesA== X-Forwarded-Encrypted: i=1; AFNElJ+kZlmhsYZSxnOnYp5vFwoPQQmWn+oVwKZ9/ej2FN9xd69/clFCD16B8y+lz1VYoNYGIJz0JDl9IxvZY8M=@vger.kernel.org X-Gm-Message-State: AOJu0YytFjc8am+UXcrAc/DDEX4m3/n9DZwMIC1urep93tN1JQ5+TQSN e24kF6JfrdYdYDBnj7/Yjii9w7RVv0j8bjimjTG79wsppptNwsnnVQqo X-Gm-Gg: AeBDieuajcI/nISb585/DLVRJQsSP5PQQpe68I7NmldvMFSPOSaysxzeczQ7NfvDvZZ xiNqlgl09oXCFJUyybzogRkFJJ8jnnVZComawMSuYALFyJMIqh6341XBu/NusXgR994Fi7urWFP wWnK1TIF9WFmkElaoZl0WRIOf6m1RkeW+yemjdzdp9xPS3K8w9y6LrNO5OmjqjUhVeSFjJP4EkI SSA1spk6HqUHHQGGNVeKRa7R98TNWtatMQUNJxSsxEG5Nt1eeBvUaiWFM5bya+brz+mwgv7n4dh 7uH65sKFpCWkA6RXUro1SYJdwf54TUowQgvpvcjsZHSxw0V9D0n7skS4tbAPgw7YTAb3sHB1U6G BOa7Xetc8kBfeFN6+eKPpLMTZbRaKNHDt2fgAyKRwauiBmT4ay5Ax8ErzvIfYZzhXeiTRWedil/ W0Zv+Fr3r017RENadRfXHMLpwueZ8oEg== 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: linux-kernel@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