Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3725963rdb; Sun, 10 Dec 2023 19:04:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGGhazx//IeDy1zNlR7eQPm5XWLE4vnl/ZmjNX0l245i5RVd3zuPXn/G8BApraFMPm/HI11 X-Received: by 2002:a92:c267:0:b0:35d:70c7:4c5b with SMTP id h7-20020a92c267000000b0035d70c74c5bmr7012776ild.33.1702263888275; Sun, 10 Dec 2023 19:04:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702263888; cv=none; d=google.com; s=arc-20160816; b=fB6dTLPAIDbacM9jvxnw5KK4CFi8e804hYAiavvDM58GjWeRyN+bggHyxfHGnn5NMv fMZK8+WYYyItsgRcZ88h2sc5btwgpikyE/mTu8EhuqULoLWm7W4KiRHZDQbYgOg9i/YR a7d8rb4MVVJjSCH4vFRPQrwzZMIeefVQXczH6NdMSdcM03FHz2kbyJpa3qvNxiL+jKDJ B7r5FlFr10reAyWCXKhxvPa21/JM7PgJGu4/3WO7LV80nfSs7WPZbGvhLzuBofT9go8V roEYbpK/qXlUbbt2W3rkeZ8Qjmet00sDERVTdDfBZEa3MAyLYN7dpFi+iIEIKJkcqwjD Oc7Q== 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=bxxLMmWK1LiLOsWFgqTLtp1uTrFHrBT/LtJeHcQxLS8=; fh=OBcQ5Yl5Mh5hkm1Yc0LgdOvzTU3WmE+BoEfzH/JyNi8=; b=uAw4eeqEvbE/z0OPvC0oH1BjEti6Zt49BWAIrU5ksin9QGHPK36gMqjGKIu5NqiCZa GoyYTt90SdAfiVT9fYqxSKICf0UW4PsSauUwng1q7ysDSuU3Ua9F3BFQSo6VjmmZW8DS x28DaLk8YPNB99grJOiHgW0JthEV4wW5VGo9Gj/TE4k5zB1HhHak48Z6ofyHABr9C1xb azjq3BsdDjGDxR/GdpH8AGZzIBg2NDyZrbGN3MOHL0uH1RerD7nyJWtHv/JVN2h4lqY5 cyJXk8ZO2o84YqV/o4Xr7i9FfVjaKIbaPSm9kW907iQd8oh5RGkDzTlGBnvf3apo9bON 9yHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Sj17zv4O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id bq6-20020a056a02044600b005c660ba30afsi5508880pgb.475.2023.12.10.19.04.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 19:04:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Sj17zv4O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id A8202805E11B; Sun, 10 Dec 2023 19:04:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229589AbjLKDE2 (ORCPT + 99 others); Sun, 10 Dec 2023 22:04:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjLKDE1 (ORCPT ); Sun, 10 Dec 2023 22:04:27 -0500 Received: from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 119B5E3 for ; Sun, 10 Dec 2023 19:04:34 -0800 (PST) Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-5d6b9143782so33947377b3.0 for ; Sun, 10 Dec 2023 19:04:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1702263873; x=1702868673; 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=bxxLMmWK1LiLOsWFgqTLtp1uTrFHrBT/LtJeHcQxLS8=; b=Sj17zv4OFz3HOu/8BGtbJj370E+0f2zIEXcI0c5WaroUOIC46S/2YUpPu8nA5vqTCG u2Ca3QTDbt6Dbo3qbNuBKUyQ9I1TbAbH2jeq55i9xxbEnQks93s6PMDo0EBHdbNtOpbh 4C4wtNf15mCAa9QjYxPGbN/0VHo/5ekT/DNxsOPvphq2sjsjAUaf2ePt4N/ecCcoXpj9 VLyFogRWYRhd09ORlEIeEaHNjxRyQXsMSvDJG3M1m9zH4NF4CSOqDda3Rd5roam9Wb2E tBxUXkaHUlt7h8B+6wGinEDTwr8ehQfL9JP1KLx5af6bWsyGNTYoFz4ABOB7VyUQf/Nw Bacg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702263873; x=1702868673; 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=bxxLMmWK1LiLOsWFgqTLtp1uTrFHrBT/LtJeHcQxLS8=; b=MTuB3NzZCLJZEBryjY56qoBJty+ECNvbYd8ns4juhxPX/C2Rob9wGpLbunqOJPibK5 cX7tI6hD3ijhh0nOjjY4qzvOHhHNDCXTs/K4GmM6R5VNIMCUw9XWuBIBI5glGOqUZ4Ob DhKQygE0DSROjdIi82T6BnFcUR3CgKbYomrelsnnH3efwxpUiO1Z9DWJ45w/y7wA+PFp s3U71wkY+Orw/8jqGRUlwLgRiJX8rNMTmKtb+GbmXaouU2blMrgI9B81z/64aWhOqky+ yAgNg2dzIUo7o3cB87mfZmuavFK/uwf3M9J9wdmbaFjw9RU2oC0B3bVLVXWLnWAd6/mC O31g== X-Gm-Message-State: AOJu0Yzzwoz2q1GX3Vm5fwZ6VLuCbtRwiQbLroZv2NZ1dqV115dsIu41 DinmzoYPZQ10d20e8RrtwHeSG8piBzJ48HBM23HlIg== X-Received: by 2002:a0d:f486:0:b0:5d7:1940:7d85 with SMTP id d128-20020a0df486000000b005d719407d85mr2722534ywf.92.1702263873009; Sun, 10 Dec 2023 19:04:33 -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 19:04:19 -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 morse.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 (morse.vger.email [0.0.0.0]); Sun, 10 Dec 2023 19:04:45 -0800 (PST) On Sun, Dec 10, 2023 at 5:01=E2=80=AFPM Suren Baghdasaryan wrote: > > On Sun, Dec 10, 2023 at 6:26=E2=80=AFAM Mark Brown w= rote: > > > > 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 kern= el. > > > > > > 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=3Dgc= c CROSS_COMPILE=3Daarch64-linux-gnu- CROSS_COMPILE_COMPAT=3Darm-linux-gnuea= bihf- CC=3D"ccache aarch64-linux-gnu-gcc" O=3D/tmp/kci/linux/build -C/tmp/k= ci/linux -j10 kselftest-gen_tar > > > > (full logs for both arm64 and x86_64 at): > > > > https://storage.kernelci.org/next/master/next-20231208/arm64/defconf= ig/gcc-10/logs/kselftest.log > > https://storage.kernelci.org/next/master/next-20231208/x86_64/x86_64= _defconfig/clang-17/logs/kselftest.log > > > > or tuxmake: > > > > make --silent --keep-going --jobs=3D16 O=3D/home/broonie/.cache/tuxmake= /builds/25/build INSTALL_PATH=3D/home/broonie/.cache/tuxmake/builds/25/buil= d/kselftest_install ARCH=3Darm64 CROSS_COMPILE=3Daarch64-linux-gnu- CROSS_C= OMPILE_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_uti= l.c uffd-common.c -lrt -lpthread -lm -o /tmp/kci/linux/build/kselftest/mm/u= ffd-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= once for each function it appears in > > uffd-common.c:645:17: error: =E2=80=98UFFDIO_MOVE=E2=80=99 undeclared (= first 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. I tried reproducing the issue but so far unsuccessfully. Could you please confirm that on the latest mm-unstable branch it's still reproducible and if so, please provide detailed instructions on how you reproduce it. Thanks, Suren.