LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: josh@joshtriplett.org
To: Pavel Machek <pavel@ucw.cz>
Cc: Tom Zanussi <tom.zanussi@linux.intel.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 05/10] drivers/char: Support compiling out /dev/zero
Date: Wed, 28 Jan 2015 13:51:06 -0800	[thread overview]
Message-ID: <20150128215106.GA6338@cloud> (raw)
In-Reply-To: <20150128210751.GA14006@amd>

On Wed, Jan 28, 2015 at 10:07:51PM +0100, Pavel Machek wrote:
> On Fri 2015-01-23 12:37:11, Tom Zanussi wrote:
> > Some embedded systems with tightly controlled userspace have no use
> > for /dev/zero, and could benefit from the size savings gained by
> > omitting it.  Add a new EMBEDDED config option to disable it.
> > 
> > bloat-o-meter (based on tinyconfig):
> > 
> > add/remove: 0/3 grow/shrink: 0/1 up/down: 0/-391 (-391)
> > function                                     old     new   delta
> > chr_dev_init                                 162     147     -15
> > mmap_zero                                     16       -     -16
> > zero_fops                                    116       -    -116
> > zero_bdi                                     244       -    -244
> > 
> > Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> 
> I'm not sure that 400 bytes are worth additional Kconfig noise. .. and
> pretty much everyone needs /dev/zero...

Relatively few, actually, given MMAP_ANONYMOUS.  Memory isn't allocated
via an mmap of /dev/zero.  It's useful for systems with shells that want
to redirect from it or read from it, but less useful for environments
with entirely compiled code.

/dev/null is much more commonly needed, though there are still systems
that won't need it (and can just disable read/writes on an fd entirely
rather than duping /dev/null to that fd).

That said, I'd be entirely in favor of consolidating many of these
"miscellaneous character device" options into a couple of Kconfig
options.  It doesn't seem critical to *individually* control each of
these files in /dev.

Personally, I'm hoping that we eventually end up with a disableable
CONFIG_CHAR similar to CONFIG_BLOCK.

- Josh Triplett

  reply	other threads:[~2015-01-29  2:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 18:37 [PATCH 00/10] tinification: Make memory-access char devices optional Tom Zanussi
2015-01-23 18:37 ` [PATCH 01/10] drivers/char: Support compiling out memory-access char devices Tom Zanussi
2015-01-23 18:37 ` [PATCH 02/10] drivers/char: Support compiling out /dev/mem Tom Zanussi
2015-01-23 18:37 ` [PATCH 03/10] drivers/char: Support compiling out /dev/port Tom Zanussi
2015-01-23 18:37 ` [PATCH 04/10] drivers/char: Support compiling out /dev/null Tom Zanussi
2015-01-23 18:37 ` [PATCH 05/10] drivers/char: Support compiling out /dev/zero Tom Zanussi
2015-01-28 21:07   ` Pavel Machek
2015-01-28 21:51     ` josh [this message]
2015-01-28 21:52       ` Pavel Machek
2015-01-28 23:20       ` Tom Zanussi
2015-01-31 23:08         ` Josh Triplett
2015-01-23 18:37 ` [PATCH 06/10] drivers/char: Support compiling out /dev/full Tom Zanussi
2015-01-23 18:37 ` [PATCH 07/10] drivers/char: Support compiling out /dev/random Tom Zanussi
2015-01-23 18:37 ` [PATCH 08/10] drivers/char: Support compiling out /dev/urandom Tom Zanussi
2015-01-23 18:37 ` [PATCH 09/10] drivers/char: Support compiling out /dev/kmsg Tom Zanussi
2015-01-23 18:37 ` [PATCH 10/10] drivers/char: Support compiling out the getrandom(2) syscall Tom Zanussi
2015-01-23 19:46   ` Theodore Ts'o
2015-01-23 20:04     ` Tom Zanussi
2015-01-23 22:30     ` josh

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=20150128215106.GA6338@cloud \
    --to=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=tom.zanussi@linux.intel.com \
    --subject='Re: [PATCH 05/10] drivers/char: Support compiling out /dev/zero' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).