Linux-ARM-MSM Archive on lore.kernel.org
 help / color / Atom feed
From: cohens@codeaurora.org
To: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
	linux-arm-msm@vger.kernel.org, adelva@google.com,
	pdhaval@codeaurora.org, seanpaul@chromium.org,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH 0/3] allow DRM drivers to limit creation of blobs
Date: Fri, 08 Nov 2019 19:01:21 -0500
Message-ID: <7072bcc51eb44d49ab4266e0ec216df6@codeaurora.org> (raw)
In-Reply-To: <20191108083448.GU23790@phenom.ffwll.local>

On 2019-11-08 03:34, Daniel Vetter wrote:
> On Thu, Nov 07, 2019 at 02:39:11PM -0500, Steve Cohen wrote:
>> Fuzzers used in Android compliance testing repeatedly call the
>> create blob IOCTL which eventually exhausts the system memory.
>> This series adds a hook which allows drivers to impose their own
>> limitations on the size and/or number of blobs created.
> 
> Pretty sure this isn't just a problem for msm/dpu alone, why this very
> limited approach?
> 
I'm not familiar enough with the blob requirements for other
vendor's drivers to impose any restrictions on them. The idea
was to provide the hook for vendors to implement their own
checks. Support for msm/mdp* drivers will be added in v2 if this
approach is acceptable.

> Also, why are your fuzzers not also allocating enormous amounts of gem
> buffers, which will also exhaust memory eventually?

Excellent question... This will likely come in a follow-up series.

> -Daniel
> 
>> 
>> Steve Cohen (3):
>>   drm: add driver hook for create blob limitations
>>   drm/msm: add support for createblob_check driver hook
>>   drm/msm/dpu: check blob limitations during create blob ioctl
>> 
>>  drivers/gpu/drm/drm_property.c          |  7 +++++++
>>  drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 14 ++++++++++++++
>>  drivers/gpu/drm/msm/msm_drv.c           | 25 
>> +++++++++++++++++++++++++
>>  drivers/gpu/drm/msm/msm_kms.h           |  1 +
>>  include/drm/drm_drv.h                   |  9 +++++++++
>>  5 files changed, 56 insertions(+)
>> 
>> --
>> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora 
>> Forum,
>> a Linux Foundation Collaborative Project
>> 
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 19:39 Steve Cohen
2019-11-07 19:39 ` [PATCH 1/3] drm: add driver hook for create blob limitations Steve Cohen
2019-11-07 19:39 ` [PATCH 2/3] drm/msm: add support for createblob_check driver hook Steve Cohen
2019-11-07 19:39 ` [PATCH 3/3] drm/msm/dpu: check blob limitations during create blob ioctl Steve Cohen
2019-11-08  8:34 ` [PATCH 0/3] allow DRM drivers to limit creation of blobs Daniel Vetter
2019-11-09  0:01   ` cohens [this message]
2019-11-10 20:57     ` Daniel Vetter

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7072bcc51eb44d49ab4266e0ec216df6@codeaurora.org \
    --to=cohens@codeaurora.org \
    --cc=adelva@google.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=pdhaval@codeaurora.org \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-ARM-MSM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-msm/0 linux-arm-msm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-msm linux-arm-msm/ https://lore.kernel.org/linux-arm-msm \
		linux-arm-msm@vger.kernel.org
	public-inbox-index linux-arm-msm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-arm-msm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git