Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
* Help:get_user_pages_remote - succeed on QEMU, Oops on Android 9 board
@ 2019-04-16 14:17 Lev Olshvang
  2019-04-16 15:33 ` Solved:: " Lev Olshvang
  0 siblings, 1 reply; 2+ messages in thread
From: Lev Olshvang @ 2019-04-16 14:17 UTC (permalink / raw)
  To: kernelnewbies, linux-il

[-- Attachment #1: Type: text/html, Size: 1544 bytes --]

<div xmlns="http://www.w3.org/1999/xhtml">Hello all,</div><div xmlns="http://www.w3.org/1999/xhtml"> </div><div xmlns="http://www.w3.org/1999/xhtml">I need to remap 1 page from user space to kernel and I use get_user_pages_remote for this purpose</div><div xmlns="http://www.w3.org/1999/xhtml"> </div><div xmlns="http://www.w3.org/1999/xhtml"><div>ret = get_user_pages_remote(tsk, tsk-&gt;mm, offset, 1,</div><div>                                    0,</div><div>                                    &amp;pinned_page, NULL);</div></div><div xmlns="http://www.w3.org/1999/xhtml"> </div><div xmlns="http://www.w3.org/1999/xhtml">Kernel is 4.9.88</div><div xmlns="http://www.w3.org/1999/xhtml">I compiled module for Arm Vertex board  and run it under  QEMU  with no problem</div><div xmlns="http://www.w3.org/1999/xhtml">But on Android 9  with this exactly kernel I got Oops:</div><div xmlns="http://www.w3.org/1999/xhtml"><div>Unable to handle kernel paging request at virtual address fe002000</div><div>pgd = d8c14000</div><div>[fe002000] *pgd=00000000</div><div>Internal error: Oops: 5 [#1] PREEMPT SMP ARM</div><div> </div><div>I checked config files  and did not find any difference( almost except balloon ) in memory related configs.  </div><div> </div><div>Does anybody have a clue what is a problem here?</div><div> </div><div>Regards,</div><div>Lev</div><div> </div></div><div xmlns="http://www.w3.org/1999/xhtml"> </div><div xmlns="http://www.w3.org/1999/xhtml"> </div>

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Solved:: Help:get_user_pages_remote - succeed on QEMU, Oops on Android 9 board
  2019-04-16 14:17 Help:get_user_pages_remote - succeed on QEMU, Oops on Android 9 board Lev Olshvang
@ 2019-04-16 15:33 ` " Lev Olshvang
  0 siblings, 0 replies; 2+ messages in thread
From: Lev Olshvang @ 2019-04-16 15:33 UTC (permalink / raw)
  To: kernelnewbies, linux-il

[-- Attachment #1: Type: text/html, Size: 1660 bytes --]

<div xmlns="http://www.w3.org/1999/xhtml"> </div><div xmlns="http://www.w3.org/1999/xhtml">The problem was how I convert received page address to kernel address. I need to do it with kmap()</div><div xmlns="http://www.w3.org/1999/xhtml">Now all works again</div><div xmlns="http://www.w3.org/1999/xhtml"> </div><div xmlns="http://www.w3.org/1999/xhtml"> </div><div xmlns="http://www.w3.org/1999/xhtml">16.04.2019, 17:17, "Lev Olshvang" &lt;levonshe@yandex.com&gt;:</div><blockquote xmlns="http://www.w3.org/1999/xhtml" type="cite"><div>Hello all,</div><div> </div><div>I need to remap 1 page from user space to kernel and I use get_user_pages_remote for this purpose</div><div> </div><div><div>ret = get_user_pages_remote(tsk, tsk-&gt;mm, offset, 1,</div><div>                                    0,</div><div>                                    &amp;pinned_page, NULL);</div></div><div> </div><div>Kernel is 4.9.88</div><div>I compiled module for Arm Vertex board  and run it under  QEMU  with no problem</div><div>But on Android 9  with this exactly kernel I got Oops:</div><div><div>Unable to handle kernel paging request at virtual address fe002000</div><div>pgd = d8c14000</div><div>[fe002000] *pgd=<span>00000000</span></div><div>Internal error: Oops: 5 [#1] PREEMPT SMP ARM</div><div> </div><div>I checked config files  and did not find any difference( almost except balloon ) in memory related configs.  </div><div> </div><div>Does anybody have a clue what is a problem here?</div><div> </div><div>Regards,</div><div>Lev</div><div> </div></div><div> </div><div> </div></blockquote>

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-16 14:17 Help:get_user_pages_remote - succeed on QEMU, Oops on Android 9 board Lev Olshvang
2019-04-16 15:33 ` Solved:: " Lev Olshvang

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org kernelnewbies@archiver.kernel.org
	public-inbox-index kernelnewbies


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/ public-inbox