Re: [PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-09 Thread Andy Shevchenko
On Mon, 2018-04-09 at 14:05 +0200, Petr Mladek wrote: > On Sat 2018-04-07 17:08:18, Andy Shevchenko wrote: > > On Thu, 2018-04-05 at 16:46 +0200, Petr Mladek wrote: > > > On Thu 2018-04-05 16:04:45, Andy Shevchenko wrote: > > > > On Wed, 2018-04-04 at 10:58 +0200, Petr Mladek wrote: > > > > > /*

Re: [PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-09 Thread Andy Shevchenko
On Mon, 2018-04-09 at 14:05 +0200, Petr Mladek wrote: > On Sat 2018-04-07 17:08:18, Andy Shevchenko wrote: > > On Thu, 2018-04-05 at 16:46 +0200, Petr Mladek wrote: > > > On Thu 2018-04-05 16:04:45, Andy Shevchenko wrote: > > > > On Wed, 2018-04-04 at 10:58 +0200, Petr Mladek wrote: > > > > > /*

Re: [PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-09 Thread Petr Mladek
On Sat 2018-04-07 17:08:18, Andy Shevchenko wrote: > On Thu, 2018-04-05 at 16:46 +0200, Petr Mladek wrote: > > On Thu 2018-04-05 16:04:45, Andy Shevchenko wrote: > > > On Wed, 2018-04-04 at 10:58 +0200, Petr Mladek wrote: > > > > restricted_pointer() pretends that it prints the address when > > >

Re: [PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-09 Thread Petr Mladek
On Sat 2018-04-07 17:08:18, Andy Shevchenko wrote: > On Thu, 2018-04-05 at 16:46 +0200, Petr Mladek wrote: > > On Thu 2018-04-05 16:04:45, Andy Shevchenko wrote: > > > On Wed, 2018-04-04 at 10:58 +0200, Petr Mladek wrote: > > > > restricted_pointer() pretends that it prints the address when > > >

Re: [PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-07 Thread Andy Shevchenko
On Thu, 2018-04-05 at 16:46 +0200, Petr Mladek wrote: > On Thu 2018-04-05 16:04:45, Andy Shevchenko wrote: > > On Wed, 2018-04-04 at 10:58 +0200, Petr Mladek wrote: > > > restricted_pointer() pretends that it prints the address when > > > kptr_restrict > > > is set to zero. But it is never called

Re: [PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-07 Thread Andy Shevchenko
On Thu, 2018-04-05 at 16:46 +0200, Petr Mladek wrote: > On Thu 2018-04-05 16:04:45, Andy Shevchenko wrote: > > On Wed, 2018-04-04 at 10:58 +0200, Petr Mladek wrote: > > > restricted_pointer() pretends that it prints the address when > > > kptr_restrict > > > is set to zero. But it is never called

Re: [PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-05 Thread Petr Mladek
On Thu 2018-04-05 16:04:45, Andy Shevchenko wrote: > On Wed, 2018-04-04 at 10:58 +0200, Petr Mladek wrote: > > restricted_pointer() pretends that it prints the address when > > kptr_restrict > > is set to zero. But it is never called in this situation. Instead, > > pointer() falls back to

Re: [PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-05 Thread Petr Mladek
On Thu 2018-04-05 16:04:45, Andy Shevchenko wrote: > On Wed, 2018-04-04 at 10:58 +0200, Petr Mladek wrote: > > restricted_pointer() pretends that it prints the address when > > kptr_restrict > > is set to zero. But it is never called in this situation. Instead, > > pointer() falls back to

Re: [PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-05 Thread Petr Mladek
On Thu 2018-04-05 08:10:14, Sergey Senozhatsky wrote: > On (04/04/18 10:58), Petr Mladek wrote: > > > > restricted_pointer() pretends that it prints the address when kptr_restrict > > is set to zero. But it is never called in this situation. Instead, > > pointer() falls back to ptr_to_id() and

Re: [PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-05 Thread Petr Mladek
On Thu 2018-04-05 08:10:14, Sergey Senozhatsky wrote: > On (04/04/18 10:58), Petr Mladek wrote: > > > > restricted_pointer() pretends that it prints the address when kptr_restrict > > is set to zero. But it is never called in this situation. Instead, > > pointer() falls back to ptr_to_id() and

Re: [PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-05 Thread Andy Shevchenko
On Wed, 2018-04-04 at 10:58 +0200, Petr Mladek wrote: > restricted_pointer() pretends that it prints the address when > kptr_restrict > is set to zero. But it is never called in this situation. Instead, > pointer() falls back to ptr_to_id() and hashes the pointer. > > This patch removes the

Re: [PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-05 Thread Andy Shevchenko
On Wed, 2018-04-04 at 10:58 +0200, Petr Mladek wrote: > restricted_pointer() pretends that it prints the address when > kptr_restrict > is set to zero. But it is never called in this situation. Instead, > pointer() falls back to ptr_to_id() and hashes the pointer. > > This patch removes the

Re: [PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-04 Thread Sergey Senozhatsky
On (04/04/18 10:58), Petr Mladek wrote: > > restricted_pointer() pretends that it prints the address when kptr_restrict > is set to zero. But it is never called in this situation. Instead, > pointer() falls back to ptr_to_id() and hashes the pointer. > > This patch removes the potential

Re: [PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-04 Thread Sergey Senozhatsky
On (04/04/18 10:58), Petr Mladek wrote: > > restricted_pointer() pretends that it prints the address when kptr_restrict > is set to zero. But it is never called in this situation. Instead, > pointer() falls back to ptr_to_id() and hashes the pointer. > > This patch removes the potential

[PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-04 Thread Petr Mladek
restricted_pointer() pretends that it prints the address when kptr_restrict is set to zero. But it is never called in this situation. Instead, pointer() falls back to ptr_to_id() and hashes the pointer. This patch removes the potential confusion. klp_restrict is checked only in

[PATCH v4 2/9] vsprintf: Consistent %pK handling for kptr_restrict == 0

2018-04-04 Thread Petr Mladek
restricted_pointer() pretends that it prints the address when kptr_restrict is set to zero. But it is never called in this situation. Instead, pointer() falls back to ptr_to_id() and hashes the pointer. This patch removes the potential confusion. klp_restrict is checked only in