From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939007AbcKOHmC (ORCPT ); Tue, 15 Nov 2016 02:42:02 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:60583 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751668AbcKOHmA (ORCPT ); Tue, 15 Nov 2016 02:42:00 -0500 Date: Tue, 15 Nov 2016 08:41:52 +0100 From: Heiko Carstens To: Kees Cook Cc: Chris Metcalf , Martin Schwidefsky , LKML Subject: Re: [PATCH v2] tile: handle __ro_after_init like parisc does References: <20161108071543.GA3528@osiris> <1479155369-18074-1-git-send-email-cmetcalf@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16111507-0008-0000-0000-000002F81AC7 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16111507-0009-0000-0000-00001ABCBD7F Message-Id: <20161115074152.GA3929@osiris> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-15_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611150139 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 14, 2016 at 01:12:05PM -0800, Kees Cook wrote: > At some point here, I want to collect all the arch maintainers and > discuss the options for correctly reflecting the three data > memory-protection needs we have: > > - always read-only > - read-only after init > - read-only except during rare updates > > (The latter one doesn't exist all yet...) > > x86, arm, and arm64 use mark_rodata_ro() after init finishes, so they > don't technically implement "always read-only". parisc, tile, powerpc, > others have "always read-only", but disable read-only-after-init since > they don't use mark_rodata_ro(). I think s390 has recently implemented > both, but I have to double-check... Yes, s390 has both: an early always read-only support, which is effective as soon as paging_init() has set up and enabled page tables. Our mark_rodata_ro() implementation only makes the ro_after_init section read-only.