All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 3/3] scsi: myrs: prevent negatives in disable_enclosure_messages_store()
Date: Fri, 19 Oct 2018 23:00:54 +0000	[thread overview]
Message-ID: <yq1a7n9ilsp.fsf@oracle.com> (raw)
In-Reply-To: <20181019091909.a22ah7wybj6agqch@kili.mountain>


Dan,

> We only want the value to be zero or one.
>
> It's not a big deal, but say we passed set value to INT_MIN, then
> disable_enclosure_messages_show() would return that 12 bytes of "buf"
> are initialized but actually only 3 are.  I think there are tools like
> KASAN which will trigger an info leak warning when that happens.

s/kstrtoint/kstrtouint/?

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2018-10-19 23:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-19  9:19 [PATCH 3/3] scsi: myrs: prevent negatives in disable_enclosure_messages_store() Dan Carpenter
2018-10-19 23:00 ` Martin K. Petersen [this message]
2018-10-20  8:42 ` Dan Carpenter
2018-10-24  2:28 ` Martin K. Petersen

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=yq1a7n9ilsp.fsf@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=kernel-janitors@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.