All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Osterlund <petero2@telia.com>
To: balagi@justmail.de
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"akpm@osdl.org" <akpm@osdl.org>
Subject: Re: [PATCH 7/11] 2.6.18-mm3 pktcdvd: make procfs interface optional
Date: 05 Oct 2006 21:59:49 +0200	[thread overview]
Message-ID: <m3bqoqmt3e.fsf@telia.com> (raw)
In-Reply-To: <op.tguqh5r2iudtyh@master>

"Thomas Maier" <balagi@justmail.de> writes:

> this patch makes the procfs interface optional and groups
> the procfs functions together.
> New kernel config parameter: CDROM_PKTCDVD_PROCINTF

Given the fact that Linus doesn't allow breaking user space tools
unless absolutely necessary, I don't think it makes sense to be able
to disable the character device control code.

The /proc/driver/pktcdvd/pktcdvd? file only contains debugging stuff
though, and the main reason it's not already in debugfs is that
debugfs didn't exist when Jens wrote this driver.

Therefore a patch that unconditionally moves
/proc/driver/pktcdvd/pktcdvd? to debugfs would make a lot of sense.

Also, the current change has another problem:

static int pkt_seq_show(struct seq_file *m, void *p)
+{
+       struct pktcdvd_device *pd = m->private;
+       char buf[1024];
+
+       pkt_print_info(pd, buf, sizeof(buf));
+       seq_printf(m, "%s", buf);
+       return 0;
+}

This wastes 1K stack space, and it can corrupt the stack if the
pkt_print_info() function wants to write more than 1K data.

Unconditionally moving to debugfs would remove the need for the
pkt_print_info() function so the buf array wouldn't be needed any
more.

-- 
Peter Osterlund - petero2@telia.com
http://web.telia.com/~u89404340

  parent reply	other threads:[~2006-10-05 20:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-03 15:26 [PATCH 7/11] 2.6.18-mm3 pktcdvd: make procfs interface optional Thomas Maier
2006-10-05 19:48 ` Peter Osterlund
2006-10-14 18:03   ` [PATCH 1/2] 2.6.19-rc1-mm1 pktcdvd: init pktdev_major Thomas Maier
2006-10-14 18:05     ` Peter Osterlund
2006-10-05 19:59 ` Peter Osterlund [this message]
2006-10-09 10:05   ` [PATCH 7/11] 2.6.18-mm3 pktcdvd: make procfs interface optional Thomas Maier
2006-10-09 17:07     ` Ingo Oeser

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=m3bqoqmt3e.fsf@telia.com \
    --to=petero2@telia.com \
    --cc=akpm@osdl.org \
    --cc=balagi@justmail.de \
    --cc=linux-kernel@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.