<div class="__aliyun_email_body_block"><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Hi Dave,</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">When tring to debug a kernel core file generated from Debian 9.2 + 4.9 kernel with base address randomized (this core is create for a qemu vm), it gives the error as:</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">WARNING: cannot determine physical base address: defaulting to 0<br ><br >GNU gdb (GDB) 7.6<br >Copyright (C) 2013 Free Software Foundation, Inc.<br >License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html><br >This is free software: you are free to change and redistribute it.<br >There is NO WARRANTY, to the extent permitted by law.  Type "show copying"<br >and "show warranty" for details.<br >This GDB was configured as "x86_64-unknown-linux-gnu"...<br ><br >WARNING: failed to init kexec backup region<br >WARNING: cannot read linux_banner string<br ></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Taking a look at the code around x86_64_virt_phys_base(), it determines phys_base by searching around machdep->machspec->phys_base(in my case it's 0) +/-16MB for banner string at banner string offset (get from symbol). However, with base address randomized, the real physical address could be far from 0 (or virtual address 0xffffffff80000000). Therefore, -16MB/+16MB is not enough especially for machine with large ram . I increased it to 0xFFFFF00000 for my 256g core file and it works.</span></div><div  style="clear:both;"><br ></div><div  style="clear:both;">-        for (phys = (ulong)(-MEGABYTES(16)); phys != MEGABYTES(16+1);</div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">+       for (phys = (ulong)(-MEGABYTES(32)); phys != 0xFFFFF00000;<br >             phys += MEGABYTES(1)) {<br >                if (readmem(linux_banner_phys + phys, PHYSADDR, buf,<br >                    strlen("Linux version"), "linux_banner search",<br >                    QUIET|RETURN_ON_ERROR) && STRNEQ(buf, "Linux version")) {<br >                        if (CRASHDEBUG(1))<br >                                fprintf(fp,<br >                                    "virtual dump phys_base: %lx %s\n", phys,<br >                                        machdep->machspec->phys_base != phys ?<br >                                        "override" : "");<br >                        machdep->machspec->phys_base = phys;<br >                        return TRUE;<br >                }<br >        }</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Please feel free to let me know if you need sample dumps to verify. Thx.</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Regards,</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Ran</span></div></div>