Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp538190lqg; Fri, 1 Mar 2024 12:46:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVByWD2RpJYzStGhGgeUp4iIkvd5PebRBUqp9uX4+AwHo6cuBBzLJ1dCEIfNXxezM9fcnqMZy6UD1OUgEHAjR5y8D13uFWYusNLqAWDEg== X-Google-Smtp-Source: AGHT+IF7QKgTvG2cI5tk0Qmypvegfc4Vj0vVjEjATm6h4wFtyqixXApP7vYv2D/oMlTingujCvMy X-Received: by 2002:a05:6122:2709:b0:4d3:3974:657a with SMTP id ej9-20020a056122270900b004d33974657amr3003034vkb.14.1709325962327; Fri, 01 Mar 2024 12:46:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709325962; cv=pass; d=google.com; s=arc-20160816; b=V9lBixLlQGlH1gwMsAFEy/slXXBMZF2IrnYb0pS8fsdz3pNCGkhC6psdwGzP4LiuAi Fq/yOVamX/XnnMNUEosG6YXj6cdHzSXWqM05juqGa3oFP8emhuqgNVW5avCnLbNv3HdW 8AS2YCCLqFYinxud3u/9b3OnhMtYLM59Bc5PN+3cQAHUdJLqNcUKvveG1zHP5dul4kfI WGUOPRhGUGkybVXwrJg7qVfpPF/vJuH+bit74+hJ5JX0xGd15PmoqqnHaFdudb6KC/3y GSnxLlHS3GFpqfMH2toXsnu5oxPQM5FtiudwTYoc8sjVC0DPpD1sEh5yGsHNmHY8NaS1 mQAA== 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=r8hRbWiJCnr6KRmDmcx+k7mhGRkhvPSvpUDzp2pK3kI=; fh=BXLHVtbIs49YJJ7Iby6/ThpIIPYqbLCHEIYvUhVHU58=; b=WL+LUNbVrAs+YrfGobsjPKGowAoS3mXUntloEBXfZc/MnpudHk5oOBiy5jO+IuOiOo 2QSEczIBvlK/TiHPkO3HF+nH5eVH6ZZZJEMqWjR46J/Foibq448Z24yOlvS3Rz85quq9 CDVXFw92perZiH5np7+I8gxiBw/tlluT7ugnS2LtlyjPdE4N2Cc/GONoWZPvllXXOtpi vsANx4z78MlWXxfI3E6ZIHi/KhI73fQAW+A8rGDfnX1tp0PQWz1e8+tAj/VEZbj5BGRl jZ1dUDam8csRdLTTtbPzmNmVwebxTHL8wOOa9ZOijXFmbDWbVztkbAoQ/UZtaqm9W193 p/yQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QhBpF2Do; 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-kernel+bounces-89108-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89108-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m11-20020a05622a054b00b0042ea5a9fcabsi4580756qtx.142.2024.03.01.12.46.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 12:46:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89108-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QhBpF2Do; 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-kernel+bounces-89108-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89108-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 12B1C1C21DE8 for ; Fri, 1 Mar 2024 20:46:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CEC7D3E474; Fri, 1 Mar 2024 20:45:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="QhBpF2Do" Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 A53263D992 for ; Fri, 1 Mar 2024 20:45:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709325955; cv=none; b=hW6Y292arIuf1auAdF41g9Pzic/tksTHKZc1kCN6pv3mbH8NZJvvsu2lUuzV9dKRN2TiGwSk5n5gSoYW0zUSuWXPUOw5/Z+es5T70nW3g+gO8MMa2+63437yvmuPBIFPm9ZDCmrQsn7QvaY43HGoy/Xkna35knUZozU4bvqk1TI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709325955; c=relaxed/simple; bh=L1mnju6b2hWfk4qgJMRiUjxIH+2I4aVtoC/+dDgCUDQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jodL9JXDMJQDPltP4HiYktohyjtCEtsB9cmPvucGo/Ajkh4myNX13zplKQLROUKoWTw4wgbe9jx5OyJhnt4YReLIeP1vAwgp4SSLYBcXl8aXHcoAcehqItvSBQw2t7NXev0CNBm5DCG9nbHFzXEA2hUILWhioXacmKnhPVLwKbc= 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=QhBpF2Do; arc=none smtp.client-ip=209.85.214.180 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-f180.google.com with SMTP id d9443c01a7336-1dcafff3c50so21985875ad.0 for ; Fri, 01 Mar 2024 12:45:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1709325953; x=1709930753; 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=r8hRbWiJCnr6KRmDmcx+k7mhGRkhvPSvpUDzp2pK3kI=; b=QhBpF2DoqIVWqzjnKB0Urx6e8xhkcdvuKCkBUK/iB6JzHaQkbWQBfmti6OcntLsj5Q 22KZO+E6zokXeaSzADTynGBeS9IOp4/7HkOTnwrd43V3lQ9+23vumfpg5oB+VrviwomM wFMALhe55PpNIKWFBnCfd+dPiXmIJ2kQgCsIE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709325953; x=1709930753; 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=r8hRbWiJCnr6KRmDmcx+k7mhGRkhvPSvpUDzp2pK3kI=; b=GKwxo0TVpN/1uKxcf4TRnMWQrpHEAkKbI7oZ37nta1lm52rGLuaMQKAjDhu9DvbQqy 9UFUg6R0IctQI9rnHRbWVXHxg75bAkAGViQ0MOq7ndpHKa6x0q63Gyb2C0zOmgspPNWp mZjDdtJYAFy61d4fpJ25FKWIzPA2kYcyeOutQgd3JOT25eaSFv6+xAk6HlA/bLdwvMgh zjHh/vHZ4tHqaGb+9M7KTarx8w+aE0N77wYwFmXxJXRCKjIPXneLB7hjlPLoZXrb1NCJ PlQivp21IuN7fpVqt/z4YJopnZb2RRElbbPxIQAh5F/Fzf3SnJcC3MvL69so7AyGU3We 8RMg== X-Forwarded-Encrypted: i=1; AJvYcCWqbOPMbs3n4C6CM+oZUtMn3Dqh9VXiArEC94F6LrLPqiqlAnydCEf/LSqUStKgeFR3xCr+/KeYk0aaAYwZo0odDAQrHT9D7cJ0ZB8R X-Gm-Message-State: AOJu0Yycuxo3Z/6gns+IQbeca4QyzDB1WCCA/IUhWJYFYEF9cY09JyaE 8OnlpgRSm7PBRQyd8YJS9EzSZr/phY2LelQ+Bag144cvGcIJdntAEJK2T8e35Q== X-Received: by 2002:a17:902:c146:b0:1d4:cd4d:923b with SMTP id 6-20020a170902c14600b001d4cd4d923bmr2488161plj.54.1709325952968; Fri, 01 Mar 2024 12:45:52 -0800 (PST) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id n12-20020a170902e54c00b001dca997b3e3sm3892081plf.65.2024.03.01.12.45.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 12:45:52 -0800 (PST) Date: Fri, 1 Mar 2024 12:45:52 -0800 From: Kees Cook To: David Lechner Cc: Mark Brown , Michael Hennerich , Nuno =?iso-8859-1?Q?S=E1?= , "Gustavo A. R. Silva" , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, Christophe JAILLET Subject: Re: [PATCH 3/3] spi: axi-spi-engine: use struct_size() macro Message-ID: <202403011245.3BDA347@keescook> References: <20240301-mainline-axi-spi-engine-small-cleanups-v1-0-241dfd2a79f7@baylibre.com> <20240301-mainline-axi-spi-engine-small-cleanups-v1-3-241dfd2a79f7@baylibre.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: <20240301-mainline-axi-spi-engine-small-cleanups-v1-3-241dfd2a79f7@baylibre.com> On Fri, Mar 01, 2024 at 02:25:20PM -0600, David Lechner wrote: > This makes use of the struct_size() macro to calculate the size of the > struct axi_spi_engine when allocating it. > > Suggested-by: Christophe JAILLET > Signed-off-by: David Lechner Reviewed-by: Kees Cook -- Kees Cook