Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5721579imu; Tue, 13 Nov 2018 10:40:11 -0800 (PST) X-Google-Smtp-Source: AJdET5ez+zawqhGvCEi2AS/omJIUqBovYQpfX+Js3uL4dEeHON4ZtaCs64sYS7nIMO/BaGETNCIS X-Received: by 2002:a17:902:6b01:: with SMTP id o1-v6mr6279723plk.333.1542134411736; Tue, 13 Nov 2018 10:40:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542134411; cv=none; d=google.com; s=arc-20160816; b=Nrx1Z4kVghRG5gKKby/2M+e0dfDknOEP7Z5U+UkICAsaY29AfT2wvUEQpbGrFAyWa1 1vvKbXuVZxA0TjSkhuaPIA3CXbJVLJCRKbNdXLSulVThBzoLOLwkFJWyVr2YbA5nr/Wx egqaC0CerK1LVJ7imRtCxY6PSSoqFcQXHCR0GBBd8aee6j0H1vuP6DVzNLCxlU7egVlO NFBYhj8fPsnf2R43GtY7SuNS4vGE6wvY+Ey8CHH120gwrPk9iqIPmaQW02MONtPn8TVL 3SjdRqEYNI5D0hf0WUa9zHr09KtQfTNq1Md2ZcuiyCgikR3U7ioLsGNDOlx3gP+x399H PtIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1KV6zRUcLVYGu51TMAHDA8UbU1330M+/C8etxcOQ4+c=; b=Hl5c2y7V2bHwP1Cx40FhVyr5hRoBDQglPp3glp1m2G+iM4wFm85s1JiSZxvydKcK0+ szkssg+C5mPaSJLE8olUibDyrU06Yeeiykm9GoKxfXHsxEKUVQMevoR3fgQ3pp8PJj+B 4LRRT6AOl24zP4h47boiIgx/yLMq2nA8fcrNqCep2xyJuXPEfU/W7rtVugh7GIu4zO2j Gb3Xry+GiV4x/aW5TfczAQG56jwGSitWwKzyyt58dc/WxB0HVVSNR/5Yp8MHmNFI3tZ7 hYh7e+9lLs4H8nBnM3Xa+ao5x98JjkFMaI5vApTCkJmPqLUIV7nsUoEDe42VQmxUA+Gm tM4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="D5C/l0D/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3-v6si8542029plt.208.2018.11.13.10.39.41; Tue, 13 Nov 2018 10:40:11 -0800 (PST) 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=pass header.i=@kernel.org header.s=default header.b="D5C/l0D/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731410AbeKNEgp (ORCPT + 99 others); Tue, 13 Nov 2018 23:36:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:44458 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730849AbeKNEgo (ORCPT ); Tue, 13 Nov 2018 23:36:44 -0500 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6A7F122520 for ; Tue, 13 Nov 2018 18:37:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542134244; bh=BajjHn6cEQ7SoqjIQfb5d1ujATvkHkGfcLsnEJ+eoxc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=D5C/l0D/dDbV4R9jfpCgQglzBkFBLTtB4v+ltkbSItLc6HqQyXen12ZwNhEAPrmrc bZzqp9Q3QOKTNHcBxm6dTjuioZ7IZmLxNDF7INGnIzHFeGEmYgc1ftLrGl5u1ZeQf0 B53TVu8eMPZhXR+CJnpa1uLDWySNl1KB+rEku/XI= Received: by mail-wr1-f43.google.com with SMTP id e3-v6so14497298wrs.5 for ; Tue, 13 Nov 2018 10:37:24 -0800 (PST) X-Gm-Message-State: AGRZ1gIGo38Yt739t4y1SIeYhFD8C4r5qPSx4EbB6mJ0jiOKijrb6GV0 LOk6pV8SSDlKD60NKXX3+Ky2mgDoPJ4j//MF4ZZcyA== X-Received: by 2002:adf:9d4a:: with SMTP id o10-v6mr6212862wre.94.1542134217353; Tue, 13 Nov 2018 10:36:57 -0800 (PST) MIME-Version: 1.0 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> <6f60afc9-0fed-7f95-a11a-9a2eef33094c@gmail.com> <386C0CB1-C4B1-43E2-A754-DA8DBE4FB3CB@gmail.com> <9373ccf0-f51b-4bfa-2b16-e03ebf3c670d@huawei.com> <2e52e103-15d0-0c26-275f-894dfd07e8ec@huawei.com> In-Reply-To: <2e52e103-15d0-0c26-275f-894dfd07e8ec@huawei.com> From: Andy Lutomirski Date: Tue, 13 Nov 2018 10:36:45 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 10/17] prmem: documentation To: Igor Stoppa Cc: Nadav Amit , Igor Stoppa , Kees Cook , Peter Zijlstra , Mimi Zohar , Matthew Wilcox , Dave Chinner , James Morris , Michal Hocko , Kernel Hardening , linux-integrity , LSM List , Dave Hansen , Jonathan Corbet , Laura Abbott , Randy Dunlap , Mike Rapoport , "open list:DOCUMENTATION" , LKML , Thomas Gleixner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 13, 2018 at 10:33 AM Igor Stoppa wrote: > > I forgot one sentence :-( > > On 13/11/2018 20:31, Igor Stoppa wrote: > > On 13/11/2018 19:47, Andy Lutomirski wrote: > > > >> For general rare-writish stuff, I don't think we want IRQs running > >> with them mapped anywhere for write. For AVC and IMA, I'm less sure. > > > > Why would these be less sensitive? > > > > But I see a big difference between my initial implementation and this one. > > > > In my case, by using a shared mapping, visible to all cores, freezing > > the core that is performing the write would have exposed the writable > > mapping to a potential attack run from another core. > > > > If the mapping is private to the core performing the write, even if it > > is frozen, it's much harder to figure out what it had mapped and where, > > from another core. > > > > To access that mapping, the attack should be performed from the ISR, I > > think. > > Unless the secondary mapping is also available to other cores, through > the shared mm_struct ? > I don't think this matters much. The other cores will only be able to use that mapping when they're doing a rare write.