Re: [PATCH] x86/uaccess: Remove unused __addr_ok() macro

From: Linus Torvalds
Date: Mon Feb 25 2019 - 14:21:04 EST


On Mon, Feb 25, 2019 at 11:11 AM Borislav Petkov <bp@xxxxxxxxx> wrote:
>
> This was caught while staring at the whole {set,get}_fs() machinery.

Heh.

You should probably have researched _when_ it became unused.

That seems to have happened in commit 5723aa993d83 ("x86: use the new
generic strnlen_user() function") which removed the single user from
the x86-32 version of strnlen_user(), which used to have

unsigned long mask = -__addr_ok(s);

in it.

Way back in 2012.

Ack.

Linus