From: Olaf Hering <olaf@aepfle.de>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: boris.ostrovsky@oracle.com, david.vrabel@citrix.com,
xen-devel@lists.xen.org
Subject: Re: identify a Xen PV domU to fix devmem_is_allowed
Date: Tue, 1 Mar 2016 17:23:14 +0100 [thread overview]
Message-ID: <20160301162314.GA7969@aepfle.de> (raw)
In-Reply-To: <20160229151000.GA17154@char.us.oracle.com>
On Mon, Feb 29, Konrad Rzeszutek Wilk wrote:
> .. A fix for what issue?
#include <unistd.h>
#include <stdio.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
int main(void)
{
unsigned long long *p;
int fd;
fd = open("/dev/mem", O_RDWR);
if (fd < 0) {
perror("/dev/mem");
return 1;
}
p = mmap(NULL, 4096, PROT_READ, MAP_PRIVATE, fd, 0);
if (p != MAP_FAILED) {
printf("p %p: %016llx\n", p, *p);
munmap(p, 4096);
}
close(fd);
return 0;
}
# ./t
[ 1627.491281] ------------[ cut here ]------------
[ 1627.491911] WARNING: CPU: 0 PID: 2004 at ../arch/x86/xen/multicalls.c:129 xen_mc_flush+0x1c5/0x1d0()
[ 1627.492739] Modules linked in: dm_mod af_packet iscsi_ibft iscsi_boot_sysfs coretemp crct10dif_pclmul joydev crc32_pclmul crc32c_intel xen_kbdfront xen_fbfront fb_sys_fops syscopyarea sysfillrect sysimgblt xen_netfront aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd pcspkr xen_blkfront sg
[ 1627.494511] CPU: 0 PID: 2004 Comm: t Tainted: G W 4.4.2-1-default #1
[ 1627.494958] ffffffff81a47bf1 ffff88000240fc10 ffffffff8137eb99 0000000000000000
[ 1627.495417] ffff88000240fc48 ffffffff8107c552 ffff88003f80a2e0 0000000000000001
[ 1627.495881] 00007f53e5e81000 0000000000000000 00007f53e5e81000 ffff88000240fc58
[ 1627.496365] Call Trace:
[ 1627.496834] [<ffffffff8101a095>] try_stack_unwind+0x175/0x190
[ 1627.497315] [<ffffffff81018fe9>] dump_trace+0x69/0x3a0
[ 1627.497792] [<ffffffff8101a0fb>] show_trace_log_lvl+0x4b/0x60
[ 1627.498274] [<ffffffff8101942c>] show_stack_log_lvl+0x10c/0x180
[ 1627.498751] [<ffffffff8101a195>] show_stack+0x25/0x50
[ 1627.499225] [<ffffffff8137eb99>] dump_stack+0x4b/0x72
[ 1627.499695] [<ffffffff8107c552>] warn_slowpath_common+0x82/0xc0
[ 1627.500179] [<ffffffff8107c64a>] warn_slowpath_null+0x1a/0x20
[ 1627.500652] [<ffffffff81006b05>] xen_mc_flush+0x1c5/0x1d0
[ 1627.501126] [<ffffffff81007365>] xen_leave_lazy_mmu+0x15/0x30
[ 1627.501599] [<ffffffff811b584d>] remap_pfn_range+0x34d/0x430
[ 1627.502078] [<ffffffff8149518f>] mmap_mem+0xcf/0x120
[ 1627.502552] [<ffffffff811bbd37>] mmap_region+0x3f7/0x680
[ 1627.503025] [<ffffffff811bc2f3>] do_mmap+0x333/0x420
[ 1627.503495] [<ffffffff811a28c1>] vm_mmap_pgoff+0x91/0xc0
[ 1627.503961] [<ffffffff811ba6cf>] SyS_mmap_pgoff+0x19f/0x260
[ 1627.504437] [<ffffffff8101c0db>] SyS_mmap+0x1b/0x30
[ 1627.504899] [<ffffffff816a96f6>] entry_SYSCALL_64_fastpath+0x16/0x75
[ 1627.506910] DWARF2 unwinder stuck at entry_SYSCALL_64_fastpath+0x16/0x75
[ 1627.507380]
[ 1627.507841] Leftover inexact backtrace:
[ 1627.507841]
[ 1627.508736] ---[ end trace 3451e822401d3468 ]---
[ 1627.509990] audit: type=1701 audit(1456849316.138:97): auid=0 uid=0 gid=0 ses=1 pid=2004 comm="t" exe="/root/t" sig=7
Bus error (core dumped)
Olaf
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-03-01 16:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-29 10:28 identify a Xen PV domU to fix devmem_is_allowed Olaf Hering
2016-02-29 15:10 ` Konrad Rzeszutek Wilk
2016-02-29 15:29 ` Olaf Hering
2016-02-29 18:32 ` Boris Ostrovsky
2016-03-01 15:14 ` Olaf Hering
2016-03-01 10:38 ` Jan Beulich
2016-03-01 14:34 ` Konrad Rzeszutek Wilk
2016-03-01 14:45 ` Boris Ostrovsky
2016-03-15 16:57 ` Olaf Hering
2016-03-15 18:56 ` Boris Ostrovsky
2016-03-21 21:29 ` Boris Ostrovsky
2016-03-22 18:37 ` Boris Ostrovsky
2016-03-23 8:28 ` Olaf Hering
2016-06-06 21:17 ` Olaf Hering
2016-03-01 16:23 ` Olaf Hering [this message]
2016-03-01 15:29 ` David Vrabel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160301162314.GA7969@aepfle.de \
--to=olaf@aepfle.de \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).