Received: by 10.223.185.116 with SMTP id b49csp1100939wrg; Wed, 14 Feb 2018 11:38:34 -0800 (PST) X-Google-Smtp-Source: AH8x22514Sm5ekbajxj7C09AdkV2mqNocAXqd672AOE3JeZ76ee6Wgd3NaBYqjzDia0XMbqUiYKD X-Received: by 10.98.242.14 with SMTP id m14mr153882pfh.230.1518637114410; Wed, 14 Feb 2018 11:38:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518637114; cv=none; d=google.com; s=arc-20160816; b=r+ja+BdPY4hK2r7Bl9WQ8BX3MH8e++Cc6BP9LPDsCHG8nq+7Wdt3i7sul4th/rp4S1 N9KZCcyjdq5ihRJf6jbmh71GDhxHKWkzwYmDL0rDFbaIFwp53tUblbNf7DP8tumi9+ur 5SJ8fX5RqLuWDNAgEGOYy4m5LMtLb6oBR2np11rZJqlLAuID+lOJwKbXNXOYZvcWdEXw p5kC92gQtyAm7cpDJ+h1ZS6y11VEjqBCa45srj3XIqMGcjR3/cJmVGmJXxDk5VzQBv4A 5aH4fELfvxBgpmAMVAgntMh41SxEOykfWNU83Xuwrsi1WCuWc8/LbPVUxWkjoIrmqsZI CNHQ== 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=tluaSAInQ0RtnC/13oB4uLOUTaTM46m+ILHUQjElGTk=; b=bGljXJ0kXPLfuSnbo4IzFoJ1VuWo8+FXkLIrufd1dFcwuOrcSZTQ1WTqZ78hFiCLUd IpaWa8wk57sZo2kafCfSe7MZUJXuI30fbWmt73lKYWpLtqOMStioEjNI8ariuRXUyAiQ 9QMF7uVt6C4mT8uCyLpZYMP6mUMJORJiDKKdDMaBObiznKBDRZEP1gPf6rvvDtxfA0BQ H9QCD6rmMexl/9SCauAl7qApRBbirK9PfKVVTDariw/Tbrf8FiF8HWRjsIhI7kvzbEo+ 2tZQfoaECV6FOGniP0+ZRyXnS3ntGrLhBmmy6SxnJ9julLhLD4HNO/p44TRD0TZyv52W 5ZaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SOkTAynz; 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 n127si8347730pga.171.2018.02.14.11.38.19; Wed, 14 Feb 2018 11:38:34 -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=SOkTAynz; 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 S1163091AbeBNTgV (ORCPT + 99 others); Wed, 14 Feb 2018 14:36:21 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:39786 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163042AbeBNTgR (ORCPT ); Wed, 14 Feb 2018 14:36:17 -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=tluaSAInQ0RtnC/13oB4uLOUTaTM46m+ILHUQjElGTk=; b=SOkTAynzahGBdxfJFlmApkGHm oKAJ4Q4jVHfYCT0fTLPDP71yLORuIBt+RftPTOO9GlhTwkjfkHHxZrb73NluWeM6RDaWa03jStmtv tu6GgVFdsZQ5n01i5QMZ2yRm1/XK3OdITZyfXo1yHwFftL/kDdgbqFO40QOi7/+TuaQ/0uEWfC48x fuJgWigzjDYXoMQ4Di48noMSz9Nzi0dQ79ivRvA98zTmIlvCxlkl5URpjhhqZWLvWtRiRKIgFIh3Y CeuYKKqSawL10a4rxcHoKIq2nkQpgdyogwjRsxmzawZlpcqJPp4MeRxCqRY2Fl7CpjGkP+704RtpH McMERSdLw==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1em2qj-0003cA-L4; Wed, 14 Feb 2018 19:36:13 +0000 Date: Wed, 14 Feb 2018 11:36:13 -0800 From: Matthew Wilcox To: Joe Perches Cc: Kees Cook , Andrew Morton , Matthew Wilcox , Linux-MM , LKML , Kernel Hardening Subject: Re: [PATCH 0/2] Add kvzalloc_struct to complement kvzalloc_array Message-ID: <20180214193613.GB20627@bombadil.infradead.org> References: <20180214182618.14627-1-willy@infradead.org> <1518634058.3678.15.camel@perches.com> <1518636765.3678.19.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1518636765.3678.19.camel@perches.com> 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 Wed, Feb 14, 2018 at 11:32:45AM -0800, Joe Perches wrote: > On Wed, 2018-02-14 at 11:23 -0800, Kees Cook wrote: > > On Wed, Feb 14, 2018 at 10:47 AM, Joe Perches wrote: > > > I think expanding the number of allocation functions > > > is not necessary. > > > > I think removing common mispatterns in favor of overflow-protected > > allocation functions makes sense. > > Function symmetry matters too. > > These allocation functions are specific to kvz > and are not symmetric for k, v, devm_ > _node, and the like. If somebody wants them, then we can add them.