Received: by 10.223.176.5 with SMTP id f5csp2052781wra; Wed, 31 Jan 2018 16:02:04 -0800 (PST) X-Google-Smtp-Source: AH8x224ElXUnst6PzVMvm3WQnscOt/m2Lq64HawqavA6rDnpiKyDbh9KKUg6SlQSX0xquW/S9dfz X-Received: by 10.101.97.209 with SMTP id j17mr24980572pgv.266.1517443324507; Wed, 31 Jan 2018 16:02:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517443324; cv=none; d=google.com; s=arc-20160816; b=kLl68fgBriPDHruuAs4NOrmZFV3sXAJfZNUN8lksex/Z1TW6mgkac8JpavXGsAxiYn Q60L0Y7iZa37bwgiP5AJ8FQev+OuhtW2R320tdstp0wCT6jFXRsEq58ogDNPJE9KxLb9 5XCmQEq+JUFtQ6LivcocJGJCAgzU4LCRjYuy5ce4xa2U3ciZvFhqPD+ZtNyk7Pc2VquR ObbagIqTzr2RSgj1Jpk2Kjlq2XrwsXIQdz7PQIgXi/C1FX/r9qM3puFhY5DYjzCzZr9w kCkXWcYO5C7LZxQ0YSUekgJyxVwERvHxPnlKUQ7+rOkdnToCg4VfcamfzOzcgzw5MMHA o/+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=YvchmSTK/ozfBeZGcr04v7tkmhobHWAK+EtEceV/z9Q=; b=IUFPxgvRaO8KgoKpNXTINCba1qvjeD9lFyWKHBI56TZTepnZubmstpglhxeJEVjZzC wZxGp9agVf9fxb1qj2Zl56JIZpabTBI5shFQO0AzTXu8skciCIamxzUUyWluKCtmb/rZ 9c7nFlWKkf8Gj570BRsaw8M+6dPhsE04vH0ve4VHd9lNU/Xft0v9WZS2X7F0bNKYEdjv 2N/TiN6igWl6AUsTlTMMG8OjC4oZ+bdUl0/uKdRLT3bfpwvI7CRHQhZrFbQVELq89DX9 il/XKygvRYLfk9wNIy+I3tPpmpxUkxI5U9FKnMee1zD6jfgSoZeuG8+FWcSkpY2e+2LW 2RTQ== 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 k126si576782pgc.638.2018.01.31.16.01.48; Wed, 31 Jan 2018 16:02:04 -0800 (PST) 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 S1753724AbeBAAAk (ORCPT + 99 others); Wed, 31 Jan 2018 19:00:40 -0500 Received: from resqmta-ch2-03v.sys.comcast.net ([69.252.207.35]:47770 "EHLO resqmta-ch2-03v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752209AbeBAAAj (ORCPT ); Wed, 31 Jan 2018 19:00:39 -0500 Received: from resomta-ch2-06v.sys.comcast.net ([69.252.207.102]) by resqmta-ch2-03v.sys.comcast.net with ESMTP id h2IHeXEOyiFPxh2Iwe1jbb; Thu, 01 Feb 2018 00:00:38 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-ch2-06v.sys.comcast.net with SMTP id h2IuegDPHVvrPh2IveAfOP; Thu, 01 Feb 2018 00:00:38 +0000 Received: by gentwo.org (Postfix, from userid 1001) id 9E7F211602C5; Wed, 31 Jan 2018 18:00:36 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 9CCDE11602B8; Wed, 31 Jan 2018 18:00:36 -0600 (CST) Date: Wed, 31 Jan 2018 18:00:36 -0600 (CST) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Igor Stoppa cc: jglisse@redhat.com, keescook@chromium.org, mhocko@kernel.org, labbott@redhat.com, hch@infradead.org, willy@infradead.org, linux-security-module@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com Subject: Re: [PATCH 3/6] struct page: add field for vm_struct In-Reply-To: <20180130151446.24698-4-igor.stoppa@huawei.com> Message-ID: References: <20180130151446.24698-1-igor.stoppa@huawei.com> <20180130151446.24698-4-igor.stoppa@huawei.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfPnuMWJOo2hvB5hrWtsMOwbdCP4fPB8UNMQLWxsLkKFLIUK6mjWvgcwFCSE2ZSFdkAL27b9ks/onfoyJtPouY0SEgepBOgJQ88uN/NGGjsuj5ZnMBcnK 5t0YZkiV2MR0uxTwrh6ijFwzJ9W18MfpfKY70nQ70DoEmEixbmBvK5cWl6Wlu2eFItxuhgV1rUVYPKHWHf7670ybshNMbiCYZi9164Rm4uktgf5LNvslbQ65 J6RLrzooxretcptGFvvIWzxpOy6ST/CN8djnUtyjHyrwVex5zgnohRxj5DpAa/X+W4LUfOLZyp3wJUOWnUnEtmHqe/idI/cxbt+FcoRguswxtpY+677U5CWU zYYzjEGGd5JRf2b9nvB/f04uUHDBB+k+nTCj5ZlYC1fBf7gpPSi6EU1t6jLpJlM4KpasyhwYOBi7XdO7avI4i6HPhYBOV/CUw0AZC3cG+NP3S4IaREwb+HOi dUw26feUwpTuX5Jw7aE8gsW+nnUmgUcrdVttMdELhODMOqPEFOiscR4sJlo= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 30 Jan 2018, Igor Stoppa wrote: > @@ -1769,6 +1774,9 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align, > > kmemleak_vmalloc(area, size, gfp_mask); > > + for (page_counter = 0; page_counter < area->nr_pages; page_counter++) > + area->pages[page_counter]->area = area; > + > return addr; Well this introduces significant overhead for large sized allocation. Does this not matter because the areas are small? Would it not be better to use compound page allocations here? page_head(whatever) gets you the head page where you can store all sorts of information about the chunk of memory.