From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753153AbdHGL1t (ORCPT ); Mon, 7 Aug 2017 07:27:49 -0400 Received: from lhrrgout.huawei.com ([194.213.3.17]:32755 "EHLO lhrrgout.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752905AbdHGL1r (ORCPT ); Mon, 7 Aug 2017 07:27:47 -0400 Subject: Re: [RFC] Tagging of vmalloc pages for supporting the pmalloc allocator To: Michal Hocko CC: Jerome Glisse , Linux-MM , LKML , , "kernel-hardening@lists.openwall.com" , Kees Cook References: <07063abd-2f5d-20d9-a182-8ae9ead26c3c@huawei.com> <20170802170848.GA3240@redhat.com> <8e82639c-40db-02ce-096a-d114b0436d3c@huawei.com> <20170803114844.GO12521@dhcp22.suse.cz> <20170803135549.GW12521@dhcp22.suse.cz> <20170803144746.GA9501@redhat.com> <20170803151550.GX12521@dhcp22.suse.cz> <20170804081240.GF26029@dhcp22.suse.cz> From: Igor Stoppa Message-ID: <7733852a-67c9-17a3-4031-cb08520b9ad2@huawei.com> Date: Mon, 7 Aug 2017 14:26:21 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170804081240.GF26029@dhcp22.suse.cz> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.122.225.51] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.59884E9D.00BC,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 5acb2892ebed374a65cb7f75df5c6bb5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/08/17 11:12, Michal Hocko wrote: > On Fri 04-08-17 11:02:46, Igor Stoppa wrote: [...] >> struct page { >> /* First double word block */ >> unsigned long flags; /* Atomic flags, some possibly >> * updated asynchronously */ >> union { >> struct address_space *mapping; /* If low bit clear, points to >> * inode address_space, or NULL. >> * If page mapped as anonymous >> * memory, low bit is set, and >> * it points to anon_vma object: >> * see PAGE_MAPPING_ANON below. >> */ >> ... >> } >> >> mapping seems to be used exclusively in 2 ways, based on the value of >> its lower bit. > > Not really. The above applies to LRU pages. Please note that Slab pages > use s_mem and huge pages use compound_mapcount. If vmalloc pages are > using none of those already you can add a new field there. Yes, both from reading the code and some experimentation, it seems that vmalloc is not using either field. I'll add a vm_area field as you advised. Is this something I could send as standalone patch? -- thank you, igor