Re: [RFC PATCH v2] mm: slub: print kernel addresses in slub debug messages

2019-08-12 Thread Vlastimil Babka
On 8/9/19 4:46 AM, Matthew Wilcox wrote: > On Fri, Aug 09, 2019 at 09:08:37AM +0800, miles.c...@mediatek.com wrote: >> Possible approaches are: >> 1. stop printing kernel addresses >> 2. print with %pK, >> 3. print with %px. > > No. The point of obscuring kernel addresses is that if the attacker

Re: [RFC PATCH v2] mm: slub: print kernel addresses in slub debug messages

2019-08-12 Thread Miles Chen
On Fri, 2019-08-09 at 07:26 -0700, Matthew Wilcox wrote: > On Fri, Aug 09, 2019 at 10:11:58PM +0800, Miles Chen wrote: > > On Thu, 2019-08-08 at 19:46 -0700, Matthew Wilcox wrote: > > > On Fri, Aug 09, 2019 at 09:08:37AM +0800, miles.c...@mediatek.com wrote: > > > > INFO: Slab 0x(ptrval) ob

Re: [RFC PATCH v2] mm: slub: print kernel addresses in slub debug messages

2019-08-09 Thread Matthew Wilcox
On Fri, Aug 09, 2019 at 10:11:58PM +0800, Miles Chen wrote: > On Thu, 2019-08-08 at 19:46 -0700, Matthew Wilcox wrote: > > On Fri, Aug 09, 2019 at 09:08:37AM +0800, miles.c...@mediatek.com wrote: > > > INFO: Slab 0x(ptrval) objects=25 used=10 fp=0x(ptrval) > > > > ... you don't hav

Re: [RFC PATCH v2] mm: slub: print kernel addresses in slub debug messages

2019-08-09 Thread Miles Chen
On Thu, 2019-08-08 at 19:46 -0700, Matthew Wilcox wrote: > On Fri, Aug 09, 2019 at 09:08:37AM +0800, miles.c...@mediatek.com wrote: > > Possible approaches are: > > 1. stop printing kernel addresses > > 2. print with %pK, > > 3. print with %px. > > No. The point of obscuring kernel addresses is t

Re: [RFC PATCH v2] mm: slub: print kernel addresses in slub debug messages

2019-08-08 Thread Matthew Wilcox
On Fri, Aug 09, 2019 at 09:08:37AM +0800, miles.c...@mediatek.com wrote: > Possible approaches are: > 1. stop printing kernel addresses > 2. print with %pK, > 3. print with %px. No. The point of obscuring kernel addresses is that if the attacker manages to find a way to get the kernel to spit ou

[RFC PATCH v2] mm: slub: print kernel addresses in slub debug messages

2019-08-08 Thread miles.chen
From: Miles Chen This RFC patch is sent to discuss the printing address with %p issue. Since commit ad67b74d2469d9b8 ("printk: hash addresses printed with %p"), %p gives obfuscated addresses now. When CONFIG_SLUB_DEBUG=y, it is still useful to get real virtual addresses. Possible approaches are