From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86A12C4167B for ; Sun, 10 Dec 2023 14:26:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 076116B0082; Sun, 10 Dec 2023 09:26:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F41E16B0083; Sun, 10 Dec 2023 09:26:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE2106B0085; Sun, 10 Dec 2023 09:26:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id C87756B0082 for ; Sun, 10 Dec 2023 09:26:15 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id A3AFAA0576 for ; Sun, 10 Dec 2023 14:26:15 +0000 (UTC) X-FDA: 81551133510.30.930A2FB Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf21.hostedemail.com (Postfix) with ESMTP id EC6131C0016 for ; Sun, 10 Dec 2023 14:26:13 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Vq7auFPJ; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf21.hostedemail.com: domain of broonie@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=broonie@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702218374; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ge0+sAIlwYnRQudgAfwNUluVT/dOdw902qZij/TGRn8=; b=ogNjiYzdBWdKpOrCnnE66RuWaX4X7+BFTavn6yeOqnhOG9y44mVkAlLpsdwnTbEWDTns3q 4RG4KXUx3u4ybYJLXzGFQdLeTGCt+wHPXzhn6nbyplYnTiwIeookc4dxC/cfBGoWBD+Kc0 9B9hT122vC4JAI/tP1XMLnuQ0MOVnNo= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Vq7auFPJ; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf21.hostedemail.com: domain of broonie@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=broonie@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702218374; a=rsa-sha256; cv=none; b=JkfKhbxXCeAkni9T5iml9KGfdEpCTJpmZa3FhEX6u+NEowxTAMvD/081TvrqD3Pp8QJQwn ULneOmp0keg1x5qCSXZAPuR7Etc1sr99x+MS6DHn5xmTkTWcIc3lITKptecqZoYeVkOwkG r4R+s3ztS8aM9eg4JcvbTyheTVR0WHk= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 7BF6F60E08; Sun, 10 Dec 2023 14:26:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD3C6C433C7; Sun, 10 Dec 2023 14:26:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702218371; bh=AltcgXfkx0PNaD9wf1JDyoUG7rn4S77782W4sTsGUNA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Vq7auFPJszjdbN+XSlFWTTSN8msZgwSHdmUs+/mxgnq/dPouFj+2DIVC+c4h6iVld SGbt3aLb/7nystgPRKEf7NSSDX0ZqFqtKQr8PwXxuac5QCTzo6t869phO8kPgiNRFe 54YG+RXdLgh9DzMgc9ORuatGgcji9XMx8WlV6jp7ynFZlP+bW3C1n/kQN+LGdIUKdv SZ5EadX1jb+gdpO9EAkrVwJAIKD9u6uLwSKC+3aOwG1CVtbnFxTxqbRvsCaGJlfeIE vwGtv5UVMOKBXl6UyHsSQFzlfsZn55aePZLOb+WRCurO11dmN5ZDDuosmWf8s/ijB2 wlq2W1a0vjr2Q== Date: Sun, 10 Dec 2023 14:23:48 +0000 From: Mark Brown To: Suren Baghdasaryan Cc: akpm@linux-foundation.org, viro@zeniv.linux.org.uk, brauner@kernel.org, shuah@kernel.org, aarcange@redhat.com, lokeshgidra@google.com, peterx@redhat.com, david@redhat.com, ryan.roberts@arm.com, hughd@google.com, mhocko@suse.com, axelrasmussen@google.com, rppt@kernel.org, willy@infradead.org, Liam.Howlett@oracle.com, jannh@google.com, zhangpeng362@huawei.com, bgeffon@google.com, kaleshsingh@google.com, ngeoffray@google.com, jdduke@google.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v6 5/5] selftests/mm: add UFFDIO_MOVE ioctl test Message-ID: References: <20231206103702.3873743-1-surenb@google.com> <20231206103702.3873743-6-surenb@google.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="a6H2z5ZEGXpRtGmb" Content-Disposition: inline In-Reply-To: <20231206103702.3873743-6-surenb@google.com> X-Cookie: Monotheism is a gift from the gods. X-Rspamd-Queue-Id: EC6131C0016 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: p78j6jykmgsybn5oukczyzce5j8njgt5 X-HE-Tag: 1702218373-765111 X-HE-Meta: U2FsdGVkX18I3fRpzaJZqkpGzT0IGvikQimzWYwvkdmOBc6nouLHg++e7pCmMQIyv1w37HOffv+T+9oKQwokflIqpB1q1SXiiBQmN1IgVEqHxQ9pWPmAmCdiW3nv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7+EecRcA1ueLBSr65TFo6MTVCFxlpN1sr4/jZnarXszSV0a60IQr+HX5rbAvtHcPzb95bd2J09cUoKojHdRRpTBnsLb6LfrvYf05ER8cH7FirRwHeVzxwkyC+5SN/VIZ5bCxbSKOO+x58FXofS1ymaj8psj8vIraaQZkMg3D2saTl X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: --a6H2z5ZEGXpRtGmb Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 06, 2023 at 02:36:59AM -0800, Suren Baghdasaryan wrote: > Add tests for new UFFDIO_MOVE ioctl which uses uffd to move source > into destination buffer while checking the contents of both after > the move. After the operation the content of the destination buffer > should match the original source buffer's content while the source > buffer should be zeroed. Separate tests are designed for PMD aligned and > unaligned cases because they utilize different code paths in the kernel. >=20 > Signed-off-by: Suren Baghdasaryan > --- > tools/testing/selftests/mm/uffd-common.c | 24 +++ > tools/testing/selftests/mm/uffd-common.h | 1 + > tools/testing/selftests/mm/uffd-unit-tests.c | 189 +++++++++++++++++++ > 3 files changed, 214 insertions(+) This breaks the build in at least some configurations with separate output directories like those used by KernelCI: make KBUILD_BUILD_USER=3DKernelCI FORMAT=3D.xz ARCH=3Darm64 HOSTCC=3Dgcc CR= OSS_COMPILE=3Daarch64-linux-gnu- CROSS_COMPILE_COMPAT=3Darm-linux-gnueabihf= - CC=3D"ccache aarch64-linux-gnu-gcc" O=3D/tmp/kci/linux/build -C/tmp/kci/l= inux -j10 kselftest-gen_tar (full logs for both arm64 and x86_64 at): https://storage.kernelci.org/next/master/next-20231208/arm64/defconfig/g= cc-10/logs/kselftest.log https://storage.kernelci.org/next/master/next-20231208/x86_64/x86_64_def= config/clang-17/logs/kselftest.log or tuxmake: make --silent --keep-going --jobs=3D16 O=3D/home/broonie/.cache/tuxmake/bui= lds/25/build INSTALL_PATH=3D/home/broonie/.cache/tuxmake/builds/25/build/ks= elftest_install ARCH=3Darm64 CROSS_COMPILE=3Daarch64-linux-gnu- CROSS_COMPI= LE_COMPAT=3Darm-linux-gnueabihf- kselftest-install The specific failure: aarch64-linux-gnu-gcc -Wall -I /tmp/kci/linux/tools/testing/selftests/../..= /.. -isystem /tmp/kci/linux/build/usr/include uffd-stress.c vm_util.c = uffd-common.c -lrt -lpthread -lm -o /tmp/kci/linux/build/kselftest/mm/uffd-= stress uffd-common.c: In function =E2=80=98move_page=E2=80=99: uffd-common.c:636:21: error: storage size of =E2=80=98uffdio_move=E2=80=99 = isn=E2=80=99t known 636 | struct uffdio_move uffdio_move; | ^~~~~~~~~~~ uffd-common.c:643:21: error: =E2=80=98UFFDIO_MOVE_MODE_ALLOW_SRC_HOLES=E2= =80=99 undeclared (first use in this function) 643 | uffdio_move.mode =3D UFFDIO_MOVE_MODE_ALLOW_SRC_HOLES; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ uffd-common.c:643:21: note: each undeclared identifier is reported only onc= e for each function it appears in uffd-common.c:645:17: error: =E2=80=98UFFDIO_MOVE=E2=80=99 undeclared (firs= t use in this function); did you mean =E2=80=98UFFDIO_COPY=E2=80=99? 645 | if (ioctl(ufd, UFFDIO_MOVE, &uffdio_move)) { | ^~~~~~~~~~~ | UFFDIO_COPY uffd-common.c:636:21: warning: unused variable =E2=80=98uffdio_move=E2=80= =99 [-Wunused-variable] 636 | struct uffdio_move uffdio_move; | ^~~~~~~~~~~ --a6H2z5ZEGXpRtGmb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmV1yfMACgkQJNaLcl1U h9BZ+gf/UkFwJK/bQHdsM2z3PX8a8hGKETQ2aXDe+QSyV8SLbiBkgQAZt5ZV2EpQ upT7zDDXsAwZY3f1ovuYd7UNK8KqMjakLxGTaQtNcoEnnGv4d8FjCZYvVODQYTGM CtvpWTI9IqsgU67qiPHecWVs+HDF6K0y+nLpXkvMwRFeOeMO0uE1IBIhIPrPRK/K nwhuPLti4PfE/92SMVfCdXIqypM5ZfGkE+7gwege+/lqtGCKiJW8ylFpczBPNSCN WCasm6E6IOvsnWFhSvGNx/tRZ5YYKpO4ndn9d0onO60JmvBg7PJ1bBmBo7G1gPGv iUEnb2qdbO4CPRHkGKm03zAW5LfJ3g== =e4gY -----END PGP SIGNATURE----- --a6H2z5ZEGXpRtGmb--