<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 8, 2018 at 8:43 AM, Ram Pai <span dir="ltr"><<a href="mailto:linuxram@us.ibm.com" target="_blank">linuxram@us.ibm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin-top:0px;margin-bottom:0px"><span class="gmail-">On Wed, Mar 07, 2018 at 04:09:06PM +0800, Li Wang wrote:<br>
> Hi,<br>
><br>
> ltp/mprotect04[1] crashed by SEGV_PKUERR on ppc64(LPAR on P730, Power 8<br>
> 8247-22L) with kernel-v4.16.0-rc4.<br>
> 10000000-10020000 r-xp 00000000 fd:00 167223 mprotect04<br>
> 10020000-10030000 r--p 00010000 fd:00 167223 mprotect04<br>
> 10030000-10040000 rw-p 00020000 fd:00 167223 mprotect04<br>
> 1001a380000-1001a3b0000 rw-p 00000000 00:00 0 [heap]<br>
> 7fffa6c60000-7fffa6c80000 --xp 00000000 00:00 0 <br>
> &exec_func = 0x10030170<br>
> &func = 0x7fffa6c60170<br>
><br>
> While perform "(*func)();" we get the<br>
> segmentation fault.<br>
> <br>
> strace log:<br>
> -------------------<br>
> mprotect(0x7fffaed00000, 131072, PROT_EXEC) = 0<br>
> rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0<br>
> --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_PKUERR,<br>
> si_addr=0x7fffaed00170} ---<br>
<br>
</span>Ran the same test on my machine. and did not encounter the bug.<br>
<br>
Can I get your kernel .config ?<br></blockquote><div><br><span style="font-family:monospace,monospace"><div class="gmail_default" style="font-family:monospace,monospace;display:inline">S</div>ee the attachment.</span><br> </div><blockquote class="gmail_quote" style="margin-top:0px;margin-bottom:0px">
also is this a P7 LPAR or a P8 LPAR? cat /proc/cpuinfo will help.<br></blockquote><div> </div><div><span style="font-family:monospace,monospace">One is </span><div class="gmail_default" style="display:inline"><span style="font-family:monospace,monospace">IBM LPAR on P730 {8231-E2B}</span></div><span style="font-family:monospace,monospace">, another is: </span><div style="display:inline" class="gmail_default"><span style="font-family:monospace,monospace">IBM Power 8 8247-22L</span></div><br><br><br><div style="font-family:monospace,monospace" class="gmail_default"># ./mprotect04<br>mprotect04 1 TPASS : test PROT_NONE for mprotect success<br>mprotect04 2 TFAIL : mprotect04.c:252: test PROT_EXEC for mprotect failed</div><br><div class="gmail_default" style="font-family:monospace,monospace;display:inline"># cat /proc/cpuinfo <br>processor : 0<br>cpu : POWER8 (architected), altivec supported<br>clock : 3425.000000MHz<br>revision : 2.1 (pvr 004b 0201)<br><br>processor : 1<br>cpu : POWER8 (architected), altivec supported<br>clock : 3425.000000MHz<br>revision : 2.1 (pvr 004b 0201)<br><br>processor : 2<br>cpu : POWER8 (architected), altivec supported<br>clock : 3425.000000MHz<br>revision : 2.1 (pvr 004b 0201)<br><br>processor : 3<br>cpu : POWER8 (architected), altivec supported<br>clock : 3425.000000MHz<br>revision : 2.1 (pvr 004b 0201)<br><br>processor : 4<br>cpu : POWER8 (architected), altivec supported<br>clock : 3425.000000MHz<br>revision : 2.1 (pvr 004b 0201)<br><br>processor : 5<br>cpu : POWER8 (architected), altivec supported<br>clock : 3425.000000MHz<br>revision : 2.1 (pvr 004b 0201)<br><br>processor : 6<br>cpu : POWER8 (architected), altivec supported<br>clock : 3425.000000MHz<br>revision : 2.1 (pvr 004b 0201)<br><br>processor : 7<br>cpu : POWER8 (architected), altivec supported<br>clock : 3425.000000MHz<br>revision : 2.1 (pvr 004b 0201)<br><br>timebase : 512000000<br>platform : pSeries<br>model : IBM,8247-22L<br>machine : CHRP IBM,8247-22L<br>MMU : Hash<br><br></div></div></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Li Wang<br><a href="mailto:liwang@redhat.com" target="_blank">liwang@redhat.com</a></div>
</div></div>