From: Paul Eggert <eggert@cs.ucla.edu>
To: Hugh Dickins <hughd@google.com>
Cc: Jim Meyering <jim@meyering.net>,
Zheng Liu <wenqing.lz@taobao.com>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/3] tmpfs: revert SEEK_DATA and SEEK_HOLE
Date: Tue, 14 Aug 2012 10:03:23 -0700 [thread overview]
Message-ID: <502A84DB.5090607@cs.ucla.edu> (raw)
In-Reply-To: <alpine.LSU.2.00.1208071735220.1983@eggly.anvils>
On 08/07/2012 07:08 PM, Hugh Dickins wrote:
> wouldn't the developer's common case (object files amidst source
> in the tree) usually be handled by that check on the first 32k?
Yes, but grep should also handle the less-common case
where the first 32K is text and there's a large hole later.
The particular case I'm worried about is a denial-of-service
attack, so it's irrelevant that this case is uncommon in
typical files.
> shouldn't grep instead just be
> checking for over-long lines instead of running out of memory?
GNU programs should not have arbitrary limits. An arbitrary limit, such
as 100,000 bytes, that we put on line length, would cause grep to
not work on some valid inputs.
This is not to say that grep couldn't function better on files with
lots of nulls -- it can, and that's on our list of things to do --
but SEEK_HOLE is a big and obvious win in this area.
We also need SEEK_HOLE and SEEK_DATA for GNU 'tar', for the same reason
(denial-of-service attacks, mostly).
next prev parent reply other threads:[~2012-08-14 17:13 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-09 22:35 [PATCH 0/3] shmem/tmpfs: three late patches Hugh Dickins
2012-07-09 22:35 ` Hugh Dickins
2012-07-09 22:41 ` [PATCH 1/3] tmpfs: revert SEEK_DATA and SEEK_HOLE Hugh Dickins
2012-07-09 22:41 ` Hugh Dickins
2012-07-11 6:07 ` Cong Wang
2012-07-11 6:07 ` Cong Wang
2012-07-11 18:55 ` Hugh Dickins
2012-07-11 18:55 ` Hugh Dickins
2012-07-11 23:01 ` Dave Chinner
2012-07-11 23:01 ` Dave Chinner
2012-07-12 2:50 ` Hugh Dickins
2012-07-12 2:50 ` Hugh Dickins
2012-07-12 3:21 ` Jeff Liu
2012-07-12 3:21 ` Jeff Liu
2012-07-16 9:28 ` Hugh Dickins
2012-07-16 9:28 ` Hugh Dickins
2012-07-17 6:15 ` Jeff Liu
2012-07-17 6:15 ` Jeff Liu
2012-07-31 14:30 ` Jim Meyering
2012-07-31 14:42 ` Jim Meyering
2012-08-08 2:08 ` Hugh Dickins
2012-08-14 17:03 ` Paul Eggert [this message]
2012-07-09 22:44 ` [PATCH 2/3] shmem: fix negative rss in memcg memory.stat Hugh Dickins
2012-07-09 22:44 ` Hugh Dickins
2012-07-10 12:41 ` Johannes Weiner
2012-07-10 12:41 ` Johannes Weiner
2012-07-11 18:15 ` Hugh Dickins
2012-07-11 18:15 ` Hugh Dickins
2012-07-09 22:46 ` [PATCH 3/3] shmem: cleanup shmem_add_to_page_cache Hugh Dickins
2012-07-09 22:46 ` Hugh Dickins
2012-07-10 13:01 ` Johannes Weiner
2012-07-10 13:01 ` Johannes Weiner
2012-07-09 23:39 ` [PATCH 0/3] shmem/tmpfs: three late patches Andrew Morton
2012-07-09 23:39 ` Andrew Morton
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=502A84DB.5090607@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=hughd@google.com \
--cc=jim@meyering.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=wenqing.lz@taobao.com \
/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.