From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (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 2D889440653 for ; Wed, 19 Aug 2026 18:21:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787163669; cv=none; b=pl9XWBVDhBjt/iIAGEEHF2GNqSA9a70Ieb+5OTvwdMwv3vNS8uUkyD/yunkfNaA5DCj5iog0g3rz2YuthEIHsVuem/GBFLQnwQizp06EHlDPVEe6dFLMbDVvcGG/CeEWjJlVAOJ1ibxv3xbdlNGoaG72d8CqJuQAjlXl1ezJ0ew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787163669; c=relaxed/simple; bh=oVU0lu10u2nFA79Yz33CePdMJP68sQJhCqhyzyHCuvk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lOzgc/PigY/PUW9xSaO6al/+gmFG6k+qU+a3qgTbpd2mEIjdFPhPgjLjcDi+/MPiFlOZew00ZJXGFOwEJlyS/P2kRBthL73K1uaXMaP0Xvx4oiYBZY4fKqix6ffghkfZUOVeFWENnCSoMEj4lX5ydaPo2vCRyICbH4OOSE4/L8Q= 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=Q8CP15Nx; arc=none smtp.client-ip=209.85.218.50 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="Q8CP15Nx" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-c16794450aeso191048866b.2 for ; Wed, 19 Aug 2026 11:21:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787163666; x=1787768466; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=hThuAHpiuNPzFZaRiSmIoF888oHhxzPaNMpB0afArQ8=; b=Q8CP15NxU49pTPIlLrL38pZS/BO84E3fBaNXRyiiChYfhZVPWxmU1LV3F0F7zEaP5g 4KB0hwkPWpALdwE0+31/GHTGQwth5vwz0u7YRJ4rBjWZNkjvQuZhANyvwaB0TLNbglyA uQ1tM9CU7G3L1derfr48DLKNwcgHu0itmd6fyZ9/Ejm4WgQlXXTv1Wl14p2qGttPIOrG hT3NEBhJzFLtGjdpBbSggBbCgQ8eaeqhizhbc8WzZe4S2/DJye6Yy8jCtO9hxPy8vWNF ZnypuoWU04OvtfrI3t61yCYzt17RfEeU12U7StnS9Vgh9IsBaMWMuXbiRQ6IbRZ2GbuD Wy0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787163666; x=1787768466; h=in-reply-to:content-disposition:content-type: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 :content-type; bh=hThuAHpiuNPzFZaRiSmIoF888oHhxzPaNMpB0afArQ8=; b=U9L8wSUgWN2FQLPPEJ0O+z8N4E6DCgF0UihmdlV5jLHYs9EpFOctYvgmfErUCfbVZJ d5RXF66E+2Z/kGfifmIOMhPwxIXbartuoKN+Zin2VHcRFCop4tFy2Rg0sd6ZThkjZBUX M6cUWQT9PHaUSc8YxJ99ErkUGruVe9WWWBX1W620L+JFddYV4p256Qqp/XMdXJnR2zNy 44r8XWZs+r8rajFvMnT3tUOe/1AOJzgoTr1ljR+ciai9WlMIkdnW6dKvFrjaCubPc1J2 M0f9gslHrvhtyz5zM6NDN3cB0uxDW6mLTqqogI+J5tpKUbrN3eHJtVCJneJxbzyqEj+h XrTA== X-Forwarded-Encrypted: i=1; AHgh+Ro5sgp3ZWnBKWicQtZU6OY+qv4gUxCdS0IiHLAo+vfPh7SJzxwpVCxl9n5J40ggGPIiC8EH3oE9/5Euajo=@vger.kernel.org X-Gm-Message-State: AOJu0YxpQIVX6OGn0iyMm/W0koi6eyeVT6lY+ZWnAyOzGp0pvTynhdSb bVQ63i+eNI2xbpdxfR2KlJN1ZaLnaA7GcnsVcCvw4o5FZjyhvSyXCRGs X-Gm-Gg: AR+sD10ogh6ilAdjGAQjZi2GMlkOLp9sczbkwybVz01wF+A7Fi6SdbnvOBsHAkowgUe g5aEeClfVJh9Dk6QQd+V631Ag8WORgxI/smg+apmMXZ6iAoiKWeo/onpEQw/daF/2hEXo95bSP6 KZA1Mnf8dBbDFqaT75Md1KwLWAIGMegLT6yJOJ2LPyPmXwIwwYQ0Ih7rzf1P00yRRXNLUxkLktA 2jq2gIaq4wayUaxLgfh7R8pcKIU62kknV08TUPsjYi+xTHbC1l/of79f8j59D8T16XknpB+NVgE Y/EVYwNQOeoWe/oaAD1pCsa/jRT/Gex3aDphK31PH0Iz5k0xujEBsEP7XuYzU8rcdPyxO4ZvrHR 6ctnCl0ZPvPd2bz+bOwmNzPuSUgg1AypgqJgjdI1xBMH+GxzVGAutm0FtwAPMEIlBTlnAXgLGGC CPj/WJVnyrkVh+SAkk+H89Ya4855nTq09GHkG3hzz2eU98tSS/h0fhXqb50ghLNCnjc/Q= X-Received: by 2002:a17:907:d649:b0:c20:1c9c:b36f with SMTP id a640c23a62f3a-c23f937aa93mr417904166b.8.1787163666346; Wed, 19 Aug 2026 11:21:06 -0700 (PDT) Received: from localhost ([2c0f:3d00:6be:8900:ce5e:9212:ea4b:f30]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c243c5a0780sm112050366b.31.2026.08.19.11.21.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2026 11:21:05 -0700 (PDT) Date: Wed, 19 Aug 2026 21:21:02 +0300 From: Dan Carpenter To: Andy Shevchenko Cc: Tomasz Unger , Andy Shevchenko , Greg Kroah-Hartman , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: fbtft: prefer scnprintf over sprintf in fbtft-core.c Message-ID: References: <20260819-fbtft-core-scnprintf-v1-1-842c0603634c.ref@yahoo.pl> <20260819-fbtft-core-scnprintf-v1-1-842c0603634c@yahoo.pl> 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: On Wed, Aug 19, 2026 at 08:06:39PM +0300, Andy Shevchenko wrote: > > (text1[50] and text2[50]) so the write is always bounded. > > > In practice an overflow is very unlikely here: text1 only needs > > room for a size_t value from an SPI TX buffer length, and text2 > > formats three small integers (bus number, chip select, and > > frequency in MHz) that always come from real hardware ranges far > > below the theoretical worst case for their types. This is > > therefore a defense-in-depth hardening rather than a fix for an > > observed or easily triggered issue. > > This paragraph is not for the commit message, rather for the comment. > The paragraph describes the expected impact of the patch and it belongs in the commit message. My problem is with it is that it's 1) Wrong because it says unlikely instead of impossible. And 2) goes into too much unnecessary detail. We don't need to know where the values come from since even the worst case for the type could fit. regards, dan carpenter