Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp5857959imd; Wed, 31 Oct 2018 03:13:52 -0700 (PDT) X-Google-Smtp-Source: AJdET5d9F0JApoSaXWoAJnz4MBjcyKmmuDMTf6TdMR9t/nKabbChZLLjw7lwALfnnFUdC9ZRG0Dg X-Received: by 2002:a17:902:9004:: with SMTP id a4-v6mr2693457plp.334.1540980832523; Wed, 31 Oct 2018 03:13:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540980832; cv=none; d=google.com; s=arc-20160816; b=tOnOF8QVBDPsY6/1bYxuJYFBiHBMyx6E4WPfrn/n9R9AG/5q62xfgPbFkNyStiWgcx xC5eaRaThW5SCa++vJyxfefrSBLmwr0Zun2KqnX/S8j3u4Eh0xlDSddD+lXzPxYkNWNS j9hlSyNC4LNU5gJ3k/8PTj9lwVGUYTOuRZiPK46Amn4S+/g8523v5jhdyddowHcrv/5b OBZTMlkw4EukZ3Oebb0swf0DoWsnTvDQcU0MMcu8wnq2Wx5YKJDWTyVoIQansXhR0UHm nmbKC5K3K1GefcrvAusH3zy6Uk5tDIh9jAXTslXMkNJu+x3iINDysPRANeTOo8VMFMKA jxLA== 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; bh=gq+In4AB5xCINJI4HV1K716XlMaT2LdiwoPTCQL+wv4=; b=WTpNAqYJFGp70P2h2ITrwm7TkHrx7BgTQkdbcZ2CbBcFmdlcUwu3xPOqhuwQFcLP/A iroE7pDy99XbIBoW0BGYI8bvbwPotJG//V07x9zmU0ywDYwDJv8b1OVQO52u14XXH4Og Qeqi+S0hUOjb4fpvgyUP6g/GxTIfA+99G26XJXFxF5yhB0Et/sH+xazRdv7PyhZjqs3A R/vQYsCB03+/w9Os4eJYLuQjH5ku08Na2KQYXnTzqV3IeARuzcyD5DV1teVT520IWAd6 4nQAzdM2elHgLilaxgtVMVtBSYk8Ssje9y1XMGPocnRc/uDGcpE7NYzbRbNfdqWy04ZX //Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=XE6cCwPx; 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 n6-v6si26493463pgd.25.2018.10.31.03.13.37; Wed, 31 Oct 2018 03:13:52 -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=merlin.20170209 header.b=XE6cCwPx; 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 S1728308AbeJaTJ0 (ORCPT + 99 others); Wed, 31 Oct 2018 15:09:26 -0400 Received: from merlin.infradead.org ([205.233.59.134]:35630 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727692AbeJaTJ0 (ORCPT ); Wed, 31 Oct 2018 15:09:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=gq+In4AB5xCINJI4HV1K716XlMaT2LdiwoPTCQL+wv4=; b=XE6cCwPxeHBHyBSmrkkSTtRE4 fFj0439HWdMorMVwv7jsOrdkAXPvSjMnG/TENzReeveGoTBa+dxhZ76iqkmyThYV/MB1dmgIPVqQD MSKW5vE1nLpkVp6eBNJowgXIICZK7MbBSZUKahue+7DkfjGMRbFJvFyPf99SqB95s3MrWytVaO4jf 51lu/xx4Qn4ZxcZbAUCoYETUTMyP21EfRyu9SmJn9YN/f42JOr7Bk1P1enkB2Pkn/e4MoXiAxENhO G87ck59YrOaR4fQ2/VojZzeVciQeAaKM9RVVxbQqXVNCiE30fW+THRoTmxgxZNEZ2lKjn3j4mg7Cj Eoe6im17Q==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHnTD-0002jN-Qt; Wed, 31 Oct 2018 10:11:28 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 34E802029FA14; Wed, 31 Oct 2018 11:11:24 +0100 (CET) Date: Wed, 31 Oct 2018 11:11:24 +0100 From: Peter Zijlstra To: Igor Stoppa Cc: Andy Lutomirski , Matthew Wilcox , Tycho Andersen , Kees Cook , Mimi Zohar , Dave Chinner , James Morris , Michal Hocko , Kernel Hardening , linux-integrity , linux-security-module , Igor Stoppa , Dave Hansen , Jonathan Corbet , Laura Abbott , Randy Dunlap , Mike Rapoport , "open list:DOCUMENTATION" , LKML , Thomas Gleixner Subject: Re: [PATCH 10/17] prmem: documentation Message-ID: <20181031101124.GO744@hirez.programming.kicks-ass.net> References: <40cd77ce-f234-3213-f3cb-0c3137c5e201@gmail.com> <20181030152641.GE8177@hirez.programming.kicks-ass.net> <0A7AFB50-9ADE-4E12-B541-EC7839223B65@amacapital.net> <20181030175814.GB10491@bombadil.infradead.org> <20181030182841.GE7343@cisco> <20181030192021.GC10491@bombadil.infradead.org> <9edbdf8b-b5fb-5a82-43b4-b639f5ec8484@gmail.com> <2cfb3835-0c18-b3fb-1722-5d693ae0ecd2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2cfb3835-0c18-b3fb-1722-5d693ae0ecd2@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 31, 2018 at 12:15:46AM +0200, Igor Stoppa wrote: > On 30/10/2018 23:02, Andy Lutomirski wrote: > > But I dislike allowing regular writes in the protected region. We > > really only need four write primitives: > > > > 1. Just write one value. Call at any time (except NMI). > > > > 2. Just copy some bytes. Same as (1) but any number of bytes. > > > > 3,4: Same as 1 and 2 but must be called inside a special rare write > > region. This is purely an optimization. > > Atomic? RCU? RCU can be done, that's not really a problem. Atomics otoh are a problem. Having pointers makes them just work. Andy; I understand your reason for not wanting them, but I really don't want to duplicate everything. Is there something we can do with static analysis to make you more comfortable with the pointer thing?