All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller via Bugspray Bot <bugbot@kernel.org>
To: deller@gmx.de, linux-parisc@vger.kernel.org,
	 James.Bottomley@HansenPartnership.com, bugs@lists.linux.dev
Subject: Re: calling getcpu with misaligned address causes kernel panic
Date: Tue, 01 Oct 2024 16:05:07 +0000	[thread overview]
Message-ID: <20241001-b219339c2-998d00851129@bugzilla.kernel.org> (raw)
In-Reply-To: <20241001-b219339c0-15109b153aef@bugzilla.kernel.org>

Helge Deller writes via Kernel.org Bugzilla:

This *is* a bug in qemu.
When running on a physical box, strace shows that the kernel behaves correctly:

mmap2(NULL, 4096, PROT_READ, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xf9000000
getcpu(0xf9000000, 0xf9000001, NULL)    = -1 EFAULT (Bad address)
exit_group(-1)                          = ?
+++ exited with 255 +++

On an AMD64 box I get a segfault (which seems strange?):

mmap(NULL, 4096, PROT_READ, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0x7f2b62c73000
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x7f2b62c73000} ---
+++ killed by SIGSEGV +++
Segmentation fault

qemu-user works OK.

will try qemu-system soon.

View: https://bugzilla.kernel.org/show_bug.cgi?id=219339#c2
You can reply to this message to join the discussion.
-- 
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)


  parent reply	other threads:[~2024-10-01 16:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-01 15:00 calling getcpu with misaligned address causes kernel panic Colin Ian King via Bugspray Bot
2024-10-01 15:00 ` Colin Ian King via Bugspray Bot
2024-10-01 16:05 ` Helge Deller via Bugspray Bot [this message]
2024-10-01 17:45 ` Colin Ian King via Bugspray Bot
2024-10-01 22:20 ` Helge Deller via Bugspray Bot
2024-10-02  2:45 ` Helge Deller via Bugspray Bot
2024-10-08 20:20 ` Helge Deller via Bugspray Bot
2024-10-14 19:00 ` Helge Deller via Bugspray Bot
2024-10-15  9:15 ` Colin Ian King via Bugspray Bot

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=20241001-b219339c2-998d00851129@bugzilla.kernel.org \
    --to=bugbot@kernel.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=bugs@lists.linux.dev \
    --cc=deller@gmx.de \
    --cc=linux-parisc@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.