Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1740299 > unrolled thread
| Started by | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| First post | 2017-09-27 02:30 +0200 |
| Last post | 2017-09-28 02:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] zsmalloc: calling zs_map_object() from irq is a bug Andrew Morton <akpm@linux-foundation.org> - 2017-09-27 02:30 +0200
Re: [PATCH] zsmalloc: calling zs_map_object() from irq is a bug Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-09-28 02:50 +0200
| From | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| Date | 2017-09-27 02:30 +0200 |
| Subject | Re: [PATCH] zsmalloc: calling zs_map_object() from irq is a bug |
| Message-ID | <uu8oG-3pD-5@gated-at.bofh.it> |
On Wed, 20 Sep 2017 15:47:39 +0900 Minchan Kim <minchan@kernel.org> 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?
[toc] | [next] | [standalone]
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| Date | 2017-09-28 02:50 +0200 |
| Message-ID | <uuvbz-1NM-3@gated-at.bofh.it> |
| In reply to | #1740299 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web