Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1593942
| From | Hannes Reinecke <hare@suse.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] zram: set physical queue limits to avoid array out of bounds accesses |
| Date | 2017-03-07 08:40 +0100 |
| Message-ID | <tihJf-45F-3@gated-at.bofh.it> (permalink) |
| References | <thY3U-6MU-11@gated-at.bofh.it> <tigtP-3ay-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 03/07/2017 06:22 AM, Minchan Kim wrote: > Hello Johannes, > > On Mon, Mar 06, 2017 at 11:23:35AM +0100, Johannes Thumshirn wrote: >> zram can handle at most SECTORS_PER_PAGE sectors in a bio's bvec. When using >> the NVMe over Fabrics loopback target which potentially sends a huge bulk of >> pages attached to the bio's bvec this results in a kernel panic because of >> array out of bounds accesses in zram_decompress_page(). > > First of all, thanks for the report and fix up! > Unfortunately, I'm not familiar with that interface of block layer. > > It seems this is a material for stable so I want to understand it clear. > Could you say more specific things to educate me? > > What scenario/When/How it is problem? It will help for me to understand! > The problem is that zram as it currently stands can only handle bios where each bvec contains a single page (or, to be precise, a chunk of data with a length of a page). This is not an automatic guarantee from the block layer (who is free to send us bios with arbitrary-sized bvecs), so we need to set the queue limits to ensure that. Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] zram: set physical queue limits to avoid array out of bounds accesses Johannes Thumshirn <jthumshirn@suse.de> - 2017-03-06 11:30 +0100
Re: [PATCH] zram: set physical queue limits to avoid array out of bounds accesses Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-03-06 11:50 +0100
Re: [PATCH] zram: set physical queue limits to avoid array out of bounds accesses Andrew Morton <akpm@linux-foundation.org> - 2017-03-06 22:40 +0100
Re: [PATCH] zram: set physical queue limits to avoid array out of bounds accesses Minchan Kim <minchan@kernel.org> - 2017-03-07 07:10 +0100
Re: [PATCH] zram: set physical queue limits to avoid array out of bounds accesses Minchan Kim <minchan@kernel.org> - 2017-03-07 08:30 +0100
Re: [PATCH] zram: set physical queue limits to avoid array out of bounds accesses Minchan Kim <minchan@kernel.org> - 2017-03-07 10:20 +0100
Re: [PATCH] zram: set physical queue limits to avoid array out of bounds accesses Johannes Thumshirn <jthumshirn@suse.de> - 2017-03-07 11:30 +0100
Re: [PATCH] zram: set physical queue limits to avoid array out of bounds accesses Minchan Kim <minchan@kernel.org> - 2017-03-08 06:50 +0100
Re: [PATCH] zram: set physical queue limits to avoid array out of bounds accesses Johannes Thumshirn <jthumshirn@suse.de> - 2017-03-08 09:50 +0100
Re: [PATCH] zram: set physical queue limits to avoid array out of bounds accesses Minchan Kim <minchan@kernel.org> - 2017-03-09 06:30 +0100
Re: [PATCH] zram: set physical queue limits to avoid array out of bounds accesses Hannes Reinecke <hare@suse.de> - 2017-03-07 12:40 +0100
Re: [PATCH] zram: set physical queue limits to avoid array out of bounds accesses Hannes Reinecke <hare@suse.de> - 2017-03-07 08:40 +0100
csiph-web