Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp504899imm; Tue, 15 May 2018 05:06:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoTvovxHsYYyqrrtceJ1SLXyJlPiZNZYfp0hiVlAJcpiR3SBzF8M6EwdWp4fc2w6o2/TQFR X-Received: by 2002:a65:4003:: with SMTP id f3-v6mr11955948pgp.359.1526385974662; Tue, 15 May 2018 05:06:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526385974; cv=none; d=google.com; s=arc-20160816; b=hZBd5bLKMFGqJCpFwF251+Fk+xZ/0oC6d9kHuIA41ce6R6THoqdOp+9AdsHsZ4MuT+ /SL1cwVcR/AANy/MIUE+FC1M7xRUvunCE66YkC839PuWYdBUFiVDuzBW+H1Hi6hei6ir Rs6DiXSMvqB7BUE4QaIjgwMyqVGp2MwwRGqWJ/76rRx3mjNnoNqUOoOoNvtSD1y3sYcI tRPjaAjNh/OwpP64ZLTMcjIFvqkgGzZWmrYWBAJ2dTn/3kafmMm/gG4vhTEGgx/Wl93y UR+w4x2A+zAfxfIBDYPwgfvKIHbpvyJAwMhdZ+7pgPR3uDH2cViB0+e04LuU2ocobGSk 50lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=gQ3GZhOfnumayMmg+Z2k5Tg0FF4zUd+dtdsX7c+n6gk=; b=wydNJTLMNmf0TyguljJYUXsnP1BTUE5VegVOURwhPjbgD8g98mXz0fdZPq+VnlRB0K ERfWNJlJsQdBYpQKI9syIs4wSuHAKwfwC9O/xHxBz2UFn25g2NB6rIMDkD2FcLIwe1RO jMS19OSW7LAdcMVejzscyEAmaY943XYlKqdaayO4xmXShqwAfcbM1ECI7tyKbnonKGsC 3CzlUfEOWpKGvb+2uPXKm8t4X6SkreB5vbse4cJ5FnGSQ0VULnhlVC4Vi/iV4EG+iTt8 Sb3OGOC2ii2e2yfPxSCv73hWebHz34sFLPeZ7KcLAQg+AD0wmNqMeex1oM89XivaPJD5 jV2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SVFz+rR8; 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 y4-v6si9212013pgc.588.2018.05.15.05.05.48; Tue, 15 May 2018 05:06:14 -0700 (PDT) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SVFz+rR8; 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 S1753082AbeEOMEC (ORCPT + 99 others); Tue, 15 May 2018 08:04:02 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58720 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752906AbeEOMEA (ORCPT ); Tue, 15 May 2018 08:04:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gQ3GZhOfnumayMmg+Z2k5Tg0FF4zUd+dtdsX7c+n6gk=; b=SVFz+rR8f2oFBMAFubM/JRUe3 5E2zw2+uliNkkFFgE27qTXFo6TYimc0z2nRdtbXlF2cSI7Udtn8g2Vm3Q+dFffQf9uALayjxbK0DR aSkNc9hkmC5dCnvpg5WjOqOXS2XLisTWyieRfO6oLmnzyp1ZpxnM/xnfYsSEHlUxNpwSuz96pYq2e EK+ktS+WCehU5MwwCapQSr0B4jTiz2f9mpGNUAPegyhGo4iA5lwvpDh3LP6RLOKCu+FVA/viKDCLx ppucVZny1p5hA7OpqtRNilqiV9PpEgaxwFlzU+FVFgCwxolPFUcQt9BqTtCK8CgvYjzjw/U/t7ukk MmmkXR8tg==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIYgN-000794-TV; Tue, 15 May 2018 12:03:55 +0000 Date: Tue, 15 May 2018 05:03:55 -0700 From: Matthew Wilcox To: Boaz Harrosh Cc: Jeff Moyer , Andrew Morton , "Kirill A. Shutemov" , linux-kernel , linux-fsdevel , "linux-mm@kvack.org" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Peter Zijlstra , Dave Hansen , Rik van Riel , Jan Kara , Matthew Wilcox , Amit Golander Subject: Re: [PATCH] mm: Add new vma flag VM_LOCAL_CPU Message-ID: <20180515120355.GE31599@bombadil.infradead.org> References: <0efb5547-9250-6b6c-fe8e-cf4f44aaa5eb@netapp.com> <20180514191551.GA27939@bombadil.infradead.org> <7ec6fa37-8529-183d-d467-df3642bcbfd2@netapp.com> <20180515004137.GA5168@bombadil.infradead.org> <20180515111159.GA31599@bombadil.infradead.org> <6999e635-e804-99d0-12fc-c13ff3e9ca58@netapp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6999e635-e804-99d0-12fc-c13ff3e9ca58@netapp.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 15, 2018 at 02:41:41PM +0300, Boaz Harrosh wrote: > That would be very hard. Because that program would: > - need to be root > - need to start and pretend it is zus Server with the all mount > thread thing, register new filesystem, grab some pmem devices. > - Mount the said filesystem on said pmem. Create core-pinned ZT threads > for all CPUs, start accepting IO. > - And only then it can start leaking the pointer and do bad things. All of these things you've done for me by writing zus Server. All I have to do now is compromise zus Server. > The bad things it can do to the application, not to the Kernel. > And as a full filesystem it can do those bad things to the application > through the front door directly not needing the mismatch tlb at all. That's not true. When I have a TLB entry that points to a page of kernel ram, I can do almost anything, depending on what the kernel decides to do with that ram next. Maybe it's page cache again, in which case I can affect whatever application happens to get it allocated. Maybe it's a kmalloc page next, in which case I can affect any part of the kernel. Maybe it's a page table, then I can affect any process. > That said. It brings up a very important point that I wanted to talk about. > In this design the zuf(Kernel) and the zus(um Server) are part of the distribution. > I would like to have the zus module be signed by the distro's Kernel's key and > checked on loadtime. I know there is an effort by Redhat guys to try and sign all > /sbin/* servers and have Kernel check these. So this is not the first time people > have thought about that. You're getting dangerously close to admitting that the entire point of this exercise is so that you can link non-GPL NetApp code into the kernel in clear violation of the GPL.