- arm64: Get TSC corresponding to boot time from IHK.
- x86_64: Calculate the current time using vdso.
Refs: #1186
Fujitsu: POSTK_DEBUG_ARCH_DEP_52
Change-Id: I293ba4bbe5390d50dea44b8a5b7471f59237daff
user code also needs these defines; there was a hard-coded
definition left out from debugging that didn't get cleaned up
Change-Id: I951fcd6a3d6bc1d1f1c3e897058908167520f7bc
the application processor trampoline needs the trampoline physical
address to be mapped for the few instructions between loading the
page table and jumping to normal memory area; setup a new pt for them.
Also make it use its stack where it needs to be directly.
With that, x86 can finally remove the 0 page from its init mapping
Change-Id: Iab3f33a2ed22570eeb47b5ab6e068c9a17c25413
The attribute would impose 64-bytes alignment that we do not
respect later because the whole structures (e.g. process/thread)
are allocated at 32bytes boundaries with kmalloc
These are however justified for performance reason as we do not want
them on same page cache line, so just accept slower performance for
UBSAN only
Change-Id: Ia28968257675b7ae97b0391471986e6bf6485b7b
sprintf is implemented as snprintf(..., INT_MAX, ...) which will overflow
the argument pointer for the end, then fix the end to be -1.
This technically works but we know the actual buffer size in all these
call sites, might as well do this properly
Change-Id: I807d09f46a0221f539063fda515e1c504e658d40
A signed integer cannot be shifted in a way that will flip the
sign bit; make such arguments unsigned to be safe
Change-Id: Iafc060f98f899ae3ffb876ba22fdd6183fbb6e57
The linker maps parts of libs with different access flags,
so we cannot prepopulate the whole file.
[dominique.martinet@cea.fr: moved min and friends in compiler.h]
Change-Id: Ifbeddc0908699099cfae5ce9cc2adc578221db31
vmf_insert_pfn got added as a wrapper around vm_insert_pfn in 4.17
1c8f422059ae5da ("mm: change return type to vm_fault_t") and totally
replaced the later in 4.20 ae2b01f37044c ("mm: remove vm_insert_pfn()")
Compare with 4.18 here specifically to avoid troubles when rhel
backports this change later, and avoid adding a rhel version check down
the road.
Change-Id: Ibf108e2fb6f1199f89cde6a7973f4eb55447260b
This fix is rejected because it only makes the setfsuid test in ostest
pass and doesn't fix the other issues including the one in which file
I/O could be done with the old fsuid because an mcexec thread with an
arbitrary tid could handle the system-call offload request.
Explanation of the rejected fix:
setfsuid() proceeds as follows:
1. McKernel asks mcexec for __NR_setfsuid (set)
2. mcexec calls setfsuid, reports the id to McKernel
3. McKernel asks mcexec for __NR_setfsuid (get)
4. mcexec calls mcexec_getcred(), reports the id to Mckernel
5. McKernel sets proc->fsuid to the obtained value
tid of mcexec on the 2nd and 4th step could be different. So this
fix lets mcexec report its tid on the 2nd step and McKernel specify
it in the 3rd step.
Change-Id: Id5cfeed18c64430d576a56e961bbca1ecb2e39ad
Fujitsu: POSTK_DEBUG_TEMP_FIX_45
The original fujitsu code added a whole new ihk_mc_perfctr_stop_first
function, duplicating a lot of code - add a flag to existing function
instead.
Change-Id: Ic9ce0236d68f967ff72cf88e5d9f1bda5c98aa1b
Fujitsu: POSTK_DEBUG_ARCH_DEP_107
finalize_process().
The process of making a child process zombie and the process of setting
the parent of the child process to process ID 1 are excluded.
Refs: #1257
Change-Id: Ic95d4d8ee92d6a4a63847e5eda20ec1ba92566ac
Fix that process will remain even if signal is received between PPD
registration and release_handler registration.
Refs: #1201
Fujitsu: POSTK_DEBUG_TEMP_FIX_64
Change-Id: I571781963578df8cedb327f19298f595cfb137a3
Since interrupts are disabled on panic, linux cannot reset a
panic'd core when NMI are disabled (for e.g. mcreboot/mcstop)
Just always offline it, so linux can get it back
Change-Id: If8107172375f2924e02bd4c36e24645ec38a8999
We need to separate the two because the heap of a PIE is created in
the area to which it is mapped.
Related commits:
b1309a5d: PIE is mapped at map_end instead of at
user_start
c4219655: Interpreter is mapped to map_start to make a
system call that dereferences a NULL pointer fail
[dominique.martinet@cea.fr: Also add ULONG_MAX and friend macroes,
used for data_min]
[ken.sato.ty@hitachi-solutions.com: fix execve]
Change-Id: I8ecaf22b7965090ab67bebece57c68283ba23664
Add the following patterns of symlinks:
- /sys/bus/cpu/drivers/processor/cpu*
- /sys/bus/node/devices/node*
And slightly change how /sys/devices/system/cpu/cpu*/node* are created
to avoid duplicate lookups
Change-Id: Id94a4d157da06d75f6bd450d5bd9a9e7709a1414
Submodule check used to match any file containing submodule name (e.g.
lib/include/ihk/foo would match ihk and incorrectly be identified as
a submodule change) -- properly check for full name with anchors instead
Change-Id: Ib4330aec97e9da713cd3ab9e791962f2e0c8d396
mcoverlayfs has a high maintenance burden and does not work on rhel8's 4.18
kernel (while it works on vanilla 4.18...); instead of debugging this further
time is better spent making it independent from overlayfs.
Change-Id: I7454ae95b0fbb3373c256aa2fd83cdfec466c009