From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753842AbdEJPpa (ORCPT ); Wed, 10 May 2017 11:45:30 -0400 Received: from mga06.intel.com ([134.134.136.31]:28360 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753466AbdEJPp3 (ORCPT ); Wed, 10 May 2017 11:45:29 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,320,1491289200"; d="scan'208";a="1128660833" Subject: Re: RFC v2: post-init-read-only protection for data allocated dynamically To: Igor Stoppa , Michal Hocko , Laura Abbott References: <9200d87d-33b6-2c70-0095-e974a30639fd@huawei.com> <0b55343e-4305-a9f1-2b17-51c3c734aea6@huawei.com> <20170510080542.GF31466@dhcp22.suse.cz> <885311a2-5b9f-4402-0a71-5a3be7870aa0@huawei.com> <20170510114319.GK31466@dhcp22.suse.cz> <1a8cc1f4-0b72-34ea-43ad-5ece22a8d5cf@huawei.com> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "kernel-hardening@lists.openwall.com" From: Dave Hansen Message-ID: Date: Wed, 10 May 2017 08:45:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1a8cc1f4-0b72-34ea-43ad-5ece22a8d5cf@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/10/2017 08:19 AM, Igor Stoppa wrote: > So I'd like to play a little what-if scenario: > what if I was to support exclusively virtual memory and convert to it > everything that might need sealing? Because of the issues related to fracturing large pages, you might have had to go this route eventually anyway. Changing the kernel linear map isn't nice. FWIW, you could test this scheme by just converting all the users to vmalloc() and seeing what breaks. They'd all end up rounding up all their allocations to PAGE_SIZE, but that'd be fine for testing. Could you point out 5 or 10 places in the kernel that you want to convert?