Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1280515ybi; Sun, 16 Jun 2019 01:23:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxA7ZMpo8Sy9uZUC6rO59LmA0PQbRyPvpU/45xmVL4GYCspLCf20Fg/fgNIQaNWrXK7GmyD X-Received: by 2002:a17:90a:b298:: with SMTP id c24mr19923805pjr.18.1560673380862; Sun, 16 Jun 2019 01:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560673380; cv=none; d=google.com; s=arc-20160816; b=m+uh7+KJarXqVB9SDjRSHv6VZLIE/+37oarna59dDHXSB7wN0qa8XKoSqM0RTGt2yy x9hIgGnaRy0siEmASzrf2hbqI/yLrC4JxmJ5Gvwg2OxYWRWqoTKXtibFxjkDl/J2egu9 PZYtJrZZgCUZwptI2ywHQwi8t+IyIzOEWsfuaEQv0Y6MO+wvVY+qcdmV9Nv22aJ5Aywz R75Wun0MVAVB5m3LPJODyh9VTC+J3S9PO4FkPPXKQY2HbNrhSTbeOgIm68zA6xOTOAvd hfkI9eqMSh6uYyn4FquI8wBHM5/UjUUQelmAoax+jkTwUxS/oqV8NJJnt7O+BVZp3aCN EsGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=1SrBWoXlclcq/cUIT3RSqtbhC9U/JqjMj1hkhPdAGfc=; b=1AVsClmNln2WFo6w+Hx3VHXRjPfgnWI5Ztsm1cyb9f7FcCucPPIKagpDTSMBj56VjH ysP6D2s9ae1A2VUMzp8Bf29Ax1iMQ1EUSJbY6tLmQWiMYSMaeJZpUm8OISQiTeY3xDJN 4MiuxV0Jh0UMiR9yXl9sNde7bNh38x1+NdXUWjRnv8dJl3uhK5Dhx1vxDE92ujtpn4zJ 2c2SxFmUitYQBB7Y8aC1uOxA1ggWXCrFHE0eFiIOmFe4EB9XDTh3BQ5QHmoijGajF0nT U0J2DwYN6zuXNauqpBFdHZEyFvTlmnhNEaPFIzBYP6x1/K2TiPoPVU1YQmOO1Cfk/1t1 QRBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=JAcmLDvt; 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 g6si6936365plm.94.2019.06.16.01.22.46; Sun, 16 Jun 2019 01:23:00 -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=pass header.i=@c-s.fr header.s=mail header.b=JAcmLDvt; 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 S1726085AbfFPIVK (ORCPT + 99 others); Sun, 16 Jun 2019 04:21:10 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:3414 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbfFPIVK (ORCPT ); Sun, 16 Jun 2019 04:21:10 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 45RS3P5Wz2z9v19q; Sun, 16 Jun 2019 10:21:05 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=JAcmLDvt; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id OfUt7G1n3Fr2; Sun, 16 Jun 2019 10:21:05 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 45RS3P4GXPz9v19n; Sun, 16 Jun 2019 10:21:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1560673265; bh=1SrBWoXlclcq/cUIT3RSqtbhC9U/JqjMj1hkhPdAGfc=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=JAcmLDvtikWnCc0qk3wwmvIx5s+X1XIF3kGGVFj05NirrMOD5XA/MYyYSbNlfoGkr 6setvLyqHSqLbKLJdMkmifsiBDAQYBwqJtD8swRfT5kOQecmmbVNmbytPdUREIeK6q e7IQHnpQGcOtYO4QD28PAut5cm1wUmo38t6SuhZE= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 72E808B7D1; Sun, 16 Jun 2019 10:21:08 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id QnD6C3CT-bfe; Sun, 16 Jun 2019 10:21:08 +0200 (CEST) Received: from [192.168.232.53] (unknown [192.168.232.53]) by messagerie.si.c-s.fr (Postfix) with ESMTP id E9A958B7CD; Sun, 16 Jun 2019 10:21:07 +0200 (CEST) Subject: Re: [PATCH] powerpc/mm/32s: only use MMU to mark initmem NX if STRICT_KERNEL_RWX To: Andreas Schwab Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, j.neuschaefer@gmx.net, Michael Ellerman , Paul Mackerras , Benjamin Herrenschmidt References: <1e412310cc18ea654fb2ce4c935654d8d1069f27.1550775950.git.christophe.leroy@c-s.fr> <8736kb9fry.fsf_-_@igel.home> <20190615152559.Horde.0lTFIZALxZ-RI75z94G3jA8@messagerie.si.c-s.fr> <87pnne9aqo.fsf@igel.home> From: christophe leroy Message-ID: <7dd94b1c-08cb-c6ac-83c1-5b67a3dad2d8@c-s.fr> Date: Sun, 16 Jun 2019 10:06:14 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: <87pnne9aqo.fsf@igel.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit X-Antivirus: Avast (VPS 190616-0, 16/06/2019), Outbound message X-Antivirus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 15/06/2019 à 16:36, Andreas Schwab a écrit : > On Jun 15 2019, Christophe Leroy wrote: > >> Andreas Schwab a écrit : >> >>> If STRICT_KERNEL_RWX is disabled, never use the MMU to mark initmen >>> nonexecutable. >> >> I dont understand, can you elaborate ? > > It breaks suspend. Ok, but we need to explain why it breaks suspend, and again your patch is wrong anyway because that area of memory is mapped with BATs so you can't use change_page_attr() > >> This area is mapped with BATs so using change_page_attr() is pointless. > > There must be a reason STRICT_KERNEL_RWX is not available with > HIBERNATE. Yes but HIBERNATE and suspend are not the same thing. I guess HIBERNATE is not available with STRICT_KERNEL_RWX because HIBERNATE have to write back saved state into read-only memory as well. Christophe --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus