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 F2738C4332F for ; Tue, 22 Nov 2022 15:42:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7EF016B0071; Tue, 22 Nov 2022 10:42:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 79EA56B0073; Tue, 22 Nov 2022 10:42:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 666D58E0001; Tue, 22 Nov 2022 10:42:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 56CA86B0071 for ; Tue, 22 Nov 2022 10:42:41 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 2B0E21A10A2 for ; Tue, 22 Nov 2022 15:42:41 +0000 (UTC) X-FDA: 80161495722.21.88914F0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf04.hostedemail.com (Postfix) with ESMTP id 965FF40006 for ; Tue, 22 Nov 2022 15:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669131760; 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=kGKP5wLKKCFM0nrtDEW+wzRv2+lAheSpLnr+NGy8rGI=; b=AouD7jaktvGEBKjjJOp8ai5S0uQ3yON3kf4pJQIJfjNCCq5asUOIpOhy8rUc8Exl61PCJJ WjU4xh2Xb4hXU6OM8E00I3hvYdFKPgpl2fQ4mUI2QR1b0vTa4iayi0a+p9ofESTxbTjNKJ mMRuQcBBUv8SJ0bkDNYQew65A0mRbjY= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-77-S5DfGxVFMNGfM2ccCW4sQw-1; Tue, 22 Nov 2022 10:42:38 -0500 X-MC-Unique: S5DfGxVFMNGfM2ccCW4sQw-1 Received: by mail-wm1-f72.google.com with SMTP id h4-20020a1c2104000000b003d01b66fe65so4140123wmh.2 for ; Tue, 22 Nov 2022 07:42:38 -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:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kGKP5wLKKCFM0nrtDEW+wzRv2+lAheSpLnr+NGy8rGI=; b=tkftbJioryo4JTkYECqF7sdQEV9llyFMY5O1vQyDo9AIbmMKIKhFrPM5nZu2x503c5 nZQ5fsri57JHeWHM/M44prF6hThbnMd6TxKdb3wyOMiz0jemPDblC9vQoQ7mfzkuYQuw SFrsBj+OwIgmIZAb0GRqOJeamw0t9zhAHe/ZWvcHnGDlDMfX+OUd4mGCehGUwY8uL/S3 YWWNPWV953Wn2pot6XEWHnIJfV7vySf8fOoSTnUX6bs59elmmkC1fF8njwSTMlGT8pVS IemyRaYxy8W1dSlWu9n+5QkAKeExTGXPCCHEPa3pSJa2n5//RQ5rAO/MkONmWw59k5Oo kP/g== X-Gm-Message-State: ANoB5pnUHlDUJ69xlOlGH6SnOTOcA43IsTFIj+y+UaLGEftW4PVyl8NF wOPkpEsSfbH9sU1/tVlibqvDAczY72O7SdcVQAGg9KzlVRrlxfBOfTNvxadBNGDe7b81IOmcNEL kiiUAZB5/COE= X-Received: by 2002:a5d:624c:0:b0:241:c4d2:259 with SMTP id m12-20020a5d624c000000b00241c4d20259mr6719108wrv.539.1669131757549; Tue, 22 Nov 2022 07:42:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf45vBRxf3q1HkBSXuSNjWSnmcXRROiGMNEXd4/ZE+NDMkOacUr5cvPeURAKnmM0MRul3JK71Q== X-Received: by 2002:a5d:624c:0:b0:241:c4d2:259 with SMTP id m12-20020a5d624c000000b00241c4d20259mr6719091wrv.539.1669131757204; Tue, 22 Nov 2022 07:42:37 -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 c16-20020a5d4f10000000b0023677081f3asm14128427wru.42.2022.11.22.07.42.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Nov 2022 07:42:36 -0800 (PST) Message-ID: <21917884-f372-cd89-1c66-267f610390ab@redhat.com> Date: Tue, 22 Nov 2022 16:42:35 +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 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> From: David Hildenbrand Organization: Red Hat In-Reply-To: <183e88fb-a2f3-20f9-d16e-3dcc29f109ea@collabora.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669131760; a=rsa-sha256; cv=none; b=3ypNcNsmOQyBkPw6acwMfPxdjcEaOSu5zlGGJW8rlNDFKXsPYbdqHS45kaARM63NSzMuaL oEcf6IkhSj0khshJ0RLnOqIg2Trq/rfdi7x8noOObINEV4I2npz9xqwHT6VQ6O0oBvb5od hjyQe3HYZPOOwUHxp4Bh5muRg2Fx3W8= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=AouD7jak; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf04.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669131760; 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=kGKP5wLKKCFM0nrtDEW+wzRv2+lAheSpLnr+NGy8rGI=; b=fsY0UHYGd0Agsl4kfQt9NkMvaVoMjeeHYKtWIilV21OHBF+NY9EXj6qgvEeuWv/UrYdOZz nhG0oW7Wt/HDDdIXQIr/erRsqgHdj7W1Exrw25S8AqAIxxb/uuSx2cFLNeeqAh5lajHSmf lOVlwoGVSoEgh3E8V5dwLGSik6ggrMI= X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 965FF40006 X-Rspam-User: Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=AouD7jak; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf04.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com X-Stat-Signature: 1ub7ko6c43ybpc9f83yedytckukq4mux X-HE-Tag: 1669131760-767077 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: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)? -- Thanks, David / dhildenb