Re: [PATCH] mm/slub: Add slub_debug option to panic on memory corruption

2021-03-18 Thread Kees Cook
On Thu, Mar 18, 2021 at 01:56:05PM +0100, Vlastimil Babka wrote: > I was going to suggest adding a panic_on_taint parameter... but turns out it > was > already added last year! And various memory corruption detections already use > TAINT_BAD_PAGE, including SLUB. > If anything's missing an

Re: [PATCH] mm/slub: Add slub_debug option to panic on memory corruption

2021-03-18 Thread Vlastimil Babka
On 3/18/21 6:48 AM, Kees Cook wrote: > On Tue, Mar 09, 2021 at 07:18:32PM +0100, Vlastimil Babka wrote: >> On 3/9/21 7:14 PM, Georgi Djakov wrote: >> > Hi Vlastimil, >> > >> > Thanks for the comment! >> > >> > On 3/9/21 17:09, Vlastimil Babka wrote: >> >> On 3/9/21 2:47 PM, Georgi Djakov wrote:

Re: [PATCH] mm/slub: Add slub_debug option to panic on memory corruption

2021-03-17 Thread Kees Cook
On Tue, Mar 09, 2021 at 07:18:32PM +0100, Vlastimil Babka wrote: > On 3/9/21 7:14 PM, Georgi Djakov wrote: > > Hi Vlastimil, > > > > Thanks for the comment! > > > > On 3/9/21 17:09, Vlastimil Babka wrote: > >> On 3/9/21 2:47 PM, Georgi Djakov wrote: > >>> Being able to stop the system

Re: [PATCH] mm/slub: Add slub_debug option to panic on memory corruption

2021-03-09 Thread Vlastimil Babka
On 3/9/21 7:14 PM, Georgi Djakov wrote: > Hi Vlastimil, > > Thanks for the comment! > > On 3/9/21 17:09, Vlastimil Babka wrote: >> On 3/9/21 2:47 PM, Georgi Djakov wrote: >>> Being able to stop the system immediately when a memory corruption >>> is detected is crucial to finding the source of

Re: [PATCH] mm/slub: Add slub_debug option to panic on memory corruption

2021-03-09 Thread Georgi Djakov
Hi Vlastimil, Thanks for the comment! On 3/9/21 17:09, Vlastimil Babka wrote: On 3/9/21 2:47 PM, Georgi Djakov wrote: Being able to stop the system immediately when a memory corruption is detected is crucial to finding the source of it. This is very useful when the memory can be inspected

Re: [PATCH] mm/slub: Add slub_debug option to panic on memory corruption

2021-03-09 Thread Georgi Djakov
Hi Christoph, Thanks for the comments! On 3/9/21 16:56, Christoph Lameter wrote: On Tue, 9 Mar 2021, Georgi Djakov wrote: Being able to stop the system immediately when a memory corruption is detected is crucial to finding the source of it. This is very useful when the memory can be

Re: [PATCH] mm/slub: Add slub_debug option to panic on memory corruption

2021-03-09 Thread Vlastimil Babka
On 3/9/21 2:47 PM, Georgi Djakov wrote: > Being able to stop the system immediately when a memory corruption > is detected is crucial to finding the source of it. This is very > useful when the memory can be inspected with kdump or other tools. Is this in some testing scenarios where you would

Re: [PATCH] mm/slub: Add slub_debug option to panic on memory corruption

2021-03-09 Thread Christoph Lameter
On Tue, 9 Mar 2021, Georgi Djakov wrote: > Being able to stop the system immediately when a memory corruption > is detected is crucial to finding the source of it. This is very > useful when the memory can be inspected with kdump or other tools. Hmmm ok. > static void restore_bytes(struct

[PATCH] mm/slub: Add slub_debug option to panic on memory corruption

2021-03-09 Thread Georgi Djakov
Being able to stop the system immediately when a memory corruption is detected is crucial to finding the source of it. This is very useful when the memory can be inspected with kdump or other tools. Let's add an option panic the kernel when slab debug catches an object or list corruption. This