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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 149A6C282DA for ; Fri, 1 Feb 2019 09:27:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E183220815 for ; Fri, 1 Feb 2019 09:27:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727734AbfBAJ1l (ORCPT ); Fri, 1 Feb 2019 04:27:41 -0500 Received: from mx2.suse.de ([195.135.220.15]:50386 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725765AbfBAJ1k (ORCPT ); Fri, 1 Feb 2019 04:27:40 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 26690AB7D; Fri, 1 Feb 2019 09:27:39 +0000 (UTC) Subject: Re: [PATCH 3/3] mm/mincore: provide mapped status when cached status is not allowed To: Michal Hocko Cc: Andrew Morton , Linus Torvalds , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org, Peter Zijlstra , Greg KH , Jann Horn , Jiri Kosina , Dominique Martinet , Andy Lutomirski , Dave Chinner , Kevin Easton , Matthew Wilcox , Cyril Hrubis , Tejun Heo , "Kirill A . Shutemov" , Daniel Gruss , Jiri Kosina , Josh Snyder References: <20190130124420.1834-1-vbabka@suse.cz> <20190130124420.1834-4-vbabka@suse.cz> <20190131100907.GS18811@dhcp22.suse.cz> <99ee4d3e-aeb2-0104-22be-b028938e7f88@suse.cz> <20190201091152.GG11599@dhcp22.suse.cz> From: Vlastimil Babka Openpgp: preference=signencrypt Message-ID: Date: Fri, 1 Feb 2019 10:27:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190201091152.GG11599@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/1/19 10:11 AM, Michal Hocko wrote: > On Fri 01-02-19 10:04:23, Vlastimil Babka wrote: >> The side channel exists anyway as long as process can e.g. check if >> its rss shrinked, and I doubt we are going to remove that possibility. > > Well, but rss update will not tell you that the page has been faulted in > which is the most interesting part. Sure, but the patch doesn't add back that capability neither. It allows to recognize page being reclaimed, and I argue you can infer that from rss change as well. That change is mentioned in the last paragraph in changelog, and I thought "add a hard to evaluate side channel" in your reply referred to that. It doesn't add back the "original" side channel to detect somebody else accessed a page. > You shouldn't be able to sniff on > /proc/$vicimt/smaps as an attacker.