From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) (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 6AE763E1238 for ; Thu, 5 Mar 2026 17:10:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772730620; cv=none; b=nXxD/AkCQtNNVBgGaQliHTYPkzWEC5hbbtd0iX1E57gFknJfDGsymZ3gEeNrf05O9O6kLovgr0Frj2SiizjzIZ0q4qxzs4r/2HPK2D13bHNXfTPqnm/979GUg9fFbHhMywcRvctc3VVdMDHBCoYSjdZgVoYzc9LA3FSJpNA0z3k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772730620; c=relaxed/simple; bh=1dRtbSL0z2ytbckj6wSLUUOGGrIOP3G0d+3V5VkDtc8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=PotqONTd89nR+ChEIXGhZjl1IHzB9OTos8tHNSjumDX/a35P0sBzPhW93gGyR/DLJoIZHKrjZtngc+dbQbmM0EVOzZT6/6Cxmo8FJHcuZzFz4h40joIb/juCU3GvGMtpG2/PxYpSFN1Zjt+usX7YsVASvzeD+0eEAq9/zxtURFM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=auVOJC8b; arc=none smtp.client-ip=209.85.214.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="auVOJC8b" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-2ae48a21d12so35113625ad.1 for ; Thu, 05 Mar 2026 09:10:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1772730619; x=1773335419; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=5eRREj8B726P8wv+ghDGF6Dj3pEBAyYOHAidGVCV8Tg=; b=auVOJC8bHck87F4HM5e5x+TetsKim1cdkekP0YETd7F27R0c6M083u01Ai2XRYT4+d 9ZoWZpQpjElS959Suf0p0jI0D4nr+Jjxw1uSKFJJLd5v0Qe9DP6bWdaTm8fwaU/fZDgz Bl5sdMyeIl7UEdMU2EEAbohnNHQz0ifeIqT3oPQ3keHGLpN1qJMH4jazTB9jqMtHofhY G+8aYz0RIVftVvyot68kFaNeMMKtop2AHsnir5+W31i9F8DwZdCqun6IKie1H+fYLKyU hWiiuSdAxjP/FcRSxlafvtMrhsKLWw9R00ThpQBBmVg3CmZ3m9ldDNyItLeydbX/AXBs y6lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772730619; x=1773335419; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=5eRREj8B726P8wv+ghDGF6Dj3pEBAyYOHAidGVCV8Tg=; b=wNBJqvDPQucXBmBCbACSl8lV+GkYYEP7m4EyX2AuncKUepabyx8lY2ORTBfX0Zn2Re GeZeu7XPy5iNYav7Pqe3AH7be8KMNnTQ1yltiQcl0Uqrh0DPT5948mWEOeYzElKsuOW5 tO/QvDMQcEFEGpOnD0cV4ZFDC64Nhepwdk6BQherPTMT+SOxzJni64LLlLc0yhA0Z9bK MdTMOetOO9YMWch7ADAanUXlDkJ66wzJHy5p4yP7BQpFkivb4VyVpRzp0O6rgmg4/cyQ snWq/W+1uj3QGNnewH9Y5UO8TMEEsG9IlFoyl69vCOcLrqSs4TzpVj64auqJ6P83Q1PB 3wkQ== X-Forwarded-Encrypted: i=1; AJvYcCW5zNMV0jT4PgmQFUjxYtB6a8ht3kgjDmDLbnR/r+p0baJahp9p9/32nYq1EPPJGhzVqFaxYyqt94MbEIQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzyWgJn7cqZXFsli8NaUX8tA6OAoNYwwNvppO3HpyCOGj1XxuLj BY6TPjeYx9no36k+KeNxHiWY/O/8SA5zTY61UuL2HsMibrkIhCrzwPtxGMDfRmmGZpdnqlt3cMS EeLBttw== X-Received: from pllg11.prod.google.com ([2002:a17:902:740b:b0:2ae:3fb2:f203]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:e947:b0:2aa:e3c2:f920 with SMTP id d9443c01a7336-2ae6ab0f5a7mr70937115ad.36.1772730618593; Thu, 05 Mar 2026 09:10:18 -0800 (PST) Date: Thu, 5 Mar 2026 09:07:47 -0800 In-Reply-To: <20260212140556.3883030-2-clopez@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260212140556.3883030-2-clopez@suse.de> X-Mailer: git-send-email 2.53.0.473.g4a7958ca14-goog Message-ID: <177272956967.1565536.690492075978150495.b4-ty@google.com> Subject: Re: [PATCH] KVM: x86/pmu: annotate struct kvm_x86_pmu_event_filter with __counted_by() From: Sean Christopherson To: Sean Christopherson , kvm@vger.kernel.org, pbonzini@redhat.com, "=?UTF-8?q?Carlos=20L=C3=B3pez?=" Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Kees Cook , "Gustavo A. R. Silva" , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Thu, 12 Feb 2026 15:05:56 +0100, Carlos L=C3=B3pez wrote: > struct kvm_x86_pmu_event_filter has a flexible array member, so annotate > it with the field that describes the amount of entries in such array. > Opportunistically replace the open-coded array size calculation with > flex_array_size() when copying the array portion of the struct from > userspace. >=20 >=20 > [...] Applied to kvm-x86 misc, thanks! [1/1] KVM: x86/pmu: annotate struct kvm_x86_pmu_event_filter with __counted= _by() https://github.com/kvm-x86/linux/commit/c522ac04ba9d -- https://github.com/kvm-x86/linux/tree/next