Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1055188imm; Fri, 29 Jun 2018 10:35:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLrLke5sGjLAhzOdQeA4hskOHO+v5CPp82K8FP+n2zCWPy1wLK2nOdqy9QlQe+mYd0oPozY X-Received: by 2002:a63:2a45:: with SMTP id q66-v6mr13569577pgq.210.1530293700515; Fri, 29 Jun 2018 10:35:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530293700; cv=none; d=google.com; s=arc-20160816; b=x2rBX0atm6zX/X6o3aiywaJlb/BwsHztqd+2BHer8Dfo7p3ioK4XUIkKSoiZrbvaPX +1Q1D71rqVXav/19IEDeqjW90eMcXUWhbEc/RrSBGhWnwbdhmx7xduxVNY383chtc2hZ 44IuqrLzBZZ9Ppdo9TMC8b3+2Xr4XRLIn+rDqbzFq7oYp9PEVLe0csbNt/LYD2TdQ/pd lw/nclp3x5Dgb8fSTDVxYhJbSTOVqI9N6leDZrYWc3YKepzMmRMiuFAS11O3z6e/Fdfe enwW1UeitnLBEFS5GvDNweuOSn62YjpR2UEeGmgAimIL39PLjaXM3kx+p6Z8Wn7nt0eV lVrw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=jq+bgei4xvIsO6sFkW/U3h8Pm7AdDxLOCrHTsyFGJLk=; b=rzVro1sUGgMbVabkEyZqWJtC0iQhhhycxexhV2NRdfPTtUiEXXFXJ7j08aI8ewsKGH dmvMA5IMs7N1ZKpLQgJasHk75niQmGqLnJ+3JPlMUI/154lEgqPpRxKbabjvWOngH7Oz 0zCTFQ2eRwTOFW40kXz+nptZtfCxdfqulpaeY66fYQKicDy+qPQ0gtHJTZxzfE5w1e+C 2YnIOpWFVPboYvZCjT6JT2kOha6Tc9aWyr0ZnLRQMyF8f60603V8bBPE+11VL83Y1hfA ofVBL7XOxsx0tSdDjOI5cCjQ2zze+TF065ASkJzYbB2FIE47MclDX+nar9Ps0rY/dvov CfYQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5-v6si5547854pfp.218.2018.06.29.10.34.46; Fri, 29 Jun 2018 10:35:00 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937002AbeF2Qik (ORCPT + 99 others); Fri, 29 Jun 2018 12:38:40 -0400 Received: from mga01.intel.com ([192.55.52.88]:38079 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753553AbeF2Qij (ORCPT ); Fri, 29 Jun 2018 12:38:39 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jun 2018 09:38:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,286,1526367600"; d="scan'208";a="68830748" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga001.jf.intel.com with SMTP; 29 Jun 2018 09:38:33 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 29 Jun 2018 19:38:32 +0300 Date: Fri, 29 Jun 2018 19:38:32 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Michel =?iso-8859-1?Q?D=E4nzer?= Cc: David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH] drm: Use kvzalloc for allocating blob property memory Message-ID: <20180629163832.GF5565@intel.com> References: <20180629142710.2069-1-michel@daenzer.net> <20180629161205.GE5565@intel.com> <32deece3-b583-ca58-cd41-ba11846240c8@daenzer.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <32deece3-b583-ca58-cd41-ba11846240c8@daenzer.net> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 29, 2018 at 06:27:28PM +0200, Michel D?nzer wrote: > On 2018-06-29 06:12 PM, Ville Syrj?l? wrote: > > On Fri, Jun 29, 2018 at 04:27:10PM +0200, Michel D?nzer wrote: > >> From: Michel D?nzer > >> > >> The property size may be controlled by userspace, can be large (I've > >> seen failure with order 4, i.e. 16 pages / 64 KB) and doesn't need to be > >> physically contiguous. > > > > I wonder if we should enforce some kind of reasonable limit > > on the blob size. Looks like we allow anything up to > > ULONG_MAX currently. We can't tell at createblob time how > > the thing is going to be used, so can't have any kind > > of property specific limit unfortunately. > > The failure I was seeing was for a gamma LUT, so a size limit alone > cannot solve the issue. Sure. I was just thinking that maybe we shouldn't allow someone to allocate unlimited amounts of kernel memory via this interface. But to do that effectively we'd also need to limit the total amount used by all blobs. -- Ville Syrj?l? Intel