Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4662350rwd; Tue, 23 May 2023 10:34:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7xG7990HMpgFGfOKN9ctz1xDKwrnsoB0sX8C2ulyzBiZsbOpPcK7oiG3IiICvmxZZuSwLF X-Received: by 2002:a17:902:d48b:b0:1ae:9105:10a5 with SMTP id c11-20020a170902d48b00b001ae910510a5mr13826463plg.2.1684863253562; Tue, 23 May 2023 10:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684863253; cv=none; d=google.com; s=arc-20160816; b=eCyj9DERz8ibz64BJw0F0PQGq41nQ3Mo6ztk/qKmXtP9tRDAX2NtoyqqOOW3mv00+v ZZj46SfV6ZukbfG4CzpgsyQu3PsQN1VOq35WNx7kHjVJTId0uAO3JXafjagZcboHUiMq ZS5NYYLR7ZSi1haqxLiB3H8owrrRNcc6lXk4TnjCDVRZ6Rdv5iOIKEOQtnbc1jGsL2/l EauhKvR0tlVqCNS9Q99FDQqggPrhjwbvuTAyQWBtVjxNR4/7GQ/FqpUMzGMK8QrjirVj 7FvP4jccGAo1W6j2CemrEV1Pq2Cacigv7H0KYDwfzEUQZYEAQZyEBZEZEt+0fH9U020D iU5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vHRHm9cqQ7Q0n1UjBQwnZXDQwg6SsSkREtAQzpA0zS8=; b=lM27/8FKeyTITS/lDKMnHpAL2yoq0gUrEWxnXD570oYNzgAvsfv5ETDeCmmYd7/tXb PjHHM8zUaC0CFb8Bq9D49WjWoPr/a7KRJfAcUdvPikWRUV/5od7JjQ5Rj1HffC8KOQ3M tbFvJmWPuM39InN0plXlhFjEm8bqgU8WWR0Prwk+EpszqKvnC6lCDegy7ocQHi0NLOgb tKzZFmxhQPeNN/d2FraBKp1MDMm/MTf5oUTWRrnjInJWzjhEB5vkhlFAH3vQqHC4aaJj ugV8gV9tDVeJWsh0Vmc1t9Vz1lRyizme7EYrjuh3lhVyJeU9+YWun2KN69ux0PgofIWK oVgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SP811KKY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c6-20020a170902d48600b001ab29e16b3asi5322785plg.286.2023.05.23.10.33.59; Tue, 23 May 2023 10:34:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SP811KKY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238215AbjEWRaY (ORCPT + 99 others); Tue, 23 May 2023 13:30:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238189AbjEWRaR (ORCPT ); Tue, 23 May 2023 13:30:17 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCB1F97 for ; Tue, 23 May 2023 10:30:12 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1ae851f2a7dso34611385ad.0 for ; Tue, 23 May 2023 10:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1684863012; x=1687455012; 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=vHRHm9cqQ7Q0n1UjBQwnZXDQwg6SsSkREtAQzpA0zS8=; b=SP811KKYOneg7dl/rmLOhy9/xH6sqzY2GnOzj4smgfmDjcrNa1t+TeWH+MftwdTdYc E4BW4v0YCWJszzUnIyk6s5yZ8eHJPHGmGtHHpiX8qXFCDB3eF6JRsj5bjXrESVN39YKd /i1og6RnHIp8XIO4y1LBmPTKuDNMNqYW0a7Io= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684863012; x=1687455012; 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=vHRHm9cqQ7Q0n1UjBQwnZXDQwg6SsSkREtAQzpA0zS8=; b=KeoQOXHZn1i2vuPtof2ZbblUpTrqAsjKH4OhrLPuhWOaf0TAGPfSHO6v3NwrYnJkjy F9RNLXR5LwDkzyp67GDUmTsL+zvigRFduDO/cbc79GMElYNHxn6/xOaZXsPMRjyuvlqC c/XBjqhS46Y4PyxTKkAsUrRF7p60EDwCxIY+lJaGGjorkTUjqP/YnVHkOiKnHe0WuxPn aZYcpcIS9sPe2P2/Fhwz/KW9kKaj2O+KurIcDWsAz5CX4ntYBxMznQULxED070JuLJLz c7YDc5/l/c/h2URm9mu7CaD35U4yF7fMCYEjybAibR53Kaj1MvzBMpTH/VZYe787Ecsi 965Q== X-Gm-Message-State: AC+VfDxTCfhvaLsa9HeNkEkFcEbdmZFKN5oAwitBCSuMVNLQwL/jkA/1 ATAcVTNGyZJ71UWa6eXr41OCaA== X-Received: by 2002:a17:903:228d:b0:1a9:6a10:70e9 with SMTP id b13-20020a170903228d00b001a96a1070e9mr14552996plh.33.1684863012392; Tue, 23 May 2023 10:30:12 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id u10-20020a170902b28a00b001a1c721f7f8sm7073073plr.267.2023.05.23.10.30.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 10:30:12 -0700 (PDT) Date: Tue, 23 May 2023 10:30:11 -0700 From: Kees Cook To: "Gustavo A. R. Silva" Cc: Eric Farman , Matthew Rosato , Halil Pasic , Vineeth Vijayan , Peter Oberparleiter , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , linux-s390@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH 2/2][next] vfio/ccw: Use struct_size() helper Message-ID: <202305231030.5DE9FCD31@keescook> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 22, 2023 at 07:35:59PM -0600, Gustavo A. R. Silva wrote: > Prefer struct_size() over open-coded versions. > > Link: https://github.com/KSPP/linux/issues/160 > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook -- Kees Cook