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 391C1C4167B for ; Mon, 11 Dec 2023 03:04:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4F8676B0088; Sun, 10 Dec 2023 22:04:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4A8636B0089; Sun, 10 Dec 2023 22:04:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 36FFF6B008A; Sun, 10 Dec 2023 22:04:36 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 27F526B0088 for ; Sun, 10 Dec 2023 22:04:36 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id E40A414055A for ; Mon, 11 Dec 2023 03:04:35 +0000 (UTC) X-FDA: 81553044510.05.663A4D5 Received: from mail-yw1-f176.google.com (mail-yw1-f176.google.com [209.85.128.176]) by imf14.hostedemail.com (Postfix) with ESMTP id 306CA100015 for ; Mon, 11 Dec 2023 03:04:33 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="Rs/OpMfs"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf14.hostedemail.com: domain of surenb@google.com designates 209.85.128.176 as permitted sender) smtp.mailfrom=surenb@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702263874; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=bxxLMmWK1LiLOsWFgqTLtp1uTrFHrBT/LtJeHcQxLS8=; b=wdpPdiq7rAhUnCHHo52TT6cCQBqarp7KImSH786ByCYRoJV6R+ph3m7I4Qb242mSqKP0k/ ulOyqb+OLxNR+xc0s9T0kiWQalMBE4wak5xLAmY3K5LsrVMlZt2tcb/gOQ6FkEf+B6nM8D rox0F3MZFJ4wCst8VRn073v1nK37Wew= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="Rs/OpMfs"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf14.hostedemail.com: domain of surenb@google.com designates 209.85.128.176 as permitted sender) smtp.mailfrom=surenb@google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702263874; a=rsa-sha256; cv=none; b=mtf2gZ6ykBc6KDJoeXwFaEOApR5dwhEHh6MAFa4csJ1svfWQx56z4HVYB8Elcj9HEezhyO PeC5JgHNjGjs7IkJedgihjCBoRt4umH1hvmoPew7vQdt2pSwnvEBenkzp/tihZ5tfuLV7E CpGUiNY6LTf2QzVsxtYhUoeB/igTg7c= Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-5de93b677f4so21415607b3.2 for ; Sun, 10 Dec 2023 19:04:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1702263873; x=1702868673; darn=kvack.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=Rs/OpMfs344JMpMCIhZjGzM8Ps1BGn64MWbWIcU48xx84VN09ZTbQ7joKmmdbhgmYe F8hfawMmDxK0J8Vz5Y5sVqk85Tn2EwZxAPCQr2vmAAkW4wqNlp/kCGM25rJQqkY1h5eN zmoOeCey5i5yJbj20q1zmcLkK3y9e+H6HITGd5xgKVPBLWIlzD3MiYAwSBi7gxe166hh XZlPS7xr3af7SiRPgbFEyXtsULL5jxGFuJfsEVEUb/5SLAPP7KrM+z9qV9Yw2mUnqc0l JmzC3V2rqjZ8ScOCWm/5o85Jq9+65zUb9s/UG5Vzny5hEi8KTam88c8KpQ16GXfLUDq1 RVOQ== 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=iivWyYpyl6PAYz5j4K08VnF0SdxiuaePnPMyldA3kAflT9h/PeHkE2Ay53pYIcvkbg hpHEEScAwHYBZlwyCpszK8P6h2T0OtRuIMWAAIESrL8RNHQX12DwgmBGiSYKLpypDqI1 hZGbpIoS0Oit9jBfN2JNvWROyPSV+P4Gjthqbi3jZpSsA3YSW88Qdiw5na5o0azF0qbs w/py38SOLRGxCj5yJlL0hovEdD1uAN5hkzN4qtrxqD60lNSgtkyvwKY2yw0PwN/dJt3c HifB3B0/kArLw14wDU/PfBJQE7XCZnpEpQIfrSSyzIUUnRkwynqSAHcrHNmrWc+OzFPq stCQ== X-Gm-Message-State: AOJu0Yys7ZZRnybjEstjb+wDh95wcFwCrGeBcPfI+cYlQTJAE7PkduFf W134+lj58C4RKU8n8Ae9oZjr37qJh2q/BTQZQxgc5g== X-Google-Smtp-Source: AGHT+IFYd78Flda0nOK6MI1StSsFNgSiHz2GcFOxgdV2m2VwWCqzp0Iq7qepAZwjxnIR+mZxitrP0h478p/zMj61ejY= 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-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 306CA100015 X-Stat-Signature: etghhc3z8e7w8kse6fkcundt7qdt4qx9 X-Rspam-User: X-HE-Tag: 1702263873-50895 X-HE-Meta: U2FsdGVkX1+E+bBYX8im7okoRn4ALQmPwQ3bLu4qzrzhhKxrVaIJNapgx6Z2xcsui31JM8aEul9aALxI8kH4m7qQjMiWF+GuTm4MHHy8OZN19xQMR6omqHalf2NvKd2IDDD2VozGazLpfmjZYQOf+SZZMrnJHBjKxMen31qROpH8mYGgM3j6xd575gPydidX+HAPUuKtNPudb9lHBdwbqX5/vC7qtoB+n9D74/q7v+ZN5VZnMYGjAoujabVPUUL7t9J8Gwf98zi9ruIADs3K3E1ATNeu0vQs4DFrcRfBK5kWQEa7MJOgCrjbxYfoB+pQ9tPAC/xDqXwmagiz52EIy0ySn8H0E8s+tOHei/UauS5HfoGeS7E3+Pj+uX6loD93s4IMoAZZ1cozVYQaBfUBmaiEq0GCD+0vd0km3C24wm5hI1pL60/aOS0CoYVAZ2AOGQDJsB7Qhl9SzZfJjHCWHT/cNERIoTgnbSf91so+h2LVWYZ0m1KtA3dneoRepRI+D1gMnw923AH28G5xZZyue1HSWk+TF3RqhI1C7fidHDsBpRws1lQo3FEyj30uQh0PPOPVo+OTYIrhPDjVybUBQTFPkkUpBR11adPdNDM2Z4lYjI+IhkWuzXhoVy3os6dK0IA4Fxa07yfnbaht6f1+2YQrcWQK1BLFRsko6e8pQ1wSh0DTUiV8GDGKZzhrYGOupu03rKRb/tR4Xvb18mjq4bkESoTopI5URJF3/FikKkYAlc7tzDtMZK1iJQXls0rKHrGnBIKM5eCe6XnKOx/Yn3IkeDp7kX9LStht0oDOsQcud06V+21aneUXe+brSIys3Wyr0GFJio6pE+pZXeZpcc75C58N4s82/C1txq5IntklRCOhGEKyPsbH8dcafVhlAvdAJHd8asjudqD8LGKAPRBf753VnPKpib1oIk7mHN0ev+SjTuCe0YVHAFTqVVC/QJsPAsbwMJtIyOOIKHJ IlQRTgUl jWV9dTuzaZsklVdSISnS6Tdh8VDQiU0fiwukcD1eK1gwHPAS3Frl0A4L6Zqry93fTm1aSI37/tF5sHuVltb9UcvNtoteYg1Hh6LUvQ/lS9tUyF/S4bnWp/Uj7WBTpV8E0/9/fAgxOLVMTtx3V+OZ/ytRxGri1r/GjV70a8VHNsDPLPWNX4sGfY2qFnEzT120kbZ9rRbd1PyOuq2FFEHYT+sfl+rDMhnqD/gpsJYzp16NsYj+08zmiasbTZoEkalaGjJbgq/J81Ya9PG+XtJfZUxnCUWdJJo+8dQxRAHvati1d6Qd+GJi3gKFQ64x89s6oRrOrWuOuOPrcyLndz4mh9M6nYVHYmCG95PobV8WXV1GQGR5ycBhcHig2Urx35QLIowavs58wiJdI+KnIWUEYnj5aiKVik6f/fBNK 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: 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.