Received: by 10.223.185.116 with SMTP id b49csp1139941wrg; Wed, 14 Feb 2018 12:14:24 -0800 (PST) X-Google-Smtp-Source: AH8x227C2Wt63J/qE6i/K2GXvNtv8tEG+0HPgHfDlRJOidcpaXcQX7FxzNr2In5EXypNO6tzcBEe X-Received: by 10.101.90.8 with SMTP id y8mr189575pgs.34.1518639264150; Wed, 14 Feb 2018 12:14:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518639264; cv=none; d=google.com; s=arc-20160816; b=RaeGh07dVfMJWiedPnQZG6GWgf3WNCpW0yicJATH8ffhWZE4XQx3cbTl9bY/zrWVtb 94TSawXamqFUh19it+FS2TPyKi6YoZAM82ERIP4b7DvkLlEybMkrnZMZl7N5OcEO6THR yg1PbiVQPL1aoRfypWkWWOySGtZajf16XFGyoT3LGV7CIUdv8CyscM9KWMhhDwmIaXMv Dom+E0vLWDhvsRrGzELqXfrmvrKRIbLA2FX1W0nE3aNLxexxcVxQL9Pg6A+KhfsbmqoS JMmCD4wJPKp0I8Jr1DOMCHsah6gHtE/cNr/CXMlQ/uM0+GBbaiEaQvCRPbyC8vv0mkDc 02AQ== 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=kM82RYpaMfXj+19Sojlx+KaaCt+2rTu6EyFgbJe9RZk=; b=GJhdAoXQgbOBuD+y561zX29zcqAaYvSttCIbygT2ymDN75nuYSOEs8RL3dN2u4RdtH tGkjMvthOwtcv5z9eeV7sdaHnYReL+7A8gD5RG6QxmqlE68gBwp7PpXpe7fnndUsjXUF 6PhBmQZDj8z6gH6YNOQvpFBSdBRgQF3kK0K55xXinSViZOBDzlDQrw8b/gzCdQ/8aeSb 8c02dScjd+UJkHxyZHuYfUPU2cxuasLeimxoR8Wt0inZedWmNyWj9AtMS4b0GkT0i3qD jKlclXDTpdRgs0yTEJpvv1qs2bUyjXRKc9V5OB5OdWnnJg6cOswN2a89KwEnLC3CIhpf OX3Q== 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 f20-v6si1833583plj.254.2018.02.14.12.14.09; Wed, 14 Feb 2018 12:14:24 -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 S1033413AbeBNT4D (ORCPT + 99 others); Wed, 14 Feb 2018 14:56:03 -0500 Received: from resqmta-ch2-06v.sys.comcast.net ([69.252.207.38]:60748 "EHLO resqmta-ch2-06v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030501AbeBNT4C (ORCPT ); Wed, 14 Feb 2018 14:56:02 -0500 Received: from resomta-ch2-15v.sys.comcast.net ([69.252.207.111]) by resqmta-ch2-06v.sys.comcast.net with ESMTP id m39kefaVJj8q5m39texJ5E; Wed, 14 Feb 2018 19:56:01 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-ch2-15v.sys.comcast.net with SMTP id m39reDP7kEdGum39semni5; Wed, 14 Feb 2018 19:56:01 +0000 Received: by gentwo.org (Postfix, from userid 1001) id 78D281160249; Wed, 14 Feb 2018 13:55:59 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 759801160223; Wed, 14 Feb 2018 13:55:59 -0600 (CST) Date: Wed, 14 Feb 2018 13:55:59 -0600 (CST) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Matthew Wilcox cc: Andrew Morton , Matthew Wilcox , linux-mm@kvack.org, Kees Cook , linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com Subject: Re: [PATCH 2/2] mm: Add kvmalloc_ab_c and kvzalloc_struct In-Reply-To: <20180214182618.14627-3-willy@infradead.org> Message-ID: References: <20180214182618.14627-1-willy@infradead.org> <20180214182618.14627-3-willy@infradead.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfGWYWk8bma8PDA9hdUtGQQA4iY+vdeuRNFpb8Gce5u6Fq9wE1MKVSTn1DsyczItyaE1sOG92beNgiv0D6RJBS1lptX2tpf+7+1ATVSf/wISZh8iqtFa9 NT+hUz1K1sd9Ifg9wr7LdTuNMIcl1XQeD0Om7wA/fZkgTGb9lljKY7VHREq8g0Z2rCjdmGIuXisGve+hNnzAaUjAT0GClzXxmLC3HHTuI54D2FlUv1onecd9 CHd0vzEYEi4Ks/2sSe2nNUQWNFYgBxPslTlALWvJs2mL1HntZSJ06SBKVQTTAriU4CQTvV2j2NV/DYViLlofYGr518dYy8p//cilNGd9wrTraoWYlhipxRg0 +pd1RXBet2UeXbwHqmpqHBw15HgUPw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 14 Feb 2018, Matthew Wilcox wrote: > +#define kvzalloc_struct(p, member, n, gfp) \ > + (typeof(p))kvzalloc_ab_c(n, \ > + sizeof(*(p)->member) + __must_be_array((p)->member), \ > + offsetof(typeof(*(p)), member), gfp) > + Uppercase like the similar KMEM_CACHE related macros in include/linux/slab.h?>