Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp625329lqo; Wed, 8 May 2024 09:44:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV3r8pUW4u3UmxhFeNhTO5wGDV6H3/Nh3WbrGSxEJ/UhZJR6wf0115DscVcwGz28mm1YVUOzl6lXP6/0RBcANWxvbQjQaggAtUFJQKPdA== X-Google-Smtp-Source: AGHT+IHTkcFIyva3My/QozNJ1obnBOF7rOMLm9nMWzg1KIG7JoT+CbQB9YvYTqZhDyM02Y8Iuutl X-Received: by 2002:a05:620a:219b:b0:792:947b:f62 with SMTP id af79cd13be357-792bbe450f3mr32731585a.36.1715186642852; Wed, 08 May 2024 09:44:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715186642; cv=pass; d=google.com; s=arc-20160816; b=CUxF0XkxJqkSXxAWro+fR4VZ3f1ke7pb9+xTQFexZsW5tn42+tpPlaA6VMx+dLSWEb Zis12RC8lhv+trEWxxqKQ+SGu+KRbbc5IrPXXvT+7Sy5zJvlCrAyNsXBZPN3ueVAw89C iccwIFvcFFBg/GoTvmpF25uReaTD7FwXHGhed7EtQ61AgR3lgj2ERmCfSCB5GqOTfmvX EQg/20mbsSloUcbaXsddcrsBzw2YuG+AyV5ErBoBTHbzArwv2mGXGIi1bVT70YtfPjGK IaXpjVrKLbY1cAmtLwn7SEX/+8d4YP/8sDViS87sLRmTwlpADhguDk/YUvZXTDFl5Exi j1RA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:from:references:cc:to:subject:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=kfu+kNg5psV0QrTCz/mBUS9Pxutp2X9pNWB5lOfJe8k=; fh=MbEJ08Uwhua5pR+U+m29GkXmpt1w8zGSMy8ndjZb3rA=; b=RirPX7yAE9snLN+Ugl5lxEguT0LJCsTvrn6UZbZQG5V/bvJw4ADIv1fkuQvUdQsb7E ArmKnypqhfDsN3M3TVWoz42kCe8EkSg//R0fWDhRbguArUNt7M3GWg3AdYHD5k5xAGAf GIxzEHxNdMLoxyTsbHR5kGSxWJqIJ/gmhY1uLkhAhMeHy79F9CSdYljIYSHLejJw5YvB GCpaYq9vfszJL9hwVunIi4C5x65OHpzWY7GmIAzTKwxAkpvnfqJnpvRDEtjkLkabr1cI oa0Nxjg3vYJ4b5SGzEHyWanNISHpnVoCcvWcNPqAPFMJF4B+54IpobosI9DtaLdD+Mkf vF8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jWdHTgVF; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-173562-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173562-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q6-20020ae9e406000000b00790f56980c5si244938qkc.281.2024.05.08.09.44.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 09:44:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173562-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jWdHTgVF; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-173562-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173562-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7E1491C21B18 for ; Wed, 8 May 2024 16:44:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6337C4C91; Wed, 8 May 2024 16:43:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="jWdHTgVF" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BF6265C for ; Wed, 8 May 2024 16:43:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715186636; cv=none; b=HqE7bdZeKxXUQfGEKdWdU6ZZ0pQ3NQT5hOWAg0uu3XvpYwNA+2g9QOMnWSTGDJYI3PeYL+/cO8mh00SUuqu5E6J4AR6Go0r934c1qTCVjC6lhwSeLzwV0lSppcB576TE6TEP2WB1T+WpbH2XkZUAQU9WdwtDR+K2zWD5H9vyOoA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715186636; c=relaxed/simple; bh=v2O/JOXhGm7/O6sH0tL56gDuw0iqg3tR8svJJWlpQlA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=PtIoSryPGDPZqRKLDS+o1ltaiSsIkQDzON4mvN6Pqj+q9WdrtGHMYG/mpjd8/CNhZeugWxzoL+7p1WVdk6ccqUwmccDTXXpXIZMFJqJrR9olTVWR/mGOiJoHX1vB7gSnGSOx5g03mbNVMySXE7RIt//xuaYkOH/J8UyhTH5oRd4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=jWdHTgVF; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715186632; 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:autocrypt:autocrypt; bh=kfu+kNg5psV0QrTCz/mBUS9Pxutp2X9pNWB5lOfJe8k=; b=jWdHTgVFvD9KTogAn4tXmg5dUneed6LJa8knepN13TcyG969mThvEJikcOLZdv6+NGTXtw 6yPwOiws1D4+IhyT8iun0/6SLfddQ9WIg5MXfTqeQadVIo1NYb5PC4XKXFYFqoPt4BmUPa pNCRDGctoB5NjPojvSli5D41Ln87nls= 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_256_GCM_SHA384) id us-mta-651-RcJfeKrUNOi4xiFX333G0Q-1; Wed, 08 May 2024 12:43:51 -0400 X-MC-Unique: RcJfeKrUNOi4xiFX333G0Q-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-41a370b6acdso22914415e9.2 for ; Wed, 08 May 2024 09:43:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715186630; x=1715791430; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:from:references:cc:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=kfu+kNg5psV0QrTCz/mBUS9Pxutp2X9pNWB5lOfJe8k=; b=WU7dHSz1BAd5N287Cl3UdO0lZAAFOaeIEWaTKx03iqzdeI/3TfHPyF9Yu1KKehESyQ B0vpIduOOPlTDBPopCGpTMyp4Z0Z0fT0CIV9q0rG2xzjnx/YZ8aRav+IEqBjKJEPrFnE JQN/NiMGkVDGHDNYBYWyWOB4Oase71zQny5KNIGTdgOiadcKdn0LE1ugRFVhCxtmKyZv ZBQpIX2vNRaB2Ms/aV8ao9PTKehPXraKKYFDmnAVWz6a7H+6zIYLwuAjztU2SKV05jIy lNOZxi+Q864lxPhsiNU0kPnmhF1Ytc0H0f7UaJduCKGEl52Xfwtuzy6WJWUUisEiuTeN V9IA== X-Forwarded-Encrypted: i=1; AJvYcCVbHzMe5W84Zs7sp9G4pm0gmRBg9N5YdgOLx+Sc9r7TYP2/qTxO73tauY1BjzcZRHBcEGjwWEfb+D9R9GPkw7seMNjeqb4qs3j42Jue X-Gm-Message-State: AOJu0YyHtPoxI3CjlTF0PCcFAPjOXZI6ognlvf18yR0dTldXmRhi7Ipa VZIFGJwPRJZXcPYyeZ/2RVA1boz7ZadVBjgVNF51cpIdtxe/0L/1bHkQ9WHjVpj2QAJLHFzwUF4 MFY86f69wOxzYvzSNGAILLTgSiLZMQzug8TOKcWk5S4MzFLv3G1J5AP+J1t/BEQ== X-Received: by 2002:a05:600c:3507:b0:41a:f9db:88ac with SMTP id 5b1f17b1804b1-41f71cc4e9cmr25139245e9.14.1715186630451; Wed, 08 May 2024 09:43:50 -0700 (PDT) X-Received: by 2002:a05:600c:3507:b0:41a:f9db:88ac with SMTP id 5b1f17b1804b1-41f71cc4e9cmr25139055e9.14.1715186629991; Wed, 08 May 2024 09:43:49 -0700 (PDT) Received: from [192.168.3.108] (p5b0c6bc3.dip0.t-ipconnect.de. [91.12.107.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41f882085dbsm29015445e9.41.2024.05.08.09.43.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 May 2024 09:43:49 -0700 (PDT) Message-ID: <417e4dc4-ea48-4d68-a441-f782f98a08fe@redhat.com> Date: Wed, 8 May 2024 18:43:48 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] Fix userfaultfd_api to return EINVAL as expected To: Audra Mitchell Cc: viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, shuah@kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, raquini@redhat.com, Peter Xu References: <20240507195510.283744-1-audra@redhat.com> <939a16f2-7b66-45a6-a043-4821bd3c71dc@redhat.com> From: David Hildenbrand Content-Language: en-US Autocrypt: addr=david@redhat.com; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQAr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3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6 3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8 kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt WNyWQQ== Organization: Red Hat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 08.05.24 14:58, Audra Mitchell wrote: > On Wed, May 08, 2024 at 09:39:10AM +0200, David Hildenbrand wrote: >> On 07.05.24 21:55, Audra Mitchell wrote: >>> Currently if we request a feature that is not set in the Kernel >>> config we fail silently and return the available features. However, the >>> documentation indicates we should return an EINVAL. >> >> I assume you are referencing >> >> "EINVAL The API version requested in the api field is not supported by this >> kernel, or the features field passed to the kernel includes feature bits >> that are not supported by the current kernel version." >> >> and >> >> "To enable userfaultfd features the application should set a bit >> corresponding to each feature it wants to enable in the features field. If >> the kernel supports all the requested features it will enable them. >> Otherwise it will zero out the returned uffdio_api structure and return >> EINVAL. >> " >> >> in which case I agree. > > Yep! I'm referencing the man page. Might be worth just quoting the man page :) >>> We need to fix this issue since we can end up with a Kernel warning >>> should a program request the feature UFFD_FEATURE_WP_UNPOPULATED on >>> a kernel with the config not set with this feature. >> >> Can you mention which exact one? Is it a WARN* or a pr_warn() ? > > Here is the kernel warning I get: > Thanks, it makes sense to add the first couple of lines of below to the patch description. > [ 200.803094] unrecognized swap entry 0x7c00000000000001 > [ 200.808270] ------------[ cut here ]------------ > [ 200.812896] WARNING: CPU: 91 PID: 13634 at mm/memory.c:1660 zap_pte_range+0x43d/0x660 > [ 200.820738] Modules linked in: qrtr bridge stp llc rfkill sunrpc amd_atl intel_rapl_msr intel_rapl_common amd64_edac edac_mce_amd kvm_amd kvm ipmi_ssif acpi_ipmi i2c_piix4 ipmi_si wmi_bmof dcdbas dell_smbios dell_wmi_descriptor ptdma ipmi_devintf rapl ipmi_msghandler acpi_power_meter pcspkr k10temp xfs libcrc32c sd_mod t10_pi mgag200 sg drm_kms_helper crct10dif_pclmul i2c_algo_bit ahci crc32_pclmul drm_shmem_helper libahci crc32c_intel drm i40e libata ghash_clmulni_intel tg3 ccp megaraid_sas sp5100_tco wmi dm_mirror dm_region_hash dm_log dm_mod fuse > [ 200.869387] CPU: 91 PID: 13634 Comm: userfaultfd Kdump: loaded Not tainted 6.9.0-rc5+ #8 > [ 200.877477] Hardware name: Dell Inc. PowerEdge R6525/0N7YGH, BIOS 2.7.3 03/30/2022 > [ 200.885052] RIP: 0010:zap_pte_range+0x43d/0x660 > [ 200.889595] Code: 83 fa 02 0f 86 44 01 00 00 83 f9 17 0f 84 e1 00 00 00 83 f9 1f 0f 84 d0 00 00 00 48 89 c6 48 c7 c7 00 e4 dd bb e8 73 a2 de ff <0f> 0b e9 44 fd ff ff 45 0f b6 44 24 20 41 f6 c0 f4 75 27 4c 89 ee > [ 200.908348] RSP: 0018:ffffa18d2e6c37c8 EFLAGS: 00010246 > [ 200.913584] RAX: 000000000000002a RBX: 00007f26d3600000 RCX: 0000000000000000 > [ 200.920730] RDX: 0000000000000000 RSI: ffff93503f9a0bc0 RDI: ffff93503f9a0bc0 > [ 200.927867] RBP: 00007f26d35cc000 R08: 0000000000000000 R09: ffffa18d2e6c3688 > [ 200.935009] R10: ffffa18d2e6c3680 R11: ffffffffbc9de448 R12: ffffa18d2e6c39e8 > [ 200.942149] R13: ffff92d1ebc15b50 R14: ffff93114e0cde60 R15: ffffa18d2e6c3928 > [ 200.949291] FS: 0000000000000000(0000) GS:ffff93503f980000(0000) knlGS:0000000000000000 > [ 200.957384] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 200.963140] CR2: 00007f26b1600658 CR3: 00000040905ba000 CR4: 0000000000350ef0 > [ 200.970283] Call Trace: > [ 200.972745] > [ 200.974862] ? __warn+0x7f/0x130 > [ 200.978108] ? zap_pte_range+0x43d/0x660 > [ 200.982044] ? report_bug+0x18a/0x1a0 > [ 200.985720] ? handle_bug+0x3c/0x70 > [ 200.989219] ? exc_invalid_op+0x14/0x70 > [ 200.993068] ? asm_exc_invalid_op+0x16/0x20 > [ 200.997265] ? zap_pte_range+0x43d/0x660 > [ 201.001199] ? zap_pte_range+0x43d/0x660 > [ 201.005134] zap_pmd_range.isra.0+0xf9/0x230 > [ 201.009416] unmap_page_range+0x2d4/0x4a0 > [ 201.013436] unmap_vmas+0xa8/0x180 > [ 201.016854] exit_mmap+0xea/0x3b0 > [ 201.020191] __mmput+0x43/0x120 > [ 201.023342] exit_mm+0xb1/0x110 > [ 201.026496] do_exit+0x270/0x4f0 > [ 201.029739] do_group_exit+0x2c/0x80 > [ 201.033326] get_signal+0x886/0x8b0 > [ 201.036828] ? srso_return_thunk+0x5/0x5f > [ 201.040848] arch_do_signal_or_restart+0x25/0x100 > [ 201.045563] ? srso_return_thunk+0x5/0x5f > [ 201.049583] ? vma_set_page_prot+0x5e/0xc0 > [ 201.053692] ? srso_return_thunk+0x5/0x5f > [ 201.057713] ? syscall_exit_work+0xff/0x130 > [ 201.061908] syscall_exit_to_user_mode+0x1b3/0x200 > [ 201.066712] do_syscall_64+0x87/0x160 > [ 201.070387] ? srso_return_thunk+0x5/0x5f > [ 201.074405] ? do_mmap+0x416/0x5f0 > [ 201.077821] ? srso_return_thunk+0x5/0x5f > [ 201.081840] ? rseq_get_rseq_cs+0x1d/0x240 > [ 201.085950] ? srso_return_thunk+0x5/0x5f > [ 201.089970] ? rseq_ip_fixup+0x6d/0x1d0 > [ 201.093823] ? vm_mmap_pgoff+0x117/0x1a0 > [ 201.097755] ? srso_return_thunk+0x5/0x5f > [ 201.101776] ? srso_return_thunk+0x5/0x5f > [ 201.105795] ? syscall_exit_to_user_mode+0x78/0x200 > [ 201.110685] ? srso_return_thunk+0x5/0x5f > [ 201.114706] ? do_syscall_64+0x87/0x160 > [ 201.118557] ? srso_return_thunk+0x5/0x5f > [ 201.122575] ? __count_memcg_events+0x49/0xb0 > [ 201.126944] ? srso_return_thunk+0x5/0x5f > [ 201.130967] ? srso_return_thunk+0x5/0x5f > [ 201.134986] ? syscall_exit_work+0xff/0x130 > [ 201.139184] ? srso_return_thunk+0x5/0x5f > [ 201.143205] ? syscall_exit_to_user_mode+0x78/0x200 > [ 201.148093] ? srso_return_thunk+0x5/0x5f > [ 201.152114] ? do_syscall_64+0x87/0x160 > [ 201.155960] ? srso_return_thunk+0x5/0x5f > [ 201.159984] ? sched_clock_cpu+0xb/0x190 > [ 201.163916] ? srso_return_thunk+0x5/0x5f > [ 201.167939] ? irqtime_account_irq+0x40/0xc0 > [ 201.172220] ? srso_return_thunk+0x5/0x5f > [ 201.176243] ? srso_return_thunk+0x5/0x5f > [ 201.180263] entry_SYSCALL_64_after_hwframe+0x76/0x7e > [ 201.185326] RIP: 0033:0x7f26dfd0735b > [ 201.188939] Code: Unable to access opcode bytes at 0x7f26dfd07331. > [ 201.195128] RSP: 002b:00007fffce176868 EFLAGS: 00000206 ORIG_RAX: 000000000000000a > [ 201.202700] RAX: fffffffffffffffc RBX: 00007f26dfe60000 RCX: 00007f26dfd0735b > [ 201.209841] RDX: 0000000000000003 RSI: 0000000001000000 RDI: 00007f26af401000 > [ 201.216983] RBP: 00007f26b0400640 R08: 00000000ffffffff R09: 0000000000000000 > [ 201.224127] R10: ffffffffffffffc0 R11: 0000000000000206 R12: 0000000000000000 > [ 201.231267] R13: 000000000040d320 R14: 0000000000000000 R15: 0000000000000000 > [ 201.238413] > [ 201.240610] ---[ end trace 0000000000000000 ]--- > [ 201.245250] unrecognized swap entry 0x7c00000000000001 > > > >> >> Likely we want "Fixes:" here. > > This could be seen as a continuation of the problem > 2ff559f31a5d Revert "userfaultfd: don't fail on unrecognized features" > was trying to solve. However, this patch only checks to make sure we didnt > ask for a feature outside the possible range of features. We are still missing > a check to confirm the requested features are also configured on. So I guess > the "Fixes" tag would be for this patch? > 914eedcb9ba0 userfaultfd: don't fail on unrecognized features > > Happy to get your input here! I agree with Peters summary :) -- Cheers, David / dhildenb