[osv-dev] [PATCH] aarch64: fix zfs support

2022-05-03 Thread Waldemar Kozaczuk
This patch fixes ZFS support on aarch64. As the issue #1131 explains, the ZFS page scanner logic clears the access flag of PTEs of relevant memory-mapped chunks of the files. On Intel, the cpu automatically sets the flags on first access (read or write) to those pages of memory. But on ARM it may

[osv-dev] [PATCH] aarch64: implement signal handler

2022-05-03 Thread Waldemar Kozaczuk
This patch implements the signal handling on aarch64. I will not be repeating the details of what it changes and why as it is quite well explained in the code changes. But in essence, this patch updates the build_signal_frame() which I believe was based on the x86_64 version of it with the

[osv-dev] [PATCH] aarch64: force TLB flush when mprotect changes permission

2022-05-03 Thread Waldemar Kozaczuk
When testing the tst-map.cc and tst-elf-permissions.cc with the upcoming patch to add signals support on aarch64, I noticed that sometimes they would kind of "hang" for a while and eventually complete successfully. This would happen especially when running in non-SMP mode (1 CPU). After more

[osv-dev] [PATCH] aarch64: build tst-elf-permissions.cc with correctly named sections

2022-05-03 Thread Waldemar Kozaczuk
The assembler on aarch64 uses different characters - '//' - for the end of line comment (see https://sourceware.org/binutils/docs-2.26/as/i386_002dChars.html#i386_002dChars and https://sourceware.org/binutils/docs-2.26/as/AArch64_002dChars.html#AArch64_002dChars respectively). So we add the

[osv-dev] [PATCH] lockfree ring_spsc: make counter type a template parameter

2022-05-03 Thread Waldemar Kozaczuk
This patch does not change the ring_spsc template in any significant way but merely makes the counter type (of _begin and _end) a parameter. This allows us to use smaller type - unsigned short (2 bytes) - in the unit test tst-ring-spsc-wraparound.cc to make it execute more rapidly. Before this