From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (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 A31B21D86DC for ; Fri, 12 Dec 2025 06:31:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765521071; cv=none; b=g7jKbme7hcVqQZ7cpu+M9Ht9D/sTEboHpdFekpqOHkqP/NbMNlhIhtE+dQyiD2+fq4QR7ylSmdrQKyS+YbTCESxCxqSi4fSSqaA1c4CupWQ4XwlzdAYBQCvksX/W7aLF83zTJDfUvO9li8wGFrjufNMNPs7NIVPutKwd/sbdKug= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765521071; c=relaxed/simple; bh=WHfjJAKVkIUXIYSx6rWIPbnGvhEHiZRS2sMWHC3xBHE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YPmhORZtPntUJiPq2Ai6NZiWZgTuJZej+uau7jDSwf2es4+IpZB1p1U4a9y6KXDGnxq53nONKdZ8FFUJPTj4gNq9bnHFShJxCYOWeCZ9SzUOOamYZWcNZ+0CP8ynjeG+PfhJoJIyMdUDpXPnqDidLRDncni0Rot7Ppx4jBz4biQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=eqq1yAh2; arc=none smtp.client-ip=209.85.210.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="eqq1yAh2" Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-7aad4823079so842488b3a.0 for ; Thu, 11 Dec 2025 22:31:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1765521067; x=1766125867; 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=BU9rsCRRgIidE7+HdxiRFrmvgyo9gOWJIixuizT3mjw=; b=eqq1yAh2typbZCt9Cac2k41yuJx63OB7KJeQW2P431JY4tdSetAPM19BcIOVU+1yBD COf+KCjXlRSFS2ugY2rczB7ICFW4yHGDo9VftJGNLhjQn0JAbV2rqptaoWgFe42yTRpD Qe6lFCtdKDjGB8UnF1CxHHtFiQ28W4z2hFox5Phg0HpIej1Gtou9kDBCx4OOga+hVbKK dASqQkW1uEw2LOk7mCFI3FfTZfSfvboLPEFWqr01PBJNmRvmIXE294yUSLhaj5OXuDM/ GM5BLVamLUmUWpRVzTWY3fHIF+qcxFgFi2HiZQs1+efUcNNtD4oUi+IZEXkfOSDHVifG 2Sfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765521067; x=1766125867; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BU9rsCRRgIidE7+HdxiRFrmvgyo9gOWJIixuizT3mjw=; b=ugGHHyOy/mpRbs4ae8Rlpq3DyfX86uwccbMZ6y53oIgvC7/MiVdQuwacT969y0NPKG Xbs/JWh2F8l/xdTdAv8ofazOU+7ES06k0KF+l5K4GLKQ3/8DnOKCT7NdNW38l3iluVyx y9kAewqbCUy96+JHIuHaOHL26UaROuH5jzwjdD4eUePHairi8I5kp3wFlwSWHqnxIvU3 r6/S8SvhLRgAC0bqVck1A95MF/VwxqqH/sbdBWhaCHWMeAYQSRAlDla3NUqffZWBLXS3 mBA0pQriuV/FbZ/fjgezBnVm+nr3Erg45HjuLMMZ9Fa2rhb9GBHGjZFxmI3AEFOsQ5mY hPyA== X-Forwarded-Encrypted: i=1; AJvYcCU8FCJJObfwmkLFc67j6zI5AOWoAfROq82OulBysTKw9NEWT87be+veRQzwXzeAUoIwCbsvDgCmDsAIoT0=@vger.kernel.org X-Gm-Message-State: AOJu0YyNtPqp7skAGP/Yq503tx9KBTfATi+hLu7c3biVQfonprNQhsp1 +LI9xpatQgZK4azlcHj9q5IepWTdcNo7WImcnZ5G+6nGphL07ww5H/KeGolZObTt+ys= X-Gm-Gg: AY/fxX4DYSacaClZRMenHrhRR0ipU40WlSvDLe7ECdJ4RP2GhN7/5wzer7u5uzkiXmq aH19aLM/PBChRPfQJgJDt+5t+JbpsDWk1nnSiY7626sH4uFREQDfsTDhSXSwAHUIqO+ZQsM8ygO VAcjogYdYwXjX7F2igOmADejqDnVPwPMpn5Wpt+clz5PGAr4JfhfzKH8Chc8tpYID4Y9+lmehvm Ey+KFT21TGJaJpHUCTpej/SzubtRIoa87sQ+39AT2WN6lPIAFzgKaUT+IsEL/KMKTqZEpYH4p/A lYNh3RQJF/HApbH0sMEhiCZEtPt2RtabYLPoJaOVhw2UjBSRfVd5dihItefMIPT9nhpdrjVxQ5E oIajwSagUbrl0NZjriOSEH0v9J7ZuQkVCPrkoU/ZkqRywv6PuRDVJCvIVYLghFiHuR7lBLWCx8n +X+lGtQLka X-Google-Smtp-Source: AGHT+IH+qDNBAAjjvzDFg6yVuXzSvyQ8clec2E1T7VYOcntr6/9AB25tUSNDsi4QD0DIx45+xLR/mg== X-Received: by 2002:a05:6a20:1584:b0:361:3bda:7155 with SMTP id adf61e73a8af0-369ad3fc3eemr1099607637.7.1765521066910; Thu, 11 Dec 2025 22:31:06 -0800 (PST) Received: from ziepe.ca (p99249-ipoefx.ipoe.ocn.ne.jp. [153.246.134.248]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7f4c2284da4sm4138329b3a.2.2025.12.11.22.31.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Dec 2025 22:31:05 -0800 (PST) Received: from jgg by jggl with local (Exim 4.95) (envelope-from ) id 1vTwgA-0001rC-Tw; Fri, 12 Dec 2025 02:31:02 -0400 Date: Fri, 12 Dec 2025 02:31:02 -0400 From: Jason Gunthorpe To: Kathara Sasikumar Cc: kevin.tian@intel.com, shuah@kernel.org, iommu@lists.linux.dev, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, yi.l.liu@intel.com, nicolinc@nvidia.com, alex.williamson@redhat.com, katharaasasikumar007@gmail.com Subject: Re: [PATCH] selftests: iommu: fix Warray-bounds in get_hw_info test Message-ID: References: <20251210211342.989850-1-katharasasikumar007@gmail.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: <20251210211342.989850-1-katharasasikumar007@gmail.com> On Wed, Dec 10, 2025 at 09:13:42PM +0000, Kathara Sasikumar wrote: > The get_hw_info uses a smaller user buffer on purpose to check how > the kernel updates only the fields that fit in the buffer. The test > created a custom smaller struct for this, but the helper function later > treats the buffer as struct iommu_test_hw_info. This makes the compiler > warn about a possible out-of-bounds access (-Warray-bounds). > > This keeps the test behavior the same and removes the warning. > > Signed-off-by: Kathara Sasikumar > --- > tools/testing/selftests/iommu/iommufd.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) This breaks the test, I already posted a fix, it should be in linux-next. Jason