OpenQNX :: The QNX Community Portal

Oct 07, 2008 - 11:52 AM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 47 unlogged users and 4 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Mike Gorchak
Post subject: How to disable core dumping of the mmaped device memory ?  PostPosted: Sep 19, 2007 - 02:35 PM
Guest





Hello, All!

Is it possible somehow to disable core dumping of mmaped device memory, in
global OS/dumper settings or via some undocumented mmap flag, doesn't
matter.
It's really annoying to wait while dumper finishes its job when driver
segfaults with one gigabyte of mmaped PCI aperture memory, in most cases -
it's not important what device's memory contain.

Thanks in advance ...
.... or thanks for ignorance :)

With best regards, Mike Gorchak. E-mail: mike@malva.ua
 
   
Reply with quote Back to top
Colin Burgess
Post subject: Re: How to disable core dumping of the mmaped device memory   PostPosted: Sep 19, 2007 - 03:34 PM
Guest





How do you know what memory is 'device' memory. I guess we could come up with a scheme in which you
look at the asinfo entries, but that would be hard to enforce.

Right now it uses the heuristic that PROT_NOCACHE memory is device memory and should not be dumped,
although it's somewhat stupid in that it still writes it to the logfile (as -1s) - it would be better
to put out a PT_LOAD segment with a zero filesz (or just omit it altogether)

You can checkout services/dumper from the repository and hack it to be aware of whatever method
you like for now - I'm willing to take suggestions/patches though.

Mike Gorchak wrote:
Quote:
Hello, All!

Is it possible somehow to disable core dumping of mmaped device memory, in
global OS/dumper settings or via some undocumented mmap flag, doesn't
matter.
It's really annoying to wait while dumper finishes its job when driver
segfaults with one gigabyte of mmaped PCI aperture memory, in most cases -
it's not important what device's memory contain.

Thanks in advance ...
... or thanks for ignorance :)

With best regards, Mike Gorchak. E-mail: mike@malva.ua



--
cburgess@qnx.com
 
   
Reply with quote Back to top
Colin Burgess
Post subject: Re: How to disable core dumping of the mmaped device memory   PostPosted: Sep 19, 2007 - 05:09 PM
Guest





I've just committed a fix for this. I've made the default to not dump out memory that is marked
as being MAP_PHYS (but isn't also MAP_ANON).

You can force them to be dumper out again by adding the -P option.

The change is in trunk/services/dumper/dumper.c repo version 154191 - it should be visible in a short
while.

Cheers,

Colin

Colin Burgess wrote:
Quote:
How do you know what memory is 'device' memory. I guess we could come
up with a scheme in which you
look at the asinfo entries, but that would be hard to enforce.

Right now it uses the heuristic that PROT_NOCACHE memory is device
memory and should not be dumped,
although it's somewhat stupid in that it still writes it to the logfile
(as -1s) - it would be better
to put out a PT_LOAD segment with a zero filesz (or just omit it
altogether)

You can checkout services/dumper from the repository and hack it to be
aware of whatever method
you like for now - I'm willing to take suggestions/patches though.

Mike Gorchak wrote:
Hello, All!

Is it possible somehow to disable core dumping of mmaped device
memory, in global OS/dumper settings or via some undocumented mmap
flag, doesn't matter.
It's really annoying to wait while dumper finishes its job when driver
segfaults with one gigabyte of mmaped PCI aperture memory, in most
cases - it's not important what device's memory contain.

Thanks in advance ...
... or thanks for ignorance :)

With best regards, Mike Gorchak. E-mail: mike@malva.ua



--
cburgess@qnx.com
 
   
Reply with quote Back to top
Mike Gorchak
Post subject: Re: How to disable core dumping of the mmaped device memory   PostPosted: Sep 20, 2007 - 04:56 AM
Guest





Hello, Colin!

CB> I've just committed a fix for this. I've made the default to not dump
CB> out memory that is marked as being MAP_PHYS (but isn't also MAP_ANON).

CB> You can force them to be dumper out again by adding the -P option.

CB> The change is in trunk/services/dumper/dumper.c repo version 154191 -
CB> it should be visible in a short while.

Wow, thank you ! :)

Colin, do you have also any suggestions about wbinvd x86 cpu instruction
execution (problem was described by me in the previous newsletter in this
group) ? Does PROT_NOCACHE mmap option will act the same as continually
wbinvd execution after writings to that mmaped memory ?

With best regards, Mike Gorchak. E-mail: mike@malva.ua
 
   
Reply with quote Back to top
Mario Charest
Post subject: Re: How to disable core dumping of the mmaped device memory   PostPosted: Sep 20, 2007 - 12:37 PM
Guest





"Mike Gorchak" <mike@malva.ua> wrote in message
news:fcsu5m$7fk$1@inn.qnx.com...
Quote:
Hello, Colin!

CB> I've just committed a fix for this. I've made the default to not dump
CB> out memory that is marked as being MAP_PHYS (but isn't also MAP_ANON).

CB> You can force them to be dumper out again by adding the -P option.

CB> The change is in trunk/services/dumper/dumper.c repo version 154191 -
CB> it should be visible in a short while.

Wow, thank you ! :)


Who said this would be a non event ;-)

Quote:
Colin, do you have also any suggestions about wbinvd x86 cpu instruction
execution (problem was described by me in the previous newsletter in this
group) ? Does PROT_NOCACHE mmap option will act the same as continually
wbinvd execution after writings to that mmaped memory ?

With best regards, Mike Gorchak. E-mail: mike@malva.ua
 
   
Reply with quote Back to top
Colin Burgess
Post subject: Re: How to disable core dumping of the mmaped device memory   PostPosted: Sep 20, 2007 - 01:36 PM
Guest





Mario Charest wrote:
Quote:
"Mike Gorchak" <mike@malva.ua> wrote in message
news:fcsu5m$7fk$1@inn.qnx.com...
Hello, Colin!

CB> I've just committed a fix for this. I've made the default to not dump
CB> out memory that is marked as being MAP_PHYS (but isn't also MAP_ANON).

CB> You can force them to be dumper out again by adding the -P option.

CB> The change is in trunk/services/dumper/dumper.c repo version 154191 -
CB> it should be visible in a short while.

Wow, thank you ! :)


Who said this would be a non event Wink

Oh, just some curmudgeon who's always looking on the downside - apart from him, everyone
seems to be happy! ;-P

Quote:
Colin, do you have also any suggestions about wbinvd x86 cpu instruction
execution (problem was described by me in the previous newsletter in this
group) ? Does PROT_NOCACHE mmap option will act the same as continually
wbinvd execution after writings to that mmaped memory ?

With best regards, Mike Gorchak. E-mail: mike@malva.ua




--
cburgess@qnx.com
 
   
Reply with quote Back to top
Mario Charest
Post subject: Re: How to disable core dumping of the mmaped device memory   PostPosted: Sep 20, 2007 - 03:22 PM
Guest





Quote:

Who said this would be a non event ;-)

Oh, just some curmudgeon who's always looking on the downside - apart from
him, everyone
seems to be happy! ;-P


I had two people in mind Wink I had to look up curmudgeon...
 
   
Reply with quote Back to top
Colin Burgess
Post subject: Re: How to disable core dumping of the mmaped device memory   PostPosted: Sep 20, 2007 - 03:25 PM
Guest





Mario Charest wrote:
Quote:
Who said this would be a non event Wink
Oh, just some curmudgeon who's always looking on the downside - apart from
him, everyone
seems to be happy! ;-P


I had two people in mind Wink I had to look up curmudgeon...

Did I spell it correctly? ;-)

--
cburgess@qnx.com
 
   
Reply with quote Back to top
Mario Charest
Post subject: Re: How to disable core dumping of the mmaped device memory   PostPosted: Sep 20, 2007 - 05:47 PM
Guest





"Colin Burgess" <cburgess@qnx.com> wrote in message
news:fcu2vu$o3i$1@inn.qnx.com...
Quote:
Mario Charest wrote:
Who said this would be a non event Wink
Oh, just some curmudgeon who's always looking on the downside - apart
from him, everyone
seems to be happy! ;-P


I had two people in mind Wink I had to look up curmudgeon...

Did I spell it correctly? Wink

According to Webster yes :
http://www.m-w.com/cgi-bin/dictionary?va=curmudgeon

Quote:
 
   
Reply with quote Back to top
maschoen
Post subject: RE: Re: How to disable core dumping of the mmaped device mem  PostPosted: Sep 20, 2007 - 11:29 PM
QNX Master


Joined: Jun 25, 2003
Posts: 1095

Hey, did anyone else notice that we just got a 1 day turn around on an enhancement? Sounds like things are changing at QNX.
 
 View user's profile Send private message Send e-mail Visit poster's website  
Reply with quote Back to top
David Gibbs
Post subject: Re: How to disable core dumping of the mmaped device memory   PostPosted: Oct 09, 2007 - 09:02 PM
Guest





Mike Gorchak <mike@malva.ua> wrote:
Quote:
Hello, Colin!


Quote:
Wow, thank you ! :)

Colin, do you have also any suggestions about wbinvd x86 cpu instruction
execution (problem was described by me in the previous newsletter in this
group) ? Does PROT_NOCACHE mmap option will act the same as continually
wbinvd execution after writings to that mmaped memory ?

I posted elsewhere -- cache control API.

cache_init(), CACHE_FLUSH().

But, yeah, PROT_NOCACHE is like continual flush/invalidate on the
cache for the region so marked.

-David
--
David Gibbs
QNX Training Services
dagibbs@qnx.com
 
   
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.