Received: by 10.223.185.116 with SMTP id b49csp394191wrg; Fri, 16 Feb 2018 00:25:29 -0800 (PST) X-Google-Smtp-Source: AH8x227zhG3jJU2UEqFH2HjpRdEow8ugg/r7B+cUSe8ebUTMY6gZvSG5IZMSpZ0iSeU6A47msqhA X-Received: by 10.98.181.14 with SMTP id y14mr5400542pfe.220.1518769529370; Fri, 16 Feb 2018 00:25:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518769529; cv=none; d=google.com; s=arc-20160816; b=cgIbk5MDD9uFpbN3MnczriFcLwcmQ8wJ0udbTiYV1lGs1q58wLs5xSa5hrjjJVhIiz oDLcFiAXn40tXu4wAwhogilsF0lHm42feeNSIgcKPtVjmVuAtPc6PgyAXGPCN26oRKzU 1egpnFXzCFzwwrZcVVI+PmF+n8zUssTusAggKCWv8imT2K3C2UOiOyD2uknn5J/GEpZG 98+mhL62xbWMU5VqfIjF4fT9K0wfPr64yzFswDxWg/qiR0Npb2XhiKJq8Jowp1OMJW4s SA2jbUlUOw2iELN9Q4aNvqm2IR+vFvAQec+6mVpaBVWOplDedqpf0YvPsw7s2PX1zt7s kNrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=hFvDSVEInHSM4c6gENfRRGBmiPtPVNer6I94SH6iAbI=; b=Dak9Yb+JsjqtOWLF6ULqQGADHlbIgLjWZJ7RP0ZHtIyHiIDo0NNAufvXaKW3bdh/x+ JmksF1oZbeMofrbBd2QXfO7bEmDmASKnd5xR5X9bmoZ1F5PTmk2UQuOeZtjA+caP+yQg r5sEv5JJd1x97UGK9OAmOVET/CdIqGZR3WXC7qM5Jw2elczjzfid8TwMAkld1RSyvNLP Q4xQI5dxcjCv3vwj9KSwPE3nagdYgv802mJadsOwJDPXPjJ44C491v5Kw4/mr4l47PUg CAtxJDsL6WmZ7sG4q8y2pbBDVqINSKcvobNugCH3UdCwYIeKIuOnXguQvVbNaMXexJs6 UH/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=HEQHTqzs; 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 4-v6si1291895plh.540.2018.02.16.00.25.15; Fri, 16 Feb 2018 00:25:29 -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=@infradead.org header.s=bombadil.20170209 header.b=HEQHTqzs; 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 S1425800AbeBOQXI (ORCPT + 99 others); Thu, 15 Feb 2018 11:23:08 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:35372 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425630AbeBOQXG (ORCPT ); Thu, 15 Feb 2018 11:23:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=hFvDSVEInHSM4c6gENfRRGBmiPtPVNer6I94SH6iAbI=; b=HEQHTqzsgmnnRb69RAjJ1ggPw l9LREOyzuAt2HHuTCTC743IThPEnf1pSf9y47w/ONzGxNskShu73VztYXcfSgFTvD0fo/OxsbyRoP pmQmHCCtRNV7OrWYeK/p44OLjnXszQhro5YpixkB4evg4C1gvRkelRpz/tKRApbsQCJ/D9ZRKLZc2 IRU+YdZjPzHkNJ2SEsNSw/QvPbXG59/DbzoYM1KDOu0MckTN+Y1Ya56+Xa6yCgr6Qe3vcpxY5RQrK MFIURkBB1rslhykS5yRTihl5GkgWM74kjifBD2BtiGwv5726JvBz8NhjTjWXtzVzoGgRlGoeXJn7L i5AKo+Qcg==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1emMJL-0005ez-O9; Thu, 15 Feb 2018 16:23:03 +0000 Date: Thu, 15 Feb 2018 08:23:03 -0800 From: Matthew Wilcox To: Christopher Lameter 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 Message-ID: <20180215162303.GC12360@bombadil.infradead.org> References: <20180214182618.14627-1-willy@infradead.org> <20180214182618.14627-3-willy@infradead.org> <20180214201400.GD20627@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 15, 2018 at 09:55:11AM -0600, Christopher Lameter wrote: > On Wed, 14 Feb 2018, Matthew Wilcox wrote: > > > > Uppercase like the similar KMEM_CACHE related macros in > > > include/linux/slab.h?> > > > > Do you think that would look better in the users? Compare: > > Does looking matter? I thought we had the convention that macros are > uppercase. There are some tricks going on with the struct. Uppercase shows > that something special is going on. 12) Macros, Enums and RTL ------------------------- Names of macros defining constants and labels in enums are capitalized. .. code-block:: c #define CONSTANT 0x12345 Enums are preferred when defining several related constants. CAPITALIZED macro names are appreciated but macros resembling functions may be named in lower case. I dunno. Yes, there's macro trickery going on here, but it certainly resembles a function. It doesn't fail any of the rules laid out in that chapter of coding-style about unacceptable uses of macros.