Linux block layer
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Christoph Hellwig <hch@infradead.org>,
	Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Cc: linux-block@vger.kernel.org, Chaitanya.Kulkarni@wdc.com
Subject: Re: [PATCH v2] blktrace: put bounds on BLKTRACESETUP buf_size and buf_nr
Date: Mon, 15 Jun 2020 07:01:00 -0700	[thread overview]
Message-ID: <904b17e6-3ac6-8474-d6e5-32ada0dc2d40@acm.org> (raw)
In-Reply-To: <20200615115236.GA28124@infradead.org>

On 2020-06-15 04:52, Christoph Hellwig wrote:
> I don't think the configurability makes any sense.  We need to put
> a hard upper cap on, preferably one that doesn't break widely used
> userspace.  Just pick a reasonable large value to get started.

Hi Christoph,

Something that has not been mentioned in the patch description is that
this patch addresses an issue that was discovered by syzbot. Do you
agree that the following changes are useful on top of a hard upper limit
for the blktrace buffer and that these changes will address more
potential syzbot issues?
- Use __GFP_ACCOUNT in the relay_open() call that allocates blktrace
buffers such that the memory allocation is accounted to a process and
such that the OOM killer becomes aware of blktrace buffer allocations.
- Making blkdev_close(), raw_release() and sg_release() shut down
tracing in case the BLKTRACETEARDOWN ioctl has not been invoked. That
will cause the blktrace buffers to be freed when e.g. the process that
owns these buffers is killed.

Thanks,

Bart.

  reply	other threads:[~2020-06-15 14:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11  1:33 [PATCH v2] blktrace: put bounds on BLKTRACESETUP buf_size and buf_nr Harshad Shirwadkar
2020-06-11  1:53 ` Chaitanya Kulkarni
2020-06-11 13:41 ` Bart Van Assche
2020-06-13  0:09   ` Chaitanya Kulkarni
2020-06-13  0:57     ` harshad shirwadkar
2020-06-15 11:52 ` Christoph Hellwig
2020-06-15 14:01   ` Bart Van Assche [this message]
2020-06-15 14:04     ` Christoph Hellwig

Reply instructions:

You may reply publicly 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=904b17e6-3ac6-8474-d6e5-32ada0dc2d40@acm.org \
    --to=bvanassche@acm.org \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=harshadshirwadkar@gmail.com \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox