Received: by 10.223.176.5 with SMTP id f5csp3245588wra; Thu, 1 Feb 2018 13:14:17 -0800 (PST) X-Google-Smtp-Source: AH8x2247oOP9i4aM6SZgfiw7ZjqNoQzoTVv2Ha1jQgNDQLuPZFOC2tsPty6Jyg8GBb2GDurAEzME X-Received: by 10.99.37.7 with SMTP id l7mr19295744pgl.311.1517519657602; Thu, 01 Feb 2018 13:14:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517519657; cv=none; d=google.com; s=arc-20160816; b=P6dCtK9Ckna/YdX3XVuuuv1twDoa6EUh5otk28e6eaa9lYdkY3CVvT/Ce0ecvHsOok 9+b8dpTx1KicGcx1uBQ3iK3A33Svp11MkF9jatPx1LjkN0G4VDAoHUq97+OcVEr5MUYY PsRgj0BjaHi2vrUsxbcuINLZgYvhw8OilrMr6THE7mrIQvnBywT/Im+m1rSrs6zUakkJ QTxdSwPj7sHbqkbKOYoITTbqHBXQerdXXU+Di9Gl7lsGF0U8TZMbO8eaKYcpW56KXWzL op0G2LlALw1ur3mVR0PzQJsNzWZtYgd/guumrqXmvKM8omWiIuU5khxgyYnCZGhNpO+x PPww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=iqKnD2YMHWWbFdxY2WBdCg6YK65Wa5Dvtq30YWjJLrw=; b=GYzt05fUmd/YwqoNHu+J7aKYxpx/OBsGt8ZXpp0bM4PKhVlZp2Tq6oZPJQ3hpXjzlW 0qoIwIcqfoMVxKNa6c7Gek/76O4qegbfb4tWXIXVjleJ/fRTu7BDPijHQwNMViXPlh6J VSZ10fOp0xJmdEO73xJLG6MwPGOepey3EQ8ty4TJE4FVAIdyA+2yjrkWPVn3842CTzrv 9BfYEaFfxncX3VPRQdnrJnoeZ42lF+c7EtfbjlCMfPMAyk5QTwVQxPuBCse6aaou1DXo 36VMP2c6MdSxi+pcLPSe1kvkj/Ju7MJFmHBfNdtS+QBl+bhNAZ5ZGy+4fd2jBg0UoZ43 ffeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=V2v9IDvP; dkim=fail header.i=@chromium.org header.s=google header.b=eH+ojwso; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x18si279379pgv.124.2018.02.01.13.14.02; Thu, 01 Feb 2018 13:14:17 -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; dkim=fail header.i=@google.com header.s=20161025 header.b=V2v9IDvP; dkim=fail header.i=@chromium.org header.s=google header.b=eH+ojwso; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751857AbeBAVLZ (ORCPT + 99 others); Thu, 1 Feb 2018 16:11:25 -0500 Received: from mail-ua0-f194.google.com ([209.85.217.194]:41245 "EHLO mail-ua0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751296AbeBAVLR (ORCPT ); Thu, 1 Feb 2018 16:11:17 -0500 Received: by mail-ua0-f194.google.com with SMTP id f5so12796838ual.8 for ; Thu, 01 Feb 2018 13:11:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=iqKnD2YMHWWbFdxY2WBdCg6YK65Wa5Dvtq30YWjJLrw=; b=V2v9IDvPS5oKdh3buDffqmI79rdb4eo0MWn7gVMrtM3CMuODwEZZmYapOM0zkS6nJA sER56Q8NHQHtM83F/NK5QyuEzvzq8eYV82YwwhgrJg0rhg06thAmpiYH4hMgOBTjfay5 HS8cSi1ujcQPCtXPWDWpCBYigLzoM1HV7pbKLTaz5mchWwoqFliyKr6d1feZpl+Ef/nE nyoFsVyLFTQwUfAruy2SudVGui/sGGJ1ZddhcoKfQlEunfNqJUIsPaYDiLlri8g/Jg7L YAnSUrxB7k234onLXs9oxKkN2/HY9Kqa2bsY1QCKrXCCqeOn11GFJqXvCAVUuMrCewiS dSVw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=iqKnD2YMHWWbFdxY2WBdCg6YK65Wa5Dvtq30YWjJLrw=; b=eH+ojwsohJX5Ja3is+XPy1Dsp9H4kvCEEkdRLbYI7TkXeVNA8xkvxXo8RDPUYvT70g JoxrPeMYbZmxI5ZUxb/9S4oJ7FjYTNc9KQ4qd/X4JhH23Q6/JWdZaLQTsDdvncMlUsnY 6irE0HlaE74bVT2CyECLp1HeY6XGehDhEu438= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=iqKnD2YMHWWbFdxY2WBdCg6YK65Wa5Dvtq30YWjJLrw=; b=ttK8zVPck540/qsNCtFY+gwJMoVnyGJMyams4Ou80V6m0kLbQrLy/NOz32dWJlwwDE rtdWz372CyWEOjPQqnDonKbkPM24RINMpvyI9AuDltNfiNkoqGSteiALwINBHmAIKwu2 w5SNV6Mh1JVwo6Eibua+oOg8hN/774yuoMlRSpslfdty7m0TIedEXcu9rNhkf6ArbfW+ W81+Qvsc2Q7lzcfvUn64vLxFQj5AQoaIpex5kn0lRNZEUdnDxogn1+jvE3MOq78kvK1q ZEEI+HsxSvA6LWIPwGvzKcuVKZiyTK/yjF3kZj0LRrurtNJLJ8CpFWE6qdycVh1dRTUt BiGw== X-Gm-Message-State: AKwxytf3mb23ldlDsTl5iFx16SBl9Uu2QKOkCrfgQmHagcyStM+nA22a jh36EuMg2Rzlj4lx+mS2lOUiippS2D841rXRJ+MZkg== X-Received: by 10.159.35.37 with SMTP id 34mr31580853uae.130.1517519476694; Thu, 01 Feb 2018 13:11:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.67.196 with HTTP; Thu, 1 Feb 2018 13:11:15 -0800 (PST) In-Reply-To: <48fde114-d063-cfbf-e1b6-262411fcd963@huawei.com> References: <20180130151446.24698-1-igor.stoppa@huawei.com> <20180130151446.24698-4-igor.stoppa@huawei.com> <48fde114-d063-cfbf-e1b6-262411fcd963@huawei.com> From: Kees Cook Date: Fri, 2 Feb 2018 08:11:15 +1100 X-Google-Sender-Auth: MsBhN3-9z2ILzoErtCRGS5ymKnw Message-ID: Subject: Re: [PATCH 3/6] struct page: add field for vm_struct To: Igor Stoppa Cc: Christopher Lameter , jglisse@redhat.com, Michal Hocko , Laura Abbott , Christoph Hellwig , Matthew Wilcox , linux-security-module , Linux-MM , LKML , kernel-hardening@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 1, 2018 at 11:42 PM, Igor Stoppa wrote: > On 01/02/18 02:00, Christopher Lameter wrote: >> 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. > > Can you please point me to this function/macro? I don't seem to be able > to find it, at least not in 4.15 IIUC, he means PageHead(), which is also hard to grep for, since it is a constructed name, via Page##uname in include/linux/page-flags.h: __PAGEFLAG(Head, head, PF_ANY) CLEARPAGEFLAG(Head, head, PF_ANY) -Kees -- Kees Cook Pixel Security