All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	Harshad Shirwadkar <harshadshirwadkar@gmail.com>,
	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:04:38 -0700	[thread overview]
Message-ID: <20200615140438.GA21927@infradead.org> (raw)
In-Reply-To: <904b17e6-3ac6-8474-d6e5-32ada0dc2d40@acm.org>

On Mon, Jun 15, 2020 at 07:01:00AM -0700, Bart Van Assche wrote:
> 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.

Sounds ok. 

> - 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.

While this sounds useful I think it might very well break existing
use cases.

      reply	other threads:[~2020-06-15 14:04 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
2020-06-15 14:04     ` Christoph Hellwig [this message]

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=20200615140438.GA21927@infradead.org \
    --to=hch@infradead.org \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=harshadshirwadkar@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.