Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp623987rbb; Sat, 24 Feb 2024 16:52:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXMnS85T8KDgi9WvexqUqQiNEN8oITgML2QvHVSMtqi3/E63Z+FpIOWVWqq8Jm140SYOGtI2QU4OT5NKfxcqlKtsgoIwBVWl8FIbu2aTA== X-Google-Smtp-Source: AGHT+IE2qEpy27CirnQtQkFnxdRz4PN/VnmZAXaUX8lk9fGrHjNSteqvKcr3ALbqufKH4L06H7v9 X-Received: by 2002:a2e:8e88:0:b0:2d2:403f:6133 with SMTP id z8-20020a2e8e88000000b002d2403f6133mr2043707ljk.11.1708822357429; Sat, 24 Feb 2024 16:52:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708822357; cv=pass; d=google.com; s=arc-20160816; b=fMxTq0hgudybHQDr9S7X0bz2Kl2pl5ATRry586W3PXOuYyR2VOZVYflM7BSmR/iY6P a3kRmJoFjWFphf4cGPLNy27umELnwiCl0w866TQfbbyMRzyu+IILq7OzK/94YMCS5m5/ 3f3ub17yXbOPZFiS5DkxuyV+4cJdSAoL0qviJeFlKxDJfZzKifz3Tmh6wIVPRewwBik5 sTe9rMS4YESjtHUxQ5fvtarg1VnFlBDECaSpGt4vufskX/umVN6NmxhrlZy9ZUEARuR1 nUJQRIRbQBwMd1RGo6F9rXFSfS6A6LFbgeT1AAvWqt4PS/dFULcZc8FaIMGgXWpnCBkQ /G6w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=6C+8ude/+IwsBnI5QizZR0SvU1w8AEuhKPokRHqFkIg=; fh=R92vWM/KAryU3oM/YarkKqcbft0IfE3jAWkpBydS0sc=; b=nlNqpRb/IWF7uhb/cs1Dfgo31VVqYHAqpGrIibwEMZmmCnm9G8/xZIwL2IUbiPwrfe ecSt4M8jpouiImfDaUUl9YyXc5lRVLbsygoKfZSOdnh27RvJNJBL+wQjGN+ZOa3awx4s sJKZ2mi8EE4DNuiTNGfk8WSFTw3NdpW/ILMjv6AfN5g6LL8niu76hnsN4/3de8b2Soxi T6BzsP+2M3b9eySGKa5rp/lhydi/jxjqVIgGc4+AL2SAEmsRILUyFmKwli7DzwL6igVE B67a+CcS0qCpE6l4Y6o+XWF0ivdklWgIfWOI3nleWOorTB424vTgxXMdUX31NY4RDUgR UOiQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=wjSOZ0LU; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-79914-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79914-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c16-20020aa7d610000000b005638a8320bfsi860292edr.437.2024.02.24.16.52.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 16:52:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79914-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=wjSOZ0LU; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-79914-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79914-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 26AD91F2163D for ; Sun, 25 Feb 2024 00:52:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E86632595; Sun, 25 Feb 2024 00:52:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="wjSOZ0LU" Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E66F1109 for ; Sun, 25 Feb 2024 00:52:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708822349; cv=none; b=Bc/F+RysLqmZry9/edSJRKM6+Z6tKDGk6+C/96LocvEG9SwDmrDnajexHfY4DBuLIPPvD0kivM+Ckx0BBpU7hzDXGBw9MEuTuDalHVG74782QelednKB30YD2DyVIm7DcFXdrEwPqGCYB23TKDqO7WZAR554u3h/DOhjkY34Klk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708822349; c=relaxed/simple; bh=ftZtns3qGmb9r2WveXongU4udenzPbV4fOt/bbe+hF8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GAZQmr+Q9GmBOG4IH5lDWgbDBGfjxvm+Qy2BDfg8FTUTmfzLwBi+ePuo4OxmMpKVDY8WbSWuIua2o2zcaqjZ8yvVcolRKXkUwLFmZgrVKVPup+zp2Y/xEufgQK44dEyLeaS0GjfotZoFBg5kZOeaG7XxiOlvDzvryMGn19o5mT8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=wjSOZ0LU; arc=none smtp.client-ip=91.218.175.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Sat, 24 Feb 2024 19:52:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1708822344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6C+8ude/+IwsBnI5QizZR0SvU1w8AEuhKPokRHqFkIg=; b=wjSOZ0LUZGu35THtDakv4UCym4yNrece0LcspfXPSsh3m+TTxh0zFDkrhEBRRv9Da+CSuU YKcHZ+vhClBiXU8LANlMPV/ipp+xI2J1fYOYFTZw2ihOy6ahBhVi6VE4cafp+NCmBFltXp ElO5vHtIjYRWcc7+TRIYg6LiStB91Rw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Erick Archer Cc: Brian Foster , "Gustavo A. R. Silva" , Kees Cook , linux-bcachefs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] bcachefs: Prefer struct_size over open coded arithmetic Message-ID: <2ysy6s2on7ae24j7tiwpwp6vp33gqvn2apqhprnvip6lzqxdao@p73c3ukzvcjd> References: <20240224151658.8272-1-erick.archer@gmx.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: <20240224151658.8272-1-erick.archer@gmx.com> X-Migadu-Flow: FLOW_OUT On Sat, Feb 24, 2024 at 04:16:58PM +0100, Erick Archer wrote: > This is an effort to get rid of all multiplications from allocation > functions in order to prevent integer overflows [1][2]. > > As the "t" variable is a pointer to "struct journal_seq_blacklist_table" > and this structure ends in a flexible array: there's no reason to break these out into multiple patches, just send me a single patch when you're done - thanks!