Merge branch 'for-linus-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Pull UML updates from Richard Weinberger: "Mostly fixes for UML: - First round of fixes for PTRACE_GETRESET/SETREGSET - A printf vs printk cleanup - Minor improvements" * 'for-linus-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: Correctly check for PTRACE_GETRESET/SETREGSET um: v2: Use generic NOTES macro um: Add kerneldoc for userspace_tramp() and start_userspace() um: Add kerneldoc for segv_handler um: stub-data.h: remove superfluous include um: userspace - be more verbose in ptrace set regs error um: add dummy ioremap and iounmap functions um: Allow building and running on older hosts um: Avoid longjmp/setjmp symbol clashes with libpthread.a um: console: Ignore console= option um: Use os_warn to print out pre-boot warning/error messages um: Add os_warn() for pre-boot warning/error messages um: Use os_info for the messages on normal path um: Add os_info() for pre-boot information messages um: Use printk instead of printf in make_uml_dir
This commit is contained in:
@@ -89,8 +89,8 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end,
|
||||
offset = uml_reserved - uml_physmem;
|
||||
map_size = len - offset;
|
||||
if(map_size <= 0) {
|
||||
printf("Too few physical memory! Needed=%d, given=%d\n",
|
||||
offset, len);
|
||||
os_warn("Too few physical memory! Needed=%lu, given=%lu\n",
|
||||
offset, len);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -99,9 +99,9 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end,
|
||||
err = os_map_memory((void *) uml_reserved, physmem_fd, offset,
|
||||
map_size, 1, 1, 1);
|
||||
if (err < 0) {
|
||||
printf("setup_physmem - mapping %ld bytes of memory at 0x%p "
|
||||
"failed - errno = %d\n", map_size,
|
||||
(void *) uml_reserved, err);
|
||||
os_warn("setup_physmem - mapping %ld bytes of memory at 0x%p "
|
||||
"failed - errno = %d\n", map_size,
|
||||
(void *) uml_reserved, err);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@@ -183,6 +183,16 @@ void fatal_sigsegv(void)
|
||||
os_dump_core();
|
||||
}
|
||||
|
||||
/**
|
||||
* segv_handler() - the SIGSEGV handler
|
||||
* @sig: the signal number
|
||||
* @unused_si: the signal info struct; unused in this handler
|
||||
* @regs: the ptrace register information
|
||||
*
|
||||
* The handler first extracts the faultinfo from the UML ptrace regs struct.
|
||||
* If the userfault did not happen in an UML userspace process, bad_segv is called.
|
||||
* Otherwise the signal did happen in a cloned userspace process, handle it.
|
||||
*/
|
||||
void segv_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs)
|
||||
{
|
||||
struct faultinfo * fi = UPT_FAULTINFO(regs);
|
||||
|
@@ -34,7 +34,7 @@ static char __initdata command_line[COMMAND_LINE_SIZE] = { 0 };
|
||||
static void __init add_arg(char *arg)
|
||||
{
|
||||
if (strlen(command_line) + strlen(arg) + 1 > COMMAND_LINE_SIZE) {
|
||||
printf("add_arg: Too many command line arguments!\n");
|
||||
os_warn("add_arg: Too many command line arguments!\n");
|
||||
exit(1);
|
||||
}
|
||||
if (strlen(command_line) > 0)
|
||||
@@ -120,6 +120,7 @@ static const char *usage_string =
|
||||
|
||||
static int __init uml_version_setup(char *line, int *add)
|
||||
{
|
||||
/* Explicitly use printf() to show version in stdout */
|
||||
printf("%s\n", init_utsname()->release);
|
||||
exit(0);
|
||||
|
||||
@@ -148,8 +149,8 @@ __uml_setup("root=", uml_root_setup,
|
||||
|
||||
static int __init no_skas_debug_setup(char *line, int *add)
|
||||
{
|
||||
printf("'debug' is not necessary to gdb UML in skas mode - run \n");
|
||||
printf("'gdb linux'\n");
|
||||
os_warn("'debug' is not necessary to gdb UML in skas mode - run\n");
|
||||
os_warn("'gdb linux'\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -165,6 +166,7 @@ static int __init Usage(char *line, int *add)
|
||||
|
||||
printf(usage_string, init_utsname()->release);
|
||||
p = &__uml_help_start;
|
||||
/* Explicitly use printf() to show help in stdout */
|
||||
while (p < &__uml_help_end) {
|
||||
printf("%s", *p);
|
||||
p++;
|
||||
@@ -283,8 +285,8 @@ int __init linux_main(int argc, char **argv)
|
||||
|
||||
diff = UML_ROUND_UP(brk_start) - UML_ROUND_UP(&_end);
|
||||
if (diff > 1024 * 1024) {
|
||||
printf("Adding %ld bytes to physical memory to account for "
|
||||
"exec-shield gap\n", diff);
|
||||
os_info("Adding %ld bytes to physical memory to account for "
|
||||
"exec-shield gap\n", diff);
|
||||
physmem_size += UML_ROUND_UP(brk_start) - UML_ROUND_UP(&_end);
|
||||
}
|
||||
|
||||
@@ -324,8 +326,8 @@ int __init linux_main(int argc, char **argv)
|
||||
end_vm = start_vm + virtmem_size;
|
||||
|
||||
if (virtmem_size < physmem_size)
|
||||
printf("Kernel virtual memory size shrunk to %lu bytes\n",
|
||||
virtmem_size);
|
||||
os_info("Kernel virtual memory size shrunk to %lu bytes\n",
|
||||
virtmem_size);
|
||||
|
||||
os_flush_stdout();
|
||||
|
||||
|
@@ -16,14 +16,14 @@ static int __init set_umid_arg(char *name, int *add)
|
||||
int err;
|
||||
|
||||
if (umid_inited) {
|
||||
printf("umid already set\n");
|
||||
os_warn("umid already set\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
*add = 0;
|
||||
err = set_umid(name);
|
||||
if (err == -EEXIST)
|
||||
printf("umid '%s' already in use\n", name);
|
||||
os_warn("umid '%s' already in use\n", name);
|
||||
else if (!err)
|
||||
umid_inited = 1;
|
||||
|
||||
|
Reference in New Issue
Block a user