Received: by 10.223.185.116 with SMTP id b49csp1357771wrg; Wed, 21 Feb 2018 17:29:47 -0800 (PST) X-Google-Smtp-Source: AH8x224aX0hAo5MsdpuRSaqb33CNpKV+Lie7D7D0fet/1Ao7qNyKJmQItUg5SZoi3XTohACOdmPt X-Received: by 2002:a17:902:710e:: with SMTP id a14-v6mr4719703pll.291.1519262987283; Wed, 21 Feb 2018 17:29:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519262987; cv=none; d=google.com; s=arc-20160816; b=sQv0a34ySlrxS/cuuyfXIt7fh4/jXbmpaGMpaAUClTt0doECiHJZP9kCY2lqulcrE+ 5FRlOp2cFXpsCSOxyRueZW9Nz7XO9PhUzAj1ZUSxCd/5RLJnoBPRfKJYqcQMzQLUBbjr bH2HeqgKJoqBC2JNG5O8/8u/Rhr4I7LkAsYqDPwZk7d8MiLqb0HL231HSs+XZJr7qDPR lMWm8OSZiM72wKU0Na1mnTJyy2nParZz+ETaMwzoNc9zGPI4KGrn6maCwSFubunK3jV6 BVaxTKRBQCaFh6WOmnt2XSkacbArviu13sLlWWCZHdPgQ9WZkIARJOhP89h+lwpaeWO5 FCbQ== 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=s3xqYWgAb/kurBf4adTtLc9b5uGjXN4mgschgPcYquI=; b=S80DF8ufnJMcNUBVU7Pe97M3+Ua/hHCNwwdRNvpO7DCiNRYIwDRIVyWlND/UmQWYZ2 w8zmaHx3Y9zeNkuk51VHiLRSr+qyj6q+e5n8WBnna6mfu2KwD5OmvK8jCPC8bAYDpFji vAVAp3nWEvTHSUBdntzm16mLYCBG9wfKdDyLreVTjPmMWmgp4g0oJQJ3IN0P+xC46USJ SYnjrKUt90OX29sfDRt/+jZbpEiUiDIWW1mUzRzGwauRLIVuAPZwG59o69GRaU2EviO7 JgA5dBc1Xq3KaUBbRpE7g7VEAAJfULJpGbPD6Z/yIjd9RFZf388mrq/aIQZSplZOd/s2 fjGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=BNv0QH5s; dkim=fail header.i=@chromium.org header.s=google header.b=kXv0NsTu; 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 k189si357893pgc.598.2018.02.21.17.29.32; Wed, 21 Feb 2018 17:29:47 -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=BNv0QH5s; dkim=fail header.i=@chromium.org header.s=google header.b=kXv0NsTu; 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 S1751742AbeBVB2U (ORCPT + 99 others); Wed, 21 Feb 2018 20:28:20 -0500 Received: from mail-ua0-f196.google.com ([209.85.217.196]:33508 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751721AbeBVB2S (ORCPT ); Wed, 21 Feb 2018 20:28:18 -0500 Received: by mail-ua0-f196.google.com with SMTP id p12so2331111uad.0 for ; Wed, 21 Feb 2018 17:28:18 -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=s3xqYWgAb/kurBf4adTtLc9b5uGjXN4mgschgPcYquI=; b=BNv0QH5sv/NZo+B0Est+iRSjpmtI7xOiMNc5Ea7AlgiZaSYhi4359jgQ6AJvU7zMzG eAryv0SmwnhFZGxrAF7LlopIeprc0ZLxMPDLCIyAe6cYfGdfW8BiopSepzY/0SHWOL/e 7PEUkhPxfHp4/qr3LzP+fe8Ce5KPFua0ev+hPdZaLb3z2tR02O01+p1Sgn7ansTHdA/H gBK9hP8ZrD2U5Cwu/x5aNRWsObuY+9bpuS8hIBQ05BFK/njWFDeiNIG558t/BtvvTyIY JmregpcmmCbjwh6cUQCrUKG3cZJy0ZH/AkgOWw0tEUow3tmnn7ngh6mMYBsEfel63QXj +J0g== 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=s3xqYWgAb/kurBf4adTtLc9b5uGjXN4mgschgPcYquI=; b=kXv0NsTua5kR8+POyvUdkn4GiyrGmBqBHHsa3U1uAKQthiciL94jm0/xWUX09hymp6 KMpwhYwZfgc8C4LbxvwYo4+DBm37mPoj21+Zb/ZjrYm/TxdIqNT+TMhA2QahR5OD/Zer 7+SqRu23dGdxnX1H2LB/g0urQwyeR3vgNVHMs= 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=s3xqYWgAb/kurBf4adTtLc9b5uGjXN4mgschgPcYquI=; b=d5K9TOXHDXnT+qY3ZGvIuG+Tl+dBIdKpS4linzoKtH+7O1iani2JNYxYDDZDWcm0nQ I7StspvFKDYHvVjcMEqmqvxPkeyMcziyvBEsj2QrcMMAHFYrh2w3C83yeFd8Yiixg3UT rgpZIpFqfM/O7tcC1K8OeYTrzIIwoxA6KImk+tWE9lfR4Bl5otbP0GgYy2Rkcu+e3hAN Up+VHNydyrzmDqoks4mh5omQUgIt1isjFZS8QLzRdCwzntTcAEkmglOZmheb9Arm6R7a hdjyElRXO/KGLnzUILJBw652v2GJWrRErFh12CNibnCDJNoiTVSowgFRjuRwRJUTXLaQ DjYA== X-Gm-Message-State: APf1xPAq1Qbzo3H5bCbhPulIRZcHgWaaJLBesvdr56/0/RZ47QWD4x/F Ol/XWK4tmOWeqYb2SIYE0z9ULfjo4bgHrzEdjpoalw== X-Received: by 10.159.62.13 with SMTP id o13mr3827705uai.83.1519262898019; Wed, 21 Feb 2018 17:28:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.242.140 with HTTP; Wed, 21 Feb 2018 17:28:17 -0800 (PST) In-Reply-To: References: <20180214182618.14627-1-willy@infradead.org> <20180214182618.14627-3-willy@infradead.org> <20180214201400.GD20627@bombadil.infradead.org> <20180215162303.GC12360@bombadil.infradead.org> From: Kees Cook Date: Wed, 21 Feb 2018 17:28:17 -0800 X-Google-Sender-Auth: qjzDr3v-uQExITJmStC0XbkWkUE Message-ID: Subject: Re: [PATCH 2/2] mm: Add kvmalloc_ab_c and kvzalloc_struct To: Christopher Lameter Cc: Matthew Wilcox , Andrew Morton , Matthew Wilcox , Linux-MM , LKML , Kernel Hardening 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 15, 2018 at 9:06 AM, Christopher Lameter wrote: > On Thu, 15 Feb 2018, Matthew Wilcox wrote: > >> 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. > > It sure looks like a function but does magic things with the struct > parameter. So its not working like a function and the capitalization makes > one aware of that. I think readability trumps that -- nearly everything else in the kernel that hides these kinds of details is lower case. -Kees -- Kees Cook Pixel Security