[PATCH] ARM: tls: remove covert channel via TPIDRURW
Michał Mirosław
mirqus at gmail.com
Mon Jan 16 13:14:27 EST 2012
2012/1/16 Will Deacon <will.deacon at arm.com>:
> TPIDRURW is a user read/write register forming part of the group of
> thread registers in more recent versions of the ARM architecture (~v6+).
>
> Currently, the kernel does not touch this register, which allows tasks
> to communicate covertly by reading and writing to the register without
> context-switching affecting its contents.
>
> This patch clears TPIDRURW when TPIDRURO is updated via the set_tls
> macro, which is called directly from __switch_to. Since the current
> behaviour makes the register useless to userspace as far as thread
> pointers are concerned, simply clearing the register (rather than saving
> and restoring it) will not cause any problems to userspace.
So why not fix it instead of leaving it useless?
Best Regards,
Michał Mirosław
More information about the linux-arm-kernel
mailing list