Subject: Re: [PATCH 10/17] prmem: documentation References: <20181023213504.28905-1-igor.stoppa@huawei.com> <20181023213504.28905-11-igor.stoppa@huawei.com> <20181026092609.GB3159@worktop.c.hoisthospitality.com> <20181028183126.GB744@hirez.programming.kicks-ass.net> <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> From: Dave Hansen Message-ID: Date: Tue, 30 Oct 2018 11:03:51 -0700 MIME-Version: 1.0 In-Reply-To: <20181030175814.GB10491@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit To: Matthew Wilcox , Andy Lutomirski Cc: Kees Cook , Peter Zijlstra , Igor Stoppa , 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 List-ID: On 10/30/18 10:58 AM, Matthew Wilcox wrote: > Does this satisfy Igor's requirements? We wouldn't be able to > copy_to/from_user() while rare_mm was active. I think that's a feature > though! It certainly satisfies my interests (kernel code be able to > mark things as dynamically-allocated-and-read-only-after-initialisation) It has to be more than copy_to/from_user(), though, I think. rare_modify(q) either has to preempt_disable(), or we need to teach the context-switching code when and how to switch in/out of the rare_mm. preempt_disable() would also keep us from sleeping.