Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1296414ybi; Sun, 16 Jun 2019 01:47:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxAI8PvegllI1yJah9+0g+tvkJ2WXlMdKKOpxi8K9hNZAyktGrH9YjRXZNmEzkFdpDOAuX X-Received: by 2002:a17:902:42e2:: with SMTP id h89mr20733859pld.77.1560674873307; Sun, 16 Jun 2019 01:47:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560674873; cv=none; d=google.com; s=arc-20160816; b=GLZpS3N62M0ej4KR2y7i3jc1As6RSjslrwOPRCSQLZgGt5dAa+yr6sInHBFdDSTKt9 zIRY2SXx9BSAbRVWUDQIq56LDUK+aRjctd/qktaX2xLIogjM6tPz2NNygSp13QLrUgrG Tb9FGMkp+MhUu3kJUBTbfjaNGYqBjaTDoAP/35w2ecuIv6vYt2vZ6fJ8yozKuNdOl+Y0 BoZVPcKNdDgn5LsE0WH55211aimoNEAe6OdVgPVXfCYwzN7gpfKC+j73JwuA93wbjyTS Xpis/v67T2HqP1iaRXwpByfFLXeEIX1x9uVGJY4HR1qm+FMr49oWRBdcPZYg1JESXcSv xonA== 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:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from; bh=uV9Hmv8AKEdEnOoAOR9mRVIpyEPDWV6P7OEJ6BA1Hn8=; b=WBHrWy/G66XrAStkuyXTF3O5ggxSmJp0AJZVnWRtaNWbP/cysYIqZQ1M0AwK7CkhLS qQ03RNrUVPh7VWpHIp/7lc3zhTJFzVwCgOoffZk9wpR8n40LsmbmLjyh+NEUV5NX1ufg GcSMqzvYw/eeaRlzpeHy886XJ9YYFYGdsR7nhd1sJBHS1eUWS/rjpRYoel9KeVSO4Uoz oWguNLKFJkOFlwMEQL9lgCoW8s7mvGEu5fGD6zPTJ5EklowzffTDJAq649vEVtpSPBtO rn0ea2rRQc5feDvE6opcIsS8E22r2A6Zfc890bo0rmVfeTzocFaqqrcn1DB2dPbsjANo 3UsA== ARC-Authentication-Results: i=1; mx.google.com; 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 29si7698766pgy.132.2019.06.16.01.47.38; Sun, 16 Jun 2019 01:47:53 -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; 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 S1726683AbfFPIpx (ORCPT + 99 others); Sun, 16 Jun 2019 04:45:53 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:49023 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbfFPIpx (ORCPT ); Sun, 16 Jun 2019 04:45:53 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 45RSby1NXQz1rBn0; Sun, 16 Jun 2019 10:45:50 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 45RSby0dMVz1qql1; Sun, 16 Jun 2019 10:45:50 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id fnOwM6JoyojP; Sun, 16 Jun 2019 10:45:49 +0200 (CEST) X-Auth-Info: fJwPQASbNuDgl/aehkgpQTFNB7ny6jTRKY6YjGIMgoKnJD+r41neojvRQ/CdEYcp Received: from igel.home (ppp-46-244-189-62.dynamic.mnet-online.de [46.244.189.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 16 Jun 2019 10:45:48 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id CF0352C117A; Sun, 16 Jun 2019 10:45:46 +0200 (CEST) From: Andreas Schwab To: christophe leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , j.neuschaefer@gmx.net, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v5 13/16] powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX References: <1e412310cc18ea654fb2ce4c935654d8d1069f27.1550775950.git.christophe.leroy@c-s.fr> <877e9n9gng.fsf@igel.home> <1c271e47-6917-2f29-97b6-f3160ddf5117@c-s.fr> X-Yow: While my BRAINPAN is being refused service in BURGER KING, Jesuit priests are DATING CAREER DIPLOMATS!! Date: Sun, 16 Jun 2019 10:45:46 +0200 In-Reply-To: <1c271e47-6917-2f29-97b6-f3160ddf5117@c-s.fr> (christophe leroy's message of "Sun, 16 Jun 2019 10:01:10 +0200") Message-ID: <87lfy1apfp.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Jun 16 2019, christophe leroy wrote: > Le 15/06/2019 à 14:28, Andreas Schwab a écrit : >> On Feb 21 2019, Christophe Leroy wrote: >> >>> diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c >>> index a000768a5cc9..6e56a6240bfa 100644 >>> --- a/arch/powerpc/mm/pgtable_32.c >>> +++ b/arch/powerpc/mm/pgtable_32.c >>> @@ -353,7 +353,10 @@ void mark_initmem_nx(void) >>> unsigned long numpages = PFN_UP((unsigned long)_einittext) - >>> PFN_DOWN((unsigned long)_sinittext); >>> - change_page_attr(page, numpages, PAGE_KERNEL); >>> + if (v_block_mapped((unsigned long)_stext) + 1) >> >> That is always true. >> > > Did you boot with 'nobats' kernel parameter ? > > If not, that's normal to be true, it means that memory is mapped with BATs. bool + 1 is always true. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."