From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 13C4624A076 for ; Thu, 12 Mar 2026 21:30:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773351014; cv=none; b=fxiWOdlZGXQWTM75iETOAtgR1GWwJ6Twd50Au/ljzUWKGxjV5JXo4L8W1k+3qaRQFuHtVgCmgG8N1lFeJTjkAUOT0KE06EUKBS7GyfgN7AufDIDzjYjNuCFpxBnEVJGK9CsEvdMEMgNdVBS2rI8t271bT+XRgpkBNCcVlwb7UkE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773351014; c=relaxed/simple; bh=AbdZJ/laEKTWH0Mal+6Mop2zV3UXcKdo43MTEhnAjxY=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=utGq3Yx93G9+BfYPMRKAlTMsxPPVctdJJqIj8NMNipfgdSvDOTeppYeFVjZQCu4cjdW5rrGDYt0mSYL28y+/zaDsFtfnwVQ/hDamC6qSIcUR4cvRl2tNQehBaxeW13z3J1UWtqIROWvTPerhNGrnNKlarB/OFkvisPGE+HROkFU= 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=jF3HBsLi; arc=none smtp.client-ip=209.85.221.46 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="jF3HBsLi" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-439c9bdc1eeso1300794f8f.3 for ; Thu, 12 Mar 2026 14:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773351011; x=1773955811; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=AbdZJ/laEKTWH0Mal+6Mop2zV3UXcKdo43MTEhnAjxY=; b=jF3HBsLiHjba7h1QNcVmxTHVWR+TKdYK4AQ6LFSIYT3299ha1GY/7wjsmEMnkAQoNQ 49g22LnWdbJ/kDrt1hpFq7V7sMOWVChOi84/PUliApPChcPzHe/geoG9oAxrJ4hpqvh4 QOt4/jgognHDlckdNBaPPAAEGIK+ShLPuTyB0A6NQ1GbHA26OQ3Jlh7rLGlQWWaeX4+G FFIbGdS/cIhuk+yOFaP/6W6iZsW47cHkQi2MANr3y9uavai42JlGBgXMz1jTUaFvnkeD NzYSqrXswI+x4y1MNFrEu2dpnWDJ0QMfT/vkxZ2AwscAmoNRbLIqBCxrby3kC65hJPt9 eIhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773351011; x=1773955811; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=AbdZJ/laEKTWH0Mal+6Mop2zV3UXcKdo43MTEhnAjxY=; b=udX8WXVPUxuH70h/wWDVaoEjAzN648HyUTpBvWY1FTSHwIdIUKoZUtfsiU3nrKEVJy Aq0azP5T+5HB09/y1V2Krdb8pC041DEsAbw3/+kueLDLaVkA4pHftMG9e3bP4J/ES7oZ R9WtSKxgsdgZI/MIBzq2BJffVGgpx9tj6aJQqxgYVn+N8uqmzQwJoQLG+E5pyt+jP5kr RJchsH9p0so5M0rN/vKMhwG3hSKhvxCZtrGBfTP5W+QBq9k968q5ai5dpopiHSo03R7X cXs72TIh00DUnlJ/QLtdLAxZteb3QQvE+2JGUTyUU1aSvjswWaRR5/ltlbUepbN5RZ9j 8Nfw== X-Forwarded-Encrypted: i=1; AJvYcCWQCOMoTukQo9XPZKdTuL7+4oSja5CtuoS66jfDmkQ+ntGtMPW/gsfi5B6lJlq0imi4jeCUne9WtHCP2Sk=@vger.kernel.org X-Gm-Message-State: AOJu0YwVEjMgwtZTTzmEJsXMl2mHUnO5qSP3YmwomJ0ots2YHzcdG3Oj tyFUS6LlYKvIxiwF7Oe9U3mVbn+4gANmLREad1l4N5hLQJ0wQxAWhGTp X-Gm-Gg: ATEYQzy889XLzD9GNfakNqaMT1joAajqQrdphjNXmDbnFCw5QlF6fBhasJVxsLBRhLl Wu+5RwUcj+8YlJl/GhE6U2Fm3rGNXLorWg5Y/8xS/re4GIoXdrOqDrkyuJ8jUXBtvXBRpB5Dh7o UzmN7wwrL9ntatjJ2+y3fGJay/GzuiLC2xSvRiTmhiBshMIB7BiR0rJQp5yEz7qSmFBIlCZqcfi 5+VD9TGUTsSH2Z1IAQMsAlCMBR6/RNchBWzUPmb9BJ8tVNUoohbGtz4TU5S4IuZqq1HJfqDfYt5 gXY+9FlGswx4Kv1IaLO6qgEN8nssWtTUiplLwnvt9NNCT/y4HVAwUOU9JXJHT2L6JZsKOW0Ue62 g4NgRjIQNTaFMNu0zu1nEdpQBQrb8LgvY5VM8nIbngkXdjGCZKeFSNfKrbpq1tUKqILqLaiBhwL rk510/U9vpq7njvBNI X-Received: by 2002:a05:6000:26c6:b0:439:cd26:ce0c with SMTP id ffacd0b85a97d-43a04d8669cmr2523513f8f.17.1773351011276; Thu, 12 Mar 2026 14:30:11 -0700 (PDT) Received: from [127.0.0.1] ([86.1.69.5]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439fe21b631sm13757033f8f.27.2026.03.12.14.30.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Mar 2026 14:30:10 -0700 (PDT) Date: Thu, 12 Mar 2026 21:30:10 +0000 From: Josh Law To: Andrew Morton Cc: Steven Rostedt , Masami Hiramatsu , Josh Law , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Message-ID: <1bd0e36d-0ea0-4a79-bbee-e38de553f1ea@gmail.com> In-Reply-To: <20260312142809.cb92d6b5197e89645edab80b@linux-foundation.org> References: <20260312191143.28719-1-objecting@objecting.org> <20260312191143.28719-3-objecting@objecting.org> <20260312170643.4b0f926b@gandalf.local.home> <143ca1aa-d053-4947-9817-72462876c224@gmail.com> <4c426803-91f8-48fc-ae8e-20676479b370@gmail.com> <20260312142809.cb92d6b5197e89645edab80b@linux-foundation.org> Subject: Re: [PATCH v2 2/3] lib/bootconfig: check bounds before writing in __xbc_open_brace() 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: 7bit X-Correlation-ID: <1bd0e36d-0ea0-4a79-bbee-e38de553f1ea@gmail.com> 12 Mar 2026 21:28:11 Andrew Morton : > On Thu, 12 Mar 2026 21:09:52 +0000 Josh Law wrote: > >>> That's a fair point, Steve. Given that brace_index isn't touched elsewhere and the current check effectively prevents the overflow, I agree this isn't strictly necessary. I'll drop this patch and stick with the fix for the off-by-one reporting error instead. Thanks for the feedback! >> >> Wait Steve, >> Thanks for the look. I see your point that it's currently redundant given the call patterns. It looks like Andrew has already merged this into the -mm tree, likely as a 'belt-and-suspenders' safety measure. I'll keep your feedback in mind for future cleanup, but I'm glad we got the other off-by-one fix in as well! > > Please wordwrap the emails. > >> And in my opinion, merging it is a decent idea. > > You've changed your position without explaining why? Sorry, I think it should be merged because it's better to be safe than sorry, I know there is different methods of implementation, but this one still works... I know it's churn (and I'm sorry)