wok-current view broadcom-wl64/stuff/002-rdtscl.patch @ rev 25687
Up expat CVE-2024-28757
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Fri Mar 15 07:23:20 2024 +0000 (5 months ago) |
parents | |
children |
line source
1 Since Linux 4.3, rdtscl() is no longer available and native_read_tsc()
2 is renamed to rdtsc(). Move the macro contents in-line and call the
3 new function. References:
5 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=fe47ae6e1a5005b2e82f7eab57b5c3820453293a
6 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=4ea1636b04dbd66536fa387bae2eea463efc705b
8 diff -ru a/src/shared/linux_osl.c b/src/shared/linux_osl.c
9 --- a/src/shared/linux_osl.c 2015-09-19 01:47:15.000000000 +0300
10 +++ b/src/shared/linux_osl.c 2015-11-21 15:20:30.585902518 +0200
11 @@ -932,7 +932,11 @@
12 uint cycles;
14 #if defined(__i386__)
15 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
16 + cycles = (u32)rdtsc();
17 +#else
18 rdtscl(cycles);
19 +#endif
20 #else
21 cycles = 0;
22 #endif