# \[PATCH 06/27\] kernel: Define gettimeofday vdso common code

- From: Vincenzo Frascino \<vincenzo.frascino@arm.com\>
- Date: 2018-11-13 10:24:22 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2018/11/8774556
- Thread: https://ratatoskr.run/linux-arm-kernel/2018/11/8774438/t.md

```text

On 10/11/2018 16:18, Arnd Bergmann wrote:
> On 11/9/18, Vincenzo Frascino [ref] wrote:
>> In the last few years we assisted to an explosion of vdso
>> implementations that mostly share similar code.
>>
>> This patch tries to unify the gettimeofday vdso implementation
>> introducing lib/vdso. The code contained in this library can
>> ideally be reused by all the architectures avoiding, where
>> possible, code duplication.
>>
>> In doing so, tries to maintain the performances using inlining as much
>> as possible and consequently reduces the surface for ROP type of attacks.
>>
>> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> 
> I just noticed that this new version misses some of the cleanups
> that Thomas recently did in the x86 version, e.g. f3e839384164
> ("x86/vdso: Replace the clockid switch case").
> 
> I haven't looked at all the details, but I'd suggest using the latest
> x86 code as a base.
> 

Ok, I will have a look at Thomas' work. Thanks for pointing this out. 

>         Arnd
> 

-- 
Regards,
Vincenzo
```
