Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp652571pxb; Tue, 2 Feb 2021 14:26:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNUP19VruvkiWCq4aebP1FLyOKuCTECFWGh7NmpNY3cW7owYCWcfS2irT/7iawi7FmmgOi X-Received: by 2002:aa7:c7c8:: with SMTP id o8mr243072eds.137.1612304768244; Tue, 02 Feb 2021 14:26:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612304768; cv=none; d=google.com; s=arc-20160816; b=lpDyMOp9X+a4b+N74ntGv+UmGZ0pAk9KM1Tuz6z7Pv2AeTf67D86THSPg/kaRTOrmo MCAZbCusIoY3LELpDM6Zv7GijacRpFU2StR8+KiAklcW3sroWSi8hnVVkUqv+HQntV/n c3g8j2vZG5iHopXSKiBTzi2TRfckWzUcSDz/P/hD+BZwCRMF+nwz6/9b6TwMyxdeAbdb ZilCtRlcc+KiRxZee80rfpF5W0NIbnU933J/62ZqtxHuzsdhk0dcEAfgy3SLQu5OVOsA n7h7yYJ7XIi+UGoOsz2A0R/yfZqopzjMPJImX1eFRpJeGbslnc6/vDgMazWFO5hmgwac F8AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZY7R/A8eLGtcqtBTwPz4dc8E6975FZbZj6rab/rk/co=; b=ym0zcKYhTGY3eTNEU+ww/E7HSrlwG8ry0LD0a3yP6EV94yJBxeECS2bB21Cd6BUT6c UTgCuUK6UOxzSBsGCTukaXYjFg5TgNdF08nXMKFAOuEt1m9b7+r8YpdiKij7BnFNgtnT zR1VHoKsV9S2YkF6a2cM9liSnelJx57urO2gvXBLjjk9g3JRrgNd/D0MNP5pPTEdC7ZK fQqrIqXhJEScXEDvgzCmj8g4nPCnCkireIL4xwOZzRZ6O6K6ien62gEeIRQ77bj6DTql pi0GluqlMsD1PvrTwsqM/rMzlCpzHbR/cQhj3Pgqti8ZNlilrT52JL4AChApKL9503hK FW7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="j08LbR+/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z23si84969edr.19.2021.02.02.14.25.41; Tue, 02 Feb 2021 14:26:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="j08LbR+/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234605AbhBBOeH (ORCPT + 99 others); Tue, 2 Feb 2021 09:34:07 -0500 Received: from mx2.suse.de ([195.135.220.15]:45390 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234568AbhBBOdF (ORCPT ); Tue, 2 Feb 2021 09:33:05 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1612276338; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZY7R/A8eLGtcqtBTwPz4dc8E6975FZbZj6rab/rk/co=; b=j08LbR+/N4gscwMe9/vv1y6TbSr6g+uI8Fvmd6aUiZN3eXaYwuKCYZD1LwoDENfRkxwGU0 412GY/gqoJEVKSXG9cJ4ADonbDGXxcU99oWydp5Rm3Y/nVMao0u9sPUOYRoKgo3QRhPEJy MTJSdg+5u8XcNBah4K1e9Bay/Y5Jdaw= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 7D39BAD78; Tue, 2 Feb 2021 14:32:18 +0000 (UTC) Date: Tue, 2 Feb 2021 15:32:16 +0100 From: Michal Hocko To: David Hildenbrand Cc: Mike Rapoport , James Bottomley , Andrew Morton , Alexander Viro , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christopher Lameter , Dan Williams , Dave Hansen , Elena Reshetova , "H. Peter Anvin" , Ingo Molnar , "Kirill A. Shutemov" , Matthew Wilcox , Mark Rutland , Mike Rapoport , Michael Kerrisk , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Rick Edgecombe , Roman Gushchin , Shakeel Butt , Shuah Khan , Thomas Gleixner , Tycho Andersen , Will Deacon , linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-nvdimm@lists.01.org, linux-riscv@lists.infradead.org, x86@kernel.org, Hagen Paul Pfeifer , Palmer Dabbelt Subject: Re: [PATCH v16 07/11] secretmem: use PMD-size pages to amortize direct map fragmentation Message-ID: References: <73738cda43236b5ac2714e228af362b67a712f5d.camel@linux.ibm.com> <6de6b9f9c2d28eecc494e7db6ffbedc262317e11.camel@linux.ibm.com> <20210202124857.GN242749@kernel.org> <6653288a-dd02-f9de-ef6a-e8d567d71d53@redhat.com> <211f0214-1868-a5be-9428-7acfc3b73993@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 02-02-21 15:26:20, David Hildenbrand wrote: > On 02.02.21 15:22, Michal Hocko wrote: > > On Tue 02-02-21 15:12:21, David Hildenbrand wrote: > > [...] > > > I think secretmem behaves much more like longterm GUP right now > > > ("unmigratable", "lifetime controlled by user space", "cannot go on > > > CMA/ZONE_MOVABLE"). I'd either want to reasonably well control/limit it or > > > make it behave more like mlocked pages. > > > > I thought I have already asked but I must have forgotten. Is there any > > actual reason why the memory is not movable? Timing attacks? > > I think the reason is simple: no direct map, no copying of memory. This is an implementation detail though and not something terribly hard to add on top later on. I was more worried there would be really fundamental reason why this is not possible. E.g. security implications. -- Michal Hocko SUSE Labs