linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michael Schmitz <schmitzmic@gmail.com>
To: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>,
	linux-m68k@lists.linux-m68k.org, linux-mm@kvack.org,
	linux-mtd@lists.infradead.org
Cc: Greg Ungerer <gerg@linux-m68k.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Christoph Hellwig <hch@infradead.org>,
	wbx@openadk.org
Subject: Re: m68k 54418 fails to execute user space
Date: Wed, 26 Jun 2024 13:56:11 +1200	[thread overview]
Message-ID: <7fb2988d-ab89-405f-8cf1-edcdd2196376@gmail.com> (raw)
In-Reply-To: <735e19b6-3747-417f-ba5b-1a7da137a3a3@yoseli.org>

Jean-Michel,

On 24/06/24 20:56, Jean-Michel Hautbois wrote:
>
> When I printk the do_page_fault first debug, I get for the first call 
> to ls:
> bash-5.2# ls
> [   14.700000] do page fault:
> [   14.700000] regs->sr=0x0, regs->pc=0x70069ee6, address=0x70069ee6, 
> 0, (ptrval)

Page not present, read fault. Please disable obfuscation of kernel 
pointer addresses by printk. Maybe also disable address space 
randomization while debugging this.

> This call works almost fine (I still have the assert failed: 
> folio->private != NULL issue).
>
> And when I call it a second time, I get:
> bash-5.2# ls
> [   19.820000] do page fault:
> [   19.820000] regs->sr=0x0, regs->pc=0x6011d65a, address=0x700e2004, 
> 2, (ptrval)

Page not present, write fault.

It would be helpful if you could get a dump of /proc/1/maps before the 
execve() syscall in your helloworld init replacement. That might confirm 
all these addresses are legit (assuming mappings survive across 
execve(), that is), and what they correspond to.

>
> The address corresponds to the defined zone ELF_ET_DYN_BASE as I set 
> it to 0x70000000.
>
> regs->pc is not the same as the address. It might be unrelevant, but 
> any help is appreciated to understand the process behind :-).
>
> I keep digging, and I am in the asm part which fears me a bit !

I don't see that you'd need to look at any asm code here.

Cheers,

     Michael

>
> Thanks !
> JM


  reply	other threads:[~2024-06-26  1:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19 12:29 Jean-Michel Hautbois
2024-06-24  8:56 ` Jean-Michel Hautbois
2024-06-26  1:56   ` Michael Schmitz [this message]
2024-06-26  5:35     ` Jean-Michel Hautbois
2024-06-26  7:01     ` Jean-Michel Hautbois
2024-06-26 13:28     ` Jean-Michel Hautbois
2024-06-26 19:36       ` Michael Schmitz
2024-06-26 20:29         ` Jean-Michel Hautbois
2024-06-27 12:36         ` Jean-Michel Hautbois
2024-06-27 14:46           ` Greg Ungerer
2024-06-27 14:52             ` Jean-Michel Hautbois
2024-06-27 23:58           ` Michael Schmitz
2024-06-28  7:24             ` Jean-Michel Hautbois
2024-06-28  7:48               ` Michael Schmitz
2024-06-28  8:02                 ` Jean-Michel Hautbois
2024-06-28 11:25                 ` Jean-Michel Hautbois
2024-06-29  3:41                   ` Michael Schmitz
2024-06-29  7:57                     ` Jean-Michel Hautbois
     [not found]                     ` <87msn4z15c.fsf@linux-m68k.org>
2024-06-29  8:01                       ` Michael Schmitz
2024-06-30 22:35                 ` Greg Ungerer
2024-07-01  5:47                   ` Jean-Michel Hautbois
2024-07-01  8:01                   ` Andreas Schwab

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=7fb2988d-ab89-405f-8cf1-edcdd2196376@gmail.com \
    --to=schmitzmic@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=gerg@linux-m68k.org \
    --cc=hch@infradead.org \
    --cc=jeanmichel.hautbois@yoseli.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=wbx@openadk.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