Skip to content

Commit

Permalink
Squash some warnings
Browse files Browse the repository at this point in the history
arch_prctl was never useful for anything, _GNU_SOURCE is needed for
pthread_setname_np, no one uses vdso-transplant so it's cool with being
exploited through argv, I'll get to tmpfs_umount one day
  • Loading branch information
tbodt committed May 30, 2020
1 parent 3775204 commit fcb0599
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion fs/tmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ static void tmpfs_unmount_tree(struct tmp_inode *tree) {
}
#endif

static int tmpfs_umount(struct mount *mount) {
static int tmpfs_umount(struct mount *UNUSED(mount)) {
// big fat fuckin TODO
// struct tmp_inode *root = mount->data;
// tmpfs_unmount_tree(root);
Expand Down
1 change: 1 addition & 0 deletions kernel/task.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define _GNU_SOURCE
#include <pthread.h>
#include <stdlib.h>
#include <string.h>
Expand Down
6 changes: 0 additions & 6 deletions tools/ptutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ long trycall(long res, const char *msg) {
return res;
}

// wow i'm sooo bleeding edge
static int arch_prctl(int code, unsigned long arg) {
return syscall(SYS_arch_prctl, code, arg);
}

int start_tracee(int at, const char *path, char *const argv[], char *const envp[]) {
// shut off aslr
int persona = personality(0xffffffff);
Expand All @@ -40,7 +35,6 @@ int start_tracee(int at, const char *path, char *const argv[], char *const envp[
// child
// enable segfaulting on rdtsc and cpuid
trycall(prctl(PR_SET_TSC, PR_TSC_SIGSEGV), "rdtsc faulting");
/* trycall(arch_prctl(ARCH_SET_CPUID, 0), "cpuid faulting"); */
trycall(ptrace(PTRACE_TRACEME, 0, NULL, NULL), "ptrace traceme");
// get rid of signal handlers
for (int sig = 0; sig < SIGRTMIN - 1; sig++)
Expand Down
2 changes: 1 addition & 1 deletion tools/vdso-transplant-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "ptutil.h"
#include "transplant.h"

int main(int argc, char *const argv[]) {
int main(int UNUSED(argc), char *const argv[]) {
char *const envp[] = {NULL};
int pid = start_tracee(AT_FDCWD, argv[2], argv + 2, envp);

Expand Down

0 comments on commit fcb0599

Please sign in to comment.