[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Signal handler for SIGSEGV, might be a bug in mprotect?

Nguyen Thai wrote:
> When running on host, it worked fine. The handler was called and print
> expected information. But when running on devb, although mprotect was
> called, but SIGSEGV didn't rise. I think there might be a bug in mprotect.
> Is there any one encounter the same problem?

A couple of macros in include/asm-cris/pgtable.h are wrong.  I have
attached a new pgtable.h which corrects this.  I tested it with devboard
lx release 2.0.0 and mprotect now works as expected, i.e. you get a
SIGSEGV when you violate the permissions for the page.  Note that
PROT_WRITE implies read permissions (there is a comment in pgtable.h
about this).

Thanks for reporting this bug.

Best regards,

Orjan Friberg              E-mail: orjan.friberg@xxxxxxx.com
Axis Communications AB     Phone:  +46 46 272 17 68