linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Gilad Broner <gbroner@codeaurora.org>
Cc: draviv@codeaurora.org, linux-scsi@vger.kernel.org
Subject: Re: ufs: add ioctl interface for query request
Date: Mon, 13 Apr 2015 14:01:58 +0300	[thread overview]
Message-ID: <20150413110158.GO16501@mwanda> (raw)
In-Reply-To: <bad58376cabac273fbe5a8ea22356204.squirrel@www.codeaurora.org>

On Mon, Apr 13, 2015 at 10:55:58AM -0000, Gilad Broner wrote:
> > copy_to/from_user() returns the number of bytes not copied and not an
> > error code.  Printing these error messages in the ioctl means the user
> > can trigger a DoS by filling up /var/log/messages.  They make the code
> > uglier.  We should stop here if the copy fails and goto out_release_mem
> > otherwise we might end up returning success by mistake.
> 
> Thanks for the comment, I will update the code.
> I wanted to clarify about the possibility of a DoS attack:
> - Isn't var/log/messages cyclic or size limited in some way?

Some people limit it some people don't.  To be honest, I'm not really
concerned about this, but I use it as an excuse to remove debug
messages.

> - What determines that dev_err() prints go to /var/log/messages?
>   would it still be the case if dev_dbg() was used instead?

Normally dev_dbg() message are not printed.  But just remove them.  They
make the code uglier.

regards,
dan carpenter


      reply	other threads:[~2015-04-13 11:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 20:17 ufs: add ioctl interface for query request Dan Carpenter
2015-04-13 10:55 ` Gilad Broner
2015-04-13 11:01   ` Dan Carpenter [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=20150413110158.GO16501@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=draviv@codeaurora.org \
    --cc=gbroner@codeaurora.org \
    --cc=linux-scsi@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;
as well as URLs for NNTP newsgroup(s).