Instead of parsing System.map, use kallsyms_lookup_name() to
get unexported symbols addresses at module loading time.
This lets mckernel work with kaslr enabled (it gets enabled by
default from el7.5 onwards)
Change-Id: Ie4349fc1145ebce44f37f1f40c16f9d75584074d
Probably only needed for recent system, see ihk's 3271b5e6 ("fix
compilation with recent glibc (cpu_set define change)")
The root of the problem really is that we rely on system headers for
mckernel that ought to be independent...
Change-Id: Ieb9a017e5a7697ad767087370ced7b615efc917e
vma is part of vmf and isn't needed, so type changed (see linux 11bac80
("mm, fs: reduce fault, [...] to take only vmf"))
Change-Id: I4c023e23c7e7416ad2df2dcc0698a0032e574e4c
See linux's commit 0ee931c4 ("mm: treewide: remove GFP_TEMPORARY
allocation flag") for a long explanation, but basically that flag
"is just cargo cult" and should be removed
Change-Id: I2147cd65b6b9ec509a72e11cc3abf1fe1561c10b
Similarily, pgoff << PAGE_SHIFT would need pgoff to be unsigned to fit,
but off_t is signed.
The reason for this shift was to truncate the offset argument to be
aligned to page boundaries, do that instead
Change-Id: I36c3de34b1834fdb0503942a6f3212e94986effd
Heavily inspired off linux kernel's dynamic debug:
* add a /sys/kernel/debug/dynamic_debug/control file
(accessible from linux side in /sys/class/mcos/mcos0/sys/kernel/debug/dynamic_debug/control)
* read from file to list debug statements (currently limited to 4k in size)
* write to file with '[file foo ][func bar ][line [x][-[y]]] [+-]p' to change values
Side effects:
* reindented all linker scripts, there is a new __verbose section
* added string function strpbrk
Change-Id: I36d7707274dcc3ecaf200075a31a2f0f76021059
The standard UNIX tool to get processes information, need to have the
process id inside /proc/<PID>/status.
Using ps without PID in /proc/<PID>/status gives :
PID TTY TIME CMD
2551 pts/0 00:00:00 bash
0 pts/0 00:00:00 exe
0 pts/0 00:00:00 exe
With this patch:
PID TTY TIME CMD
2551 pts/0 00:00:00 bash
11966 pts/0 00:00:00 exe
12619 pts/0 00:00:00 exe
Change-Id: Ic9d255cbef4d49e49bdaedcfc8e3545d9c144325
Some are important, e.g. the seemingly harmless braces around if with dprintf,
since that dprintf is defined as empty, will screw things up and grab the next
line
Change-Id: Ie5e1cf813178ad708ff42ae5e477fbc96034471c
search_free_space changed since this was implemented and the code is
no longer compatible
Looking at it again, the function is not used anywhere other than syscall.c
and the second function does not seem to fix anything specific so this
just removes the untested side.
Change-Id: If28d35ec4da083a40dc6936fcb21f05fb64e378a
Fujitsu: POSTK_DEBUG_ARCH_DEP_27
do_frees is allowed to be NULL only if free_addrs_count is 0, but that
is increased to account for the wakeup_desc itself before this failure
Change-Id: Iab33712c76ae452df7044558a12745a89adb47ac
Surplus refs on the linux side will not change anything, so spare
ourselves a message.
The final message will free all refs at once when the object is
destroyed.
Change-Id: Ie086b9dda663729962037c67e8233370509234a5
init_normal_area was mapping identity lookups (phys = virt) from 0,
leading to many undetected null pointer dereferences in init_pt (but
not in new process page tables leading to odd behaviour)
This also makes the code use the set_pt_large_page() function, cleaning
it up a bit
Change-Id: I22889031de26a7e48501b0eb4d453ca62e671835
This helps catching errors like accessing a field that no longer exists
in a debug print that wasn't compiled...
Change-Id: If6c862ea2b866f819195aae93c7fd68e610fe48e
Was done in x86_64 for fileobj in commit 249bda4aef ("fileobj: use
MCS locks for per-file page hash")
Change-Id: I61957de336b6657687803e6288afed9360a42032
GCC optimizes big switches with sse so we could clobber users floating
point registers when they would do a syscall
Reproducer:
```
#include <stdio.h>
#include <stdlib.h>
union num {
float f;
unsigned long long i;
};
#define WORKSIZE (1024 * 1024 * 32)
int main(int argc, char **argv) {
char *work = malloc(WORKSIZE);
char *fromaddr;
char sink;
union num r;
unsigned long long int offset;
r.f = drand48();
printf("r: %llx\n", (long long)r.i);
offset = (long long int)(r.f * (double)WORKSIZE);
fromaddr = work + offset;
printf("%e %llx %llx\n", r.f, offset, fromaddr);
sink = *fromaddr;
return 0;
}
```
Change-Id: I7bb0883ec8ef2f245ab98064e308025422afc115