Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp680426lqm; Wed, 1 May 2024 12:13:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXKkF6ApzCKTjgz18EFmDAlT5vMViXlJGBkoThKzPWApFx24Mu2mJmKeOFuhlpyjvMcJYN+KjGfqRvLSw9NPmD2I6mn3BzCgO5g8o+A1w== X-Google-Smtp-Source: AGHT+IGNZqU/enPyETZzYa7ssEipPg1foP5xbxccYSHN3hcJUlwGSAvq+HKCYLx34wMBrd2rrMCD X-Received: by 2002:a17:906:4704:b0:a58:f13d:d378 with SMTP id y4-20020a170906470400b00a58f13dd378mr2486595ejq.13.1714590786355; Wed, 01 May 2024 12:13:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714590786; cv=pass; d=google.com; s=arc-20160816; b=QWaHossqa85UacbcerJbj7HMBsPQnnL5c9FKo+9H//Xj9KJ77W7DEqY+iMuRyhxKJY BeFptEleOI/koV0VeRoPqdkK9rn1CciFsUG9hG4N29oQffHjotgk/DVeg2/nuN5a8dBD oyHgz+d3jV7TrkEz0IILBxka44lGiZsXZA77GfyZi1ZkpbtLMFPhnERThOJ+6aZhMUF7 90osmk+n1uWzcKUnaAlUYA7Lmv+PCane0Sf2Imie8p45O5cyYBwl0eYxQjn4zzyObgOU RG0MXdCUzbpZdZTfGPLMEHudyt0UkBZWtKFoP1yy/SGCG0Nk2zPyG4SuF1Hxck8F821e WVDA== 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:date:dkim-signature; bh=ftc3aqw2Fz5Res4OfCV1JsnJI6jUFRSYvKQ/iKjV0XQ=; fh=kN9BHeelc+jxCrwdvQFyN+79031AtEz9AmVQUY0Q5O0=; b=IMts1Ansn37pImq1Ok/WpjWMF6eIA9laCp1zZnGsdWUdyl0Ggdg+LXeHthC3LaTj0V 5ei04PxL/GDCVJbzEB+mgPwHkOB4NcTbGXGwwxafcG6YzCu1YQyjl7JY8cqd/iun4TMh oiwaRRo0iRSSGfHmOt23cCXCAL5ACDr8iYl0jMs3axiDo8dcWAXLpBTLaf1hzDObxCWN lhQWriexpeQvOzgxfe3O6Cw9IH+W2TemnRdq73YmsWylJ7xEDNfOp4PVQ2xFqi2FDfem aQkLIMttfIycIvObnntN4EnvUQSipcUsKTni1F215xvJ63Fn1qPA4dfQfiM8gNJj06l+ 2+2A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Hq7yxo+N; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-bluetooth+bounces-4238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4238-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id i7-20020a170906444700b00a526aff039csi16946569ejp.354.2024.05.01.12.13.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 12:13:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Hq7yxo+N; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-bluetooth+bounces-4238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4238-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 1959A1F22ACF for ; Wed, 1 May 2024 19:13:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 77AD5161302; Wed, 1 May 2024 19:12:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Hq7yxo+N" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (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 944CA1474B9 for ; Wed, 1 May 2024 19:12:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714590777; cv=none; b=aH3IwpWSb7dhuiam+eOZyJ41dcRA9vHCi3KnLCyifF20LzRhKsDePtjdwOiHYGLCxS23BnForm9iRsjhpMz5cOAV3Ah9UfZ/utUhPuZfAK0jnPB/m2nYq0AqtLROh3i+4YHxXo8txgZUZSWOLTqLhWr7SRpiee62q315ZUoxe0k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714590777; c=relaxed/simple; bh=EwKEuDLSOMKR1jV1lR+1TeGQ2t/97k23NvQ/j0JLcjo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oTz+GinAzBhyjqRNt39xJXpW4msDz4zk+n8v6hx++B/xH4X9Dt0CT/viEyHKPitH5rFwZfUb9x8b8afrceEqazkXnT63WXe77cMgjlXeFOejVSTbGh218nMGiKNsSam6Rm3X1m5C2qlrjrS4I0QULEcezh2GnaZQnBJ12Xsn7qs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=Hq7yxo+N; arc=none smtp.client-ip=209.85.214.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1eab16c8d83so57948365ad.3 for ; Wed, 01 May 2024 12:12:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714590776; x=1715195576; 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=ftc3aqw2Fz5Res4OfCV1JsnJI6jUFRSYvKQ/iKjV0XQ=; b=Hq7yxo+NaW7Cm+zBacnYar2Szf0QA8VfyMW+IOmQUfLN45/uoanAj2i8NwL8Au4UEa utNBUAvm5B6gN+k/8J00l9BLYDh9Xl3vcNIJaTEfpN1HymUNSc5K0ImUjsYXpm3sA7HP ed11wZ2ShTkIJEzCAH3pDCA+75X6iuyCS5S7E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714590776; x=1715195576; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ftc3aqw2Fz5Res4OfCV1JsnJI6jUFRSYvKQ/iKjV0XQ=; b=P8oX9XqICh5g5/CPS/8D21HcAyfp9MrPYAZo8fsMqRbTfJJ2E3OQFcFkY1R7x/chbk 8VreiFQOKV6dg76QEAduEiCBv/JpeIkuyJVW8lcA4OzFwKQtzNy6WIjJSSo7IfIKCSMa LqH3KrB4TopSHtd/oUbT0zBB1fvP2FkW9+gJ019W8hRa5tbP2AJLtR9ZC6k7ur8Vp8AH aFYriDD+82xjxnvVblUBE6GMYMM6Jfm8kHY4qD2kTf+wzakXquOR0hzgsu8nWwREB63p 7LSE6oYg+iLF9VWsQwf3z9/Sg6r4qof9ScvvQ9+PWKgKZ0SeMiXBbrpP5k9NTm5j6NVT L3Kw== X-Forwarded-Encrypted: i=1; AJvYcCWzNmsRuOqeX4xs4a4mCU6Q+Nerq0I65MauB3W5lmXJp64ScP6M8C3iYp3BQmMrKOjMOm/LonfWi0D4tX+utNq2cNZwmIh8nKcachuf4h1c X-Gm-Message-State: AOJu0YzHku0IieYRUz3S44DtHamLRqrt8YJG19WlhCn6e05eLemGS0qw YVzUBq7BSOMN4/4VEPVCtm+zc3KWzOIAIeoGYsG6c3zCpMbUdboeK1w0XjAIWQ== X-Received: by 2002:a17:902:f550:b0:1ec:659c:9604 with SMTP id h16-20020a170902f55000b001ec659c9604mr3860603plf.50.1714590775996; Wed, 01 May 2024 12:12:55 -0700 (PDT) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id b8-20020a170902d50800b001eab473021fsm10057496plg.168.2024.05.01.12.12.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 12:12:54 -0700 (PDT) Date: Wed, 1 May 2024 12:12:54 -0700 From: Kees Cook To: "Gustavo A. R. Silva" Cc: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] Bluetooth: hci_conn: Use struct_size() in hci_le_big_create_sync() Message-ID: <202405011212.4F3C0C1D@keescook> References: Precedence: bulk X-Mailing-List: linux-bluetooth@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, May 01, 2024 at 12:09:30PM -0600, Gustavo A. R. Silva wrote: > Use struct_size() instead of the open-coded version. Similarly to > this other patch[1]. > > Link: https://lore.kernel.org/linux-hardening/ZiwwPmCvU25YzWek@neat/ [1] > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook -- Kees Cook