Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8139552rwb; Tue, 6 Dec 2022 14:43:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf4XwGgQYeFEW9nqxafA7bkF37+XW5wY1uywdGmIXdjTCKR4DOmxqbK2ThgwqmU3hsiueSt0 X-Received: by 2002:a17:906:b0b:b0:7c1:36:8ffe with SMTP id u11-20020a1709060b0b00b007c100368ffemr6995457ejg.725.1670366580846; Tue, 06 Dec 2022 14:43:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670366580; cv=none; d=google.com; s=arc-20160816; b=deTHgPtSefB7c8ER3Ilz0TKYgZ6owh52cqgpJncozYUjEdCrvMn64NOE2TgKCXC0m3 1gWPBoxNEXlffna2VVK8AD7e7eNQKFwcuJLOoQMDLDvCfWkpeGE+5sb8+uVOl2D2WX6E X6P2FjtHHo5kKLjn9GwOmMEdcAehun7nKMQ2nZcI5vnNQRFlrFuSH8rQ7GJxGSv1rv8Q X761gCFyg3WdQy2uetBWE/iKMEqIIVerufjDoJlbbyeKOcBwVJrFpPJ9mnNqPTKawKnd wTi4hQDr3LouEPKK3ONJ6zXmbrP+fZDMpNMW+HV5yVBRq+SQ7Bm5/TTAzl/pJYxRl5TN Eieg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=8eObdsh0f1WoSow7cySCAshfEk8V655iOUfOT8wA5uY=; b=VF6swN4vyxVbXo+N/Qzh2PdJlmnOekdhjtqkvz/65V/Mnfn4RWk8rHR1GMCtRmKQYv Zno/e9C8Cf9YORmIMCU72xFeWtDwZGOdHge04yohh5akEIvLtcvm2Uva6j4TSrL21yGi X/baDLUdWc+fuDUnNK9jfqpATT9iqDTGPICRjyyoBWhdpIZLAlwdiR6HzvAks9qTPDBt hPYkCgwvYOyOhqmYhECD1sBtDmkZYfrVGbQndIc4YbXHcTM7R6I33Nrus+nnhDOFnhWi q9rMzi+X6u9UyL6tw4aC+C3g9xtOlHijvNVEd/B7lukW9wR5V1OO7Lano2L3Jd7+beCl Dn+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=XarreB7m; dkim=neutral (no key) header.i=@suse.cz header.b=862gYlhO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa35-20020a1709076d2300b0078d4c9d77adsi15558022ejc.94.2022.12.06.14.42.42; Tue, 06 Dec 2022 14:43:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=XarreB7m; dkim=neutral (no key) header.i=@suse.cz header.b=862gYlhO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229699AbiLFVss (ORCPT + 77 others); Tue, 6 Dec 2022 16:48:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbiLFVsq (ORCPT ); Tue, 6 Dec 2022 16:48:46 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97F093E0A5 for ; Tue, 6 Dec 2022 13:48:45 -0800 (PST) Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 47B7021C31; Tue, 6 Dec 2022 21:48:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1670363324; h=from:from:reply-to: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=8eObdsh0f1WoSow7cySCAshfEk8V655iOUfOT8wA5uY=; b=XarreB7m60SF4+AcLNKNd2OUP5Rxq4StRg05ASDpWWcaMCdHSWg+2KAGp/bOcpp1buKqm2 qbuo9W28yEkDZF7fG5zxFlSnZy41WYMQBI71qaJ3h/eFjcf/L9lCQes4uWhmqbhADmGPvK KxTmFOUv8uyTem0I8x0cni6INneOTuI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1670363324; h=from:from:reply-to: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=8eObdsh0f1WoSow7cySCAshfEk8V655iOUfOT8wA5uY=; b=862gYlhO+Lrnm8WSWXalMv6GF93TCP8bc6LZfvvVoVJBr/bxQYjgvv15eVqYaDeBDfj0Yo eSfPgMPGRFYbD8Aw== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 28D5F13326; Tue, 6 Dec 2022 21:48:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id KnMzCby4j2OTdAAAGKfGzw (envelope-from ); Tue, 06 Dec 2022 21:48:44 +0000 Message-ID: <8a8f5758-365e-d716-de06-3963d7b7ec43@suse.cz> Date: Tue, 6 Dec 2022 22:48:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH] mm: do not show ?? for VM_LOCKONFAULT pages To: "Jason A. Donenfeld" , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Eric B Munson , "Kirill A . Shutemov" , Andrew Morton References: <20221205173007.580210-1-Jason@zx2c4.com> Content-Language: en-US From: Vlastimil Babka In-Reply-To: <20221205173007.580210-1-Jason@zx2c4.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/5/22 18:30, Jason A. Donenfeld wrote: > When VM_LOCKONFAULT was added, /proc/PID/smaps wasn't hooked up to it, > so looking at /proc/PID/smaps, it shows '??' instead of something > intelligable. This can be reached by userspace by simply calling > `mlock2(..., MLOCK_ONFAULT);`. > > Fix this by adding "lf" to denote VM_LOCKONFAULT. > > Cc: Eric B Munson > Cc: Kirill A. Shutemov > Cc: Vlastimil Babka > Cc: Andrew Morton > Fixes: de60f5f10c58 ("mm: introduce VM_LOCKONFAULT") > Signed-off-by: Jason A. Donenfeld Acked-by: Vlastimil Babka > --- > fs/proc/task_mmu.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c > index 8a74cdcc9af0..60851e96530b 100644 > --- a/fs/proc/task_mmu.c > +++ b/fs/proc/task_mmu.c > @@ -667,6 +667,7 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma) > [ilog2(VM_RAND_READ)] = "rr", > [ilog2(VM_DONTCOPY)] = "dc", > [ilog2(VM_DONTEXPAND)] = "de", > + [ilog2(VM_LOCKONFAULT)] = "lf", > [ilog2(VM_ACCOUNT)] = "ac", > [ilog2(VM_NORESERVE)] = "nr", > [ilog2(VM_HUGETLB)] = "ht",