From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941170AbcHJTFX (ORCPT ); Wed, 10 Aug 2016 15:05:23 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:61198 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941169AbcHJTFE (ORCPT ); Wed, 10 Aug 2016 15:05:04 -0400 Subject: Re: [PATCH] ARM: VDSO: put read only/mostly objects into proper sections To: Kees Cook References: <1470820187-1032-1-git-send-email-jszhang@marvell.com> <20160810175958.4dcfc5e3@xhacker> CC: Jisheng Zhang , Russell King , "linux-arm-kernel@lists.infradead.org" , LKML From: Nathan Lynch Message-ID: <63c1b715-5e71-b503-d1fc-e5622e53b815@mentor.com> Date: Wed, 10 Aug 2016 14:04:58 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/10/2016 01:47 PM, Kees Cook wrote: > On Wed, Aug 10, 2016 at 2:59 AM, Jisheng Zhang wrote: >> + Kees >> >> On Wed, 10 Aug 2016 17:09:47 +0800 wrote: >> >>> vdso_data_mapping is never modified, so mark it as const. >>> >>> vdso_data_page and vdso_text_mapping are initialized by vdso_init(), >>> thereafter are mostly read during vdso special mapping handling. >>> >>> The fact that they are mostly read and not written to makes them >>> candidates for __read_mostly declarations. >> >> Inspired by Kees's "arm: apply more __ro_after_init", is it better >> to mark these vars as __ro_after_init? > > Yeah, if they're not written outside of __init, please do. It would be > a nice complement to commit 11bf9b865898 ("ARM/vdso: Mark the vDSO > code read-only after init"). I agree.