Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2125961imu; Sat, 5 Jan 2019 15:31:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN68CXuwpnf8qZHYXfeGiLFavR6xcp7Z6RfUo3wsNVjXVYRIV7gxdkevT2eOeCrBAsbXUNXc X-Received: by 2002:a17:902:6bc7:: with SMTP id m7mr56965637plt.106.1546731095453; Sat, 05 Jan 2019 15:31:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546731095; cv=none; d=google.com; s=arc-20160816; b=i+S7KLpBzSv4rCFKI9nUNxp/LrYESgmW7XD1706oFasK+rlv7hjbusNqunJAk3QyUS XZ2IqLc0OZcD0YWds/D20RCi51LdiuomlgUDZglJ6V1bDjKKrU9dYWPQttFA458Ur29E c6pGwIoOKxMFmvbDLC1JuYuv33iJBgc5YetkyO/hgX5dUUoafgaBO3ftlTq9ySuHeXjx CgkHrFkV9YKp29maLVdub7hENqbibfnXEB58uLqofS5KUJoPxFR5wXdc8WlXpS7FqO/N iRuGRAjoKd9irSkMtj0v3SjIDmjN7bzUXmBiW5rAOIHJF0LNqdM0qCNWljGYNKKDO535 8RSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=5UH4pfWyQs4/o8iN9usZb3uixTnpzedXbZLwZju+Xnw=; b=Ig+O5yATQNEqcAzTrgrKPE9KtNY2vM59fjtzlohlvweUiSGd04lqtRkLxHCvLXLtDF 5FQZgIijZy4MmzVcxWeiNFNxgfnwzVUkC+ZDPWOOt5WYTQyjQwt+2ef8S8juf8ZbALG4 oBmfHaNXTQ/PYj6Rd6TBaMcd6iEBCKOWZbq1AXyqkr46dK/83l6vejCo8ISSj9X0Ma0C k45XSjwDU85tEbEyJg2XyzMo3GyrZZtCP0IumD4JQEwZaGnM2iuEpyr2AoHz/n7JEbLs uLKX7tNt+VwOBxsSiWwcXB51fOkTUdahsdjgdQosoWOG7PCYm4DdUsw2YZApU4lOreg+ a+Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="Vy1s/+P5"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si1208676pgi.147.2019.01.05.15.31.20; Sat, 05 Jan 2019 15:31:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="Vy1s/+P5"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726380AbfAEX2k (ORCPT + 99 others); Sat, 5 Jan 2019 18:28:40 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42776 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726365AbfAEX2k (ORCPT ); Sat, 5 Jan 2019 18:28:40 -0500 Received: by mail-lj1-f194.google.com with SMTP id l15-v6so35243216lja.9 for ; Sat, 05 Jan 2019 15:28:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5UH4pfWyQs4/o8iN9usZb3uixTnpzedXbZLwZju+Xnw=; b=Vy1s/+P5NMNsFNOwWt1LLInuk+ntWVFTDJtSxCVKVIIYg1AEnMy9K7h69QPpXAn/rN UOhyNwMdL3pZ6oNf2UkegmPg7nFD7KFdUN8yQWn4bRLdByG5iKDgxoDp9kYFnb9VIw38 l3rvFtZebFJMWoGj3bmBaOAakkxYuwAU1ZZUc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5UH4pfWyQs4/o8iN9usZb3uixTnpzedXbZLwZju+Xnw=; b=RC0dH7IVtIQErX0jw9D+qHpZTx5fg9nG3mI0WzpjVN4uesQy2ySjAJbNER7p9jrDv6 M0krRlYibOQdyQuTa4Cchoe5ZeA5sAMPOCGhc0RJz/q4Srr/1LqNXTXlj+bP5OQcBNMw cPYJILRMatXA+WXRsMEXrSbZAXfwdqiXbaIBSB4oADRAL3kLnYlqdIohUJkgCm2pXBMI BrSaFb4Hnxq3INQwsWkM1gQUeUALoJl9nqmBCqLleWsSho4zao+JYO+krOXeBBlBhWWR cRWUicWZcjp6Xb+fuaPYJ6ZqqN+CAsZshhbBdPGwXZ/8UVZhA4bBEOMkP0XbF+e44vee +nGg== X-Gm-Message-State: AJcUukeQkSJwpJippjNdIN8azPFCmPCmaHG5Em3Eh6iNhZ5eqlaQiX1g j4t1Fl0yFqso0iJ0/J6L+8jnpgt7XYs= X-Received: by 2002:a2e:8596:: with SMTP id b22-v6mr31722184lji.122.1546730917804; Sat, 05 Jan 2019 15:28:37 -0800 (PST) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id r7-v6sm13113820ljc.10.2019.01.05.15.28.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jan 2019 15:28:36 -0800 (PST) Received: by mail-lj1-f180.google.com with SMTP id u89-v6so35338395lje.1 for ; Sat, 05 Jan 2019 15:28:35 -0800 (PST) X-Received: by 2002:a2e:9983:: with SMTP id w3-v6mr15001293lji.133.1546730915544; Sat, 05 Jan 2019 15:28:35 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Sat, 5 Jan 2019 15:28:19 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm/mincore: allow for making sys_mincore() privileged To: Jann Horn Cc: Jiri Kosina , Andrew Morton , Greg KH , Peter Zijlstra , Michal Hocko , Linux-MM , kernel list , Linux API Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 5, 2019 at 3:16 PM Linus Torvalds wrote: > > It goes back to forever, it looks like. I can't find a reason. Our man-pages talk abouit the "without doing IO" part. That may be the result of our code, though, not the reason for it. The BSD man-page has other flags, but doesn't describe what "in core" really means: MINCORE_INCORE Page is in core (resident). MINCORE_REFERENCED Page has been referenced by us. MINCORE_MODIFIED Page has been modified by us. MINCORE_REFERENCED_OTHER Page has been referenced. MINCORE_MODIFIED_OTHER Page has been modified. MINCORE_SUPER Page is part of a large (``super'') page. but the fact that it has MINCORE_MODIFIED_OTHER does obviously imply that yes, historically it really did look up the pages elsewhere, not just in the page tables. Still, maybe we can get away with just making it be about our own page tables. That would be lovely. Linus