On Sun 2023-05-28 17:01:59, Hyeonggon Yoo wrote: > On Sat, May 27, 2023 at 05:48:32PM +0100, Matthew Wilcox wrote: > > It is confusing and unnecessary to print the page type when the > > page has no type. > > > > Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> > > > > --- > > > > I did not run the test-suite. I'm in the middle of debugging something > > else and this is an unwelcome distraction. If this doesn't work quite > > right, please fix it. > > I ran the test suite, and a test case failed: > > [ 1.001641] test_printf: loaded. > [ 1.001736] test_printf: vsnprintf(buf, 256, "%pGt", ...) returned 41, expected 5 > [ 1.001738] test_printf: vsnprintf(buf, 2, "%pGt", ...) returned 41, expected 5 > [ 1.001738] test_printf: vsnprintf(buf, 0, "%pGt", ...) returned 41, expected 5 > [ 1.001739] test_printf: kvasprintf(..., "%pGt", ...) returned '0xa(offline|guard|table|buddy|0xfffff875)', expected '0xa()' > [ 1.001774] test_printf: failed 4 out of 432 tests > > The code mostly looks fine and the patch makes sense to me. > But I'm not sure if it's a nice behavior to print garbage when it does not > have a page type, although I can hardly imagine users of this flag other > than __dump_page(). I'd rather keep printk part unchanged and add > page_has_type() check in __dump_page(). I agree with Hyeonggon. The change in __dump_page() makes sense. But vsprintf() should stay clever and do not print garbage. Best Regards, Petr