From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Minchan Kim <minchan@kernel.org>,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [PATCH] zsmalloc: calling zs_map_object() from irq is a bug
Date: Thu, 28 Sep 2017 09:41:58 +0900 [thread overview]
Message-ID: <20170928004158.GA3722@jagdpanzerIV.localdomain> (raw)
In-Reply-To: <20170926172632.cf302deff749d12f74d8a4da@linux-foundation.org>
On (09/26/17 17:26), Andrew Morton wrote:
> > On Wed, Sep 20, 2017 at 03:39:41PM +0900, Sergey Senozhatsky wrote:
> > > Use BUG_ON(in_interrupt()) in zs_map_object(). Calling this
> > > function from IRQ is a bug, because we use per-CPU mappings
> > > and interrupt may corrupt those buffers.
> > >
> > > Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> >
> > IMHO, corruption the buffer would be not enough to be a BUG_ON
> > which stop the system fully so user loses any chances to shut
> > down smooth/hunt it down.
> >
> > More serious thing of our case is that it can leak other user's
> > data by overwriting, which is more concern I am thinking now.
> >
>
> In an off-list email Linus has basically stated that all new uses of
> BUG_ON should include words in the changelog or code comments
> explaining why it is justifiable to kill the machine when the condition
> triggers.
>
> So can we please have a v2 with the appropriate comment?
ah, OK. will follow up.
-ss
next prev parent reply other threads:[~2017-09-28 0:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-20 6:39 Sergey Senozhatsky
2017-09-20 6:47 ` Minchan Kim
2017-09-20 6:48 ` Sergey Senozhatsky
2017-09-27 0:26 ` Andrew Morton
2017-09-28 0:41 ` Sergey Senozhatsky [this message]
2017-09-29 4:51 Sergey Senozhatsky
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=20170928004158.GA3722@jagdpanzerIV.localdomain \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=sergey.senozhatsky@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®