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 255F8C43217 for ; Tue, 22 Nov 2022 15:45:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BE4286B0071; Tue, 22 Nov 2022 10:45:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B94536B0073; Tue, 22 Nov 2022 10:45:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A35DA8E0001; Tue, 22 Nov 2022 10:45:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 94C186B0071 for ; Tue, 22 Nov 2022 10:45:08 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 2A50281024 for ; Tue, 22 Nov 2022 15:45:08 +0000 (UTC) X-FDA: 80161501896.23.4615732 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf04.hostedemail.com (Postfix) with ESMTP id 601AE4000A for ; Tue, 22 Nov 2022 15:45:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669131906; h=from:from: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; bh=QvqEJEUepeioLn+TG1Otbc0M2lr1g1XdGexDlnZHpz8=; b=U2C2OOREdg/PgRlcAEIUpfdXolMbUvLe694S9DTzmYNRVIHQO0dDL47/pNZOZhFCi51uBF /EF3uNOW222PIwThhy0pMRRkEhhjJ18KuAgtDCFZKq/c0WEmsvlBWJ22d1HFVAVeLNktWk BhJdyrCUGJyoHvL2owEkK9YWJ72a2aM= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-642-QB4esf2AOtWmjJsLlwfL-w-1; Tue, 22 Nov 2022 10:45:05 -0500 X-MC-Unique: QB4esf2AOtWmjJsLlwfL-w-1 Received: by mail-wm1-f69.google.com with SMTP id i133-20020a1c3b8b000000b003cffc0a69afso8774779wma.9 for ; Tue, 22 Nov 2022 07:45:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QvqEJEUepeioLn+TG1Otbc0M2lr1g1XdGexDlnZHpz8=; b=IhYm0NMhQcbPmyON3gVhuozY3xq5zbgK86eadWCJvtvLZJ8MdA3CY4BHXYwkbb9loU 4dW4h5uaY9vuJeCK3FyKozh+Z4xQMfEukKnqNW/IKhKFO5jQNplYZxOkUa9l2GMbkzV+ yburZ8LlpDb8PAb8D/ZmTezA24c2GElOtj9X6Ga7lKhZcg1EOe6gbsKjDrRgllDUhP2b O+pziBWsveIL/40p1bLJW/1VW44FDDzvctpcthVAnDE1GgyQcjQDuOVf6In79XZrJgMv A7UPpMcZVzC3HIcrL4SqlE6GvUIMbJSLVUkW1kIqSYRHEdq9FapWgywdDjcZPtB2ui3b qOMw== X-Gm-Message-State: ANoB5pkP5oeT+kbcsfu/mClm7FNtHn4sys6TSO/k1E2hBzvfM+MKhfo9 tUEgtIUbTlEdetK6tetwt8fKdWyKELjHiY3qtaBY90RQa++uzFbpSyp7uIj1IP0VFhUBp1IBpS2 wBnw1MGg2M38= X-Received: by 2002:a5d:440e:0:b0:22e:3ca4:a5bb with SMTP id z14-20020a5d440e000000b0022e3ca4a5bbmr14048303wrq.602.1669131903953; Tue, 22 Nov 2022 07:45:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf4BYaeVQTq69DY2BC6d/0lnF4Xv3g23BCP3q8O8RxLZkXnrsI7ycP0x9h38Smgt84i4cPJqHA== X-Received: by 2002:a5d:440e:0:b0:22e:3ca4:a5bb with SMTP id z14-20020a5d440e000000b0022e3ca4a5bbmr14048283wrq.602.1669131903544; Tue, 22 Nov 2022 07:45:03 -0800 (PST) Received: from ?IPV6:2003:cb:c706:c300:b066:75e3:f1d2:b69b? (p200300cbc706c300b06675e3f1d2b69b.dip0.t-ipconnect.de. [2003:cb:c706:c300:b066:75e3:f1d2:b69b]) by smtp.gmail.com with ESMTPSA id f3-20020a5d4dc3000000b0022e57e66824sm16348267wru.99.2022.11.22.07.45.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Nov 2022 07:45:03 -0800 (PST) Message-ID: <9d5957da-0e8f-6f5d-a658-499953496978@redhat.com> Date: Tue, 22 Nov 2022 16:45:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: soft-dirty kselftest is crashing on next-20221122 From: David Hildenbrand To: Muhammad Usama Anjum , Peter Xu Cc: "open list : MEMORY MANAGEMENT" References: <12677bb0-198a-6ac2-2b01-ada23f43c45f@collabora.com> <04031393-75b4-b4f3-d727-cf9db9cb509c@redhat.com> <183e88fb-a2f3-20f9-d16e-3dcc29f109ea@collabora.com> <21917884-f372-cd89-1c66-267f610390ab@redhat.com> Organization: Red Hat In-Reply-To: <21917884-f372-cd89-1c66-267f610390ab@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=U2C2OORE; spf=pass (imf04.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669131907; a=rsa-sha256; cv=none; b=sza0dhfShyTuMWIcMPUro6DGRbBKAaB6AqzzOs1+3WzatgsUVUDo9bhU5JrixjQGvklifZ uTU6+cH/ZTpWo/geuV3f0juUJBObAG9U1wgftJrUOZZIgUAl3EU1/TLahG+nevDpUam8ke kuzyG3g+15mgpLGED3L+eeeN215uDug= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669131907; 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=QvqEJEUepeioLn+TG1Otbc0M2lr1g1XdGexDlnZHpz8=; b=tpQkI/fHjfVV6+IAtdmdb46ju3SkW9LFKg5lkjJxyvjihOLy+A24S6decV7WRlgL8vjEB3 E8xmU9Sj7Pndcub/C+QGFGIDMpAI8Q7gf2Cg6kciQ8B6vf8E5/Afyxu+lBPiVGZubw1ic7 SABrJvLk6NYUBONUjh96N7dn3vPt2Gk= X-Stat-Signature: pubegcuznkofb5ghdp6twqqe4k15mawy X-Rspamd-Server: rspam08 X-Rspam-User: Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=U2C2OORE; spf=pass (imf04.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Queue-Id: 601AE4000A X-HE-Tag: 1669131907-319550 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: On 22.11.22 16:42, David Hildenbrand wrote: > On 22.11.22 16:05, Muhammad Usama Anjum wrote: >> On 11/22/22 7:49 PM, David Hildenbrand wrote: >>> On 22.11.22 15:00, Muhammad Usama Anjum wrote: >>>> Hello, >>>> >>>> I'm getting segmentation fault when mprotect file sub-tests in soft-dirty >>>> kselftest are run on top next-20221122 and on v6.0. These sub-tests were >>>> added by Peter recently. Has someone noticed this already? >>> >>> On 6.0.7-200.fc36.x86_64, all tests pass. >>> >>> # ./soft-dirty >>> TAP version 13 >>> 1..15 >>> ok 1 Test test_simple >>> ok 2 Test test_vma_reuse dirty bit of allocated page >>> ok 3 Test test_vma_reuse dirty bit of reused address page >>> ok 4 Test test_hugepage huge page allocation >>> ok 5 Test test_hugepage huge page dirty bit >>> ok 6 Test test_mprotect-anon dirty bit of new written page >>> ok 7 Test test_mprotect-anon soft-dirty clear after clear_refs >>> ok 8 Test test_mprotect-anon soft-dirty clear after marking RO >>> ok 9 Test test_mprotect-anon soft-dirty clear after marking RW >>> ok 10 Test test_mprotect-anon soft-dirty after rewritten >>> ok 11 Test test_mprotect-file dirty bit of new written page >>> ok 12 Test test_mprotect-file soft-dirty clear after clear_refs >>> ok 13 Test test_mprotect-file soft-dirty clear after marking RO >>> ok 14 Test test_mprotect-file soft-dirty clear after marking RW >>> ok 15 Test test_mprotect-file soft-dirty after rewritten >>> # Totals: pass:15 fail:0 xfail:0 xpass:0 skip:0 error:0 >>> >>> >>> Same on a kernel close to mm-unstable on top of 6.1.0-rc4: >>> >>> >>> # ./soft-dirty >>> TAP version 13 >>> 1..15 >>> ok 1 Test test_simple >>> ok 2 Test test_vma_reuse dirty bit of allocated page >>> ok 3 Test test_vma_reuse dirty bit of reused address page >>> ok 4 Test test_hugepage huge page allocation >>> ok 5 Test test_hugepage huge page dirty bit >>> ok 6 Test test_mprotect-anon dirty bit of new written page >>> ok 7 Test test_mprotect-anon soft-dirty clear after clear_refs >>> ok 8 Test test_mprotect-anon soft-dirty clear after marking RO >>> ok 9 Test test_mprotect-anon soft-dirty clear after marking RW >>> ok 10 Test test_mprotect-anon soft-dirty after rewritten >>> ok 11 Test test_mprotect-file dirty bit of new written page >>> ok 12 Test test_mprotect-file soft-dirty clear after clear_refs >>> ok 13 Test test_mprotect-file soft-dirty clear after marking RO >>> ok 14 Test test_mprotect-file soft-dirty clear after marking RW >>> ok 15 Test test_mprotect-file soft-dirty after rewritten >>> # Totals: pass:15 fail:0 xfail:0 xpass:0 skip:0 error:0 >>> >>> >>> Different architecture? Maybe recompile the tests?I get the segmentation on "Linux (none) 6.1.0-rc6-next-20221122 #36 SMP >> PREEMPT_DYNAMIC Tue Nov 22 20:02:02 PKT 2022 x86_64": >> >> soft-dirty[237]: segfault at ffffffffffffffff ip 0000000000401dff sp >> 00007ffc4ae08ee0 error 7 in soft-dirty[401000+2000] likely on CPU 0 (core >> 0, socket 0) >> [ 348.579595] Code: bf 00 00 00 00 e8 e1 f2 ff ff 48 89 45 f0 48 83 7d f0 >> 00 75 11 48 8d 3d 5f 14 00 00 b8 00 00 00 00 e8 75 f9 ff ff 48 8b 45 f0 >> 00 01 48 8b 55 f0 8b 45 cc 48 89 d6 89 c7 e8 50 05 00 00 >> 8root@(none):/home/usama/repos/kernel/linux_mainline/tools/testing/selftests/vm# >> [ 353.015360] soft-dirty[238]: segfault at ffffffffffffffff ip >> 0000000000401dff sp 00007ffc8ec97f80 error 7 in soft-dirty[401000+2000] >> likely on CPU 0 (core 0, socket 0) >> [ 353.016456] Code: bf 00 00 00 00 e8 e1 f2 ff ff 48 89 45 f0 48 83 7d f0 >> 00 75 11 48 8d 3d 5f 14 00 00 b8 00 00 00 00 e8 75 f9 ff ff 48 8b 45 f0 >> 00 01 48 8b 55 f0 8b 45 cc 48 89 d6 89 c7 e8 50 05 00 00 84 c0 >> >> The config is attached. This is a minimal config. The kernel is run inside >> a qemu instance with help of virtme scripts. >> > > 99.9% your config (+BTRFS, -debug symbols) > > [root@vm-0 vm]# uname -a > Linux vm-0 6.1.0-rc6-next-20221122 #4 SMP PREEMPT_DYNAMIC Tue Nov 22 > 15:37:42 UTC 2022 x86_64 x86_64 x8x > [root@vm-0 vm]# ./soft-dirty > TAP version 13 > 1..15 > ok 1 Test test_simple > ok 2 Test test_vma_reuse dirty bit of allocated page > ok 3 Test test_vma_reuse dirty bit of reused address page > ok 4 Test test_hugepage huge page allocation > ok 5 Test test_hugepage huge page dirty bit > ok 6 Test test_mprotect-anon dirty bit of new written page > ok 7 Test test_mprotect-anon soft-dirty clear after clear_refs > ok 8 Test test_mprotect-anon soft-dirty clear after marking RO > ok 9 Test test_mprotect-anon soft-dirty clear after marking RW > ok 10 Test test_mprotect-anon soft-dirty after rewritten > ok 11 Test test_mprotect-file dirty bit of new written page > ok 12 Test test_mprotect-file soft-dirty clear after clear_refs > ok 13 Test test_mprotect-file soft-dirty clear after marking RO > ok 14 Test test_mprotect-file soft-dirty clear after marking RW > ok 15 Test test_mprotect-file soft-dirty after rewritten > # Totals: pass:15 fail:0 xfail:0 xpass:0 skip:0 error:0 > > > Are you maybe compiling the tests on the host or the guest does not have > sufficient vCPU features (e.g., "-cpu host" on the kernel cmdline)? s/kernel/QEMU/ -- Thanks, David / dhildenb