37 Commits

Author SHA1 Message Date
Andreas Abel
217c2c3307 compatibility with recent kernels 2025-03-04 00:43:51 +01:00
Andreas Abel
faf75236ca ranges 2023-03-12 13:48:05 +01:00
Cathy Zhang
e13f0aee33 fix kernel mode crashing in Ubuntu 22.04
While build nanoBench kernel module in Ubuntu 22.04, gcc is with
-mfunction-return=thunk-extern as default option. According to chapter
6.1.1 JMP2RET in the following reference:
https://www.amd.com/system/files/documents/\
technical-guidance-for-mitigating-branch-type-confusion.pdf
all 'ret' instructions are consolidated into a single piece of code.
Instead of functions ending with a 'ret' instruction, they instead end
with "jump __x86_return_thunk".

Since a 'jmp' instruction is provided instead of 'ret' at the end of
each function, it cause functions like create_runtime_code() copy much
more assembler code into runtime_code memory than it should during
runtime. Memory protection fault happens finally while running.

To address the above issue, option -mfunction-return=keep is provided
for kernel mode to overwrite the gcc default behavior in Ubuntu 22.04.
This can ensure function has 'ret' instruction generated.

Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
2022-12-06 21:48:56 -08:00
Andreas Abel
b0d03d6ad7 memory initialization 2022-08-13 20:56:54 +02:00
Andreas Abel
d3d4060be3 cycle-by-cycle measurements 2022-01-21 00:12:50 +01:00
Andreas Abel
12381d0324 format specifiers 2022-01-13 01:13:40 +01:00
Andreas Abel
40e764db45 refactoring 2022-01-12 23:21:00 +01:00
Andreas Abel
3330672330 improved counter configuration 2022-01-12 17:11:46 +01:00
Andreas Abel
3e48d9d667 support for Alder Lake 2021-12-22 20:59:08 +01:00
Andreas Abel
632cbff848 interrupts 2021-12-22 20:43:57 +01:00
Andreas Abel
81914f9166 APIC interrupts 2021-12-11 00:51:31 +01:00
Andreas Abel
f09bd19032 compatibility with kernel 5.16 2021-12-08 23:36:28 +01:00
Andreas Abel
7a76d0e82d fix warnings 2021-11-26 02:10:05 +01:00
Andreas Abel
8435127296 print addresses 2021-11-15 20:44:59 +01:00
Andreas Abel
a69f6e5596 bool 2021-11-02 17:25:33 +01:00
Andreas Abel
04bfd842a4 make fixed counters optional 2021-10-29 17:32:59 +02:00
Andreas Abel
645d7c7b92 modified programmable perf. ctr. configuration 2021-10-28 20:29:26 +02:00
Andreas Abel
5df54f1d1d support for Tiger Lake 2021-03-09 22:31:05 +01:00
Andreas Kogler
ab784585a4 hotfix for kernel version 5.8 2021-03-04 16:19:02 +01:00
Andreas Abel
4971d6c23a added -df option 2021-03-03 15:47:23 +01:00
Andreas Abel
6d9e1f9e85 late_init option 2020-12-08 20:34:21 +01:00
Andreas Abel
ef556c41a3 added no_normalization option 2020-12-08 17:17:29 +01:00
Oleksii Oleksenko
976902dee1 Aggregation function MAX 2020-06-25 16:06:57 +02:00
Said Musaev
19e9f34cdf Added support for kernel >= 5.4 2020-05-27 18:28:45 +02:00
Andreas Abel
b40b898de8 code alignment 2020-05-11 23:39:33 +02:00
Andreas Abel
61ffa56d6d compatibility with kernel 4.4 2020-01-17 16:09:42 +01:00
Andreas Abel
3334ea3cca code offset 2019-12-30 22:39:30 +01:00
Andreas Abel
d1863495b0 minor fix 2019-10-24 00:03:49 +02:00
Andreas Abel
f3b31d391c starting/stopping counters 2019-09-24 14:31:47 +02:00
Andreas Abel
894826e214 fixing Makefile 2019-08-14 16:20:38 +02:00
Andreas Abel
3588b20e52 various improvements 2019-08-09 18:10:12 +02:00
Andreas Abel
de6f3606c3 support for huge pages 2019-03-28 21:33:27 +01:00
Andreas Abel
1f9c1f2321 use different memory areas for R14, RBP, etc. 2019-03-25 15:08:39 +01:00
Andreas Abel
fe6cc1c675 restore OF flag 2019-03-06 17:12:10 +01:00
Anthony Wharton
0c4e6b351e Add check for linux-header in kernel Makefile 2019-02-21 15:48:11 +00:00
Andreas Abel
52c7c22141 adding license 2019-02-20 16:02:56 +01:00
Andreas Abel
a01b9742c7 Initial commit 2019-02-20 14:57:43 +01:00