Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3688609rdb; Sun, 10 Dec 2023 17:01:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IEYSCsfAiiJfKsXpmdSW/+Mkr8JlWt88Jo/d4LxGROc4jOLdpgWQk3g9B4Vx6lLb2gx+ky3 X-Received: by 2002:a05:6e02:20cb:b0:35d:6bc5:e72f with SMTP id 11-20020a056e0220cb00b0035d6bc5e72fmr6539440ilq.47.1702256503220; Sun, 10 Dec 2023 17:01:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702256503; cv=none; d=google.com; s=arc-20160816; b=g2OdYgDKS05fHMtOFkojIZaWtoLiWgcahrhrJ9Y2yZ1lareaO377TbqBME1szWjg6B zIm+6EXAdH/qvetPj1ZRDXhJluNF7wqVrSi4C1ouVHr5BypgnlbpL7eOoTjvw8qcHPLP gI0D/BEBFIltkOrK2CSR+ljOHU2kPhyGcZDQf82o3OpUbiiCEtvEGT8lH7UaXsOLcRH9 MvwU6alFzwnreib0sOZA/ZEFSYG67G1gNT9vxKLzwQ2mGUVPpxumv1v0RLDNrl4cHlas pqsaJ+/gMQGWTn8o2x0JCaycHZCYC7lalDwT/SUJvbEsQo+DnmMC/ZdexBqK+Mt++4wT bxYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=+WQ5Kl/17KRmeDrnv++dZDxabOnVYumyCPRm9UvxCXU=; fh=OBcQ5Yl5Mh5hkm1Yc0LgdOvzTU3WmE+BoEfzH/JyNi8=; b=PEl60Xnh7ZyoQJXnzRrLrjGHSyb1eVOuCvqEIxuzGEXp9Fur5Qs2Dz3fY9oEalLXA0 7cMK/l9MuFJhgO7eY4dpY6tNI6FvTMfYoIiy5JENf1m3nro8o9KxzEZVQ8iyZnG7hcEN 8QMyd4169hyxZyLwNegoeN21ljlH+ihCxgkZxObR3RXvdYxLSSlMIimIeMH+ao+xMtAD rBwyveLNWRMLCDAXdtjTQd4rkBbz0Uo3SpY8IZR4I3rXK2f8VOyqhdLGX2FOID2W0eIk snsj8m0xdFSIXQK39wPEiIgxbWSSYWYs8FHRFFcwbVAiXF34MTXO9k7cnOhzgmfXFcow ogWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=CGszbrQZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id j9-20020a17090276c900b001d06d5f9533si5200329plt.619.2023.12.10.17.01.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 17:01:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=CGszbrQZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 83636805744D; Sun, 10 Dec 2023 17:01:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232211AbjLKBB0 (ORCPT + 99 others); Sun, 10 Dec 2023 20:01:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbjLKBBY (ORCPT ); Sun, 10 Dec 2023 20:01:24 -0500 Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D1EBA9 for ; Sun, 10 Dec 2023 17:01:30 -0800 (PST) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-5b383b4184fso33322817b3.1 for ; Sun, 10 Dec 2023 17:01:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1702256490; x=1702861290; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+WQ5Kl/17KRmeDrnv++dZDxabOnVYumyCPRm9UvxCXU=; b=CGszbrQZZo2UCe6PlQD4gAXjJ6qCOyzZzZiOMfcKbnwIVtAtl7+lMEVe1mLEgrxjDQ TjuNKqbl/wAOsYI23Km0x16ku0uUFNt4H7UWwUyN3FLNNegggc8cT1rD4kFAvohqDpDL e6Os2k9wwDBEUStdcYfvby4H7Bn1WnBuYANZSOM+Wm925d524zoJU/bHc1SqP6yh55mo 9nollJXpVf4GS0wxNcNZ64AyLmsTB4dhTMJ6g+ECQzHd77yRLmH/EH4qCzCE2ZB/WOoC 3afxWDajYOi7DbpngLTG+NSV30ABNajhUBT3+HsM0CgRXwbjxKUCbYWhwxHJ9gXDRz4r 46VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702256490; x=1702861290; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+WQ5Kl/17KRmeDrnv++dZDxabOnVYumyCPRm9UvxCXU=; b=m2X8kPvZF4RSFbS8UFzsyPBOJTU66HxOwH1kIb/A9n+ObYZVnoJBTcHkA9AuStQ7Ri byxtetqxmQLQojcX0ltb29EZF7MsmI2fMf2kyYGXFFhOgmZl0ihJzsronK9QF96kkeEQ zwWMGnQq6Gr+fZHPp5kMZKyyzTE7UrTtQhjWqDY0uyczwj7J/eASmK/3yuo/NI4Vd33F jpXz+0SWl2Q69FtJunIeF55tWRhn/Ymk3SMRNqFkbHrOAb8nntG3LAiUcSuFmDQuVrG5 EV2vBtJJscFVb87ZTJovuXiu4Cc7NLkcwSo5lo+MYv6EYn+OG3SJlz2wukjmm0yn8c2k SVaQ== X-Gm-Message-State: AOJu0Yyt26Ob6vKBx7NsIAp37JH5bnvYmps4ZzVghwEtlUxTSqAu60I3 DkKi8B3TRHz/dFCD1YSnxbNnLGUgoyM1LWJIufL7Lg== X-Received: by 2002:a0d:f9c6:0:b0:5d7:1940:7d92 with SMTP id j189-20020a0df9c6000000b005d719407d92mr2245546ywf.105.1702256489515; Sun, 10 Dec 2023 17:01:29 -0800 (PST) MIME-Version: 1.0 References: <20231206103702.3873743-1-surenb@google.com> <20231206103702.3873743-6-surenb@google.com> In-Reply-To: From: Suren Baghdasaryan Date: Sun, 10 Dec 2023 17:01:18 -0800 Message-ID: Subject: Re: [PATCH v6 5/5] selftests/mm: add UFFDIO_MOVE ioctl test To: Mark Brown 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sun, 10 Dec 2023 17:01:40 -0800 (PST) On Sun, Dec 10, 2023 at 6:26=E2=80=AFAM Mark Brown wro= te: > > 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 an= d > > unaligned cases because they utilize different code paths in the kernel= . > > > > 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 = CROSS_COMPILE=3Daarch64-linux-gnu- CROSS_COMPILE_COMPAT=3Darm-linux-gnueabi= hf- CC=3D"ccache aarch64-linux-gnu-gcc" O=3D/tmp/kci/linux/build -C/tmp/kci= /linux -j10 kselftest-gen_tar > > (full logs for both arm64 and x86_64 at): > > https://storage.kernelci.org/next/master/next-20231208/arm64/defconfig= /gcc-10/logs/kselftest.log > https://storage.kernelci.org/next/master/next-20231208/x86_64/x86_64_d= efconfig/clang-17/logs/kselftest.log > > or tuxmake: > > make --silent --keep-going --jobs=3D16 O=3D/home/broonie/.cache/tuxmake/b= uilds/25/build INSTALL_PATH=3D/home/broonie/.cache/tuxmake/builds/25/build/= kselftest_install ARCH=3Darm64 CROSS_COMPILE=3Daarch64-linux-gnu- CROSS_COM= PILE_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/uff= d-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 o= nce for each function it appears in > uffd-common.c:645:17: error: =E2=80=98UFFDIO_MOVE=E2=80=99 undeclared (fi= rst 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; > | ^~~~~~~~~~~ Thanks for reporting! I'll try that later today. Just to clarify, are you using mm-unstable and if so, has it been rebased since Friday? There was an update to this patchset in mm-unstable which Andrew merged on Friday and the failure does look like something that would happen with the previous version.