Re: how to catch a wildrunning pointer

2000-02-03 Thread Thomas Klein








Alfred Perlstein [EMAIL PROTECTED] on 28.01.2000 11:49:34

To:   Thomas Klein/Aachen/Utimaco/DE@utimaco
cc:   [EMAIL PROTECTED]

Subject:  Re: how to catch a wildrunning pointer






 
  Hi
 
  My Problem:
  Within a kernel timeout routine I allocate memory and fill it with data.
  After a while I lock at this data again and realize that it it was modifyted
  (but not by me).
  How can I set a kernel mode watch point to that data to see which function
  change the data.
 
  Any Ideas 

 Look at the vm code, you can probably write protect the pages while
 you aren't accessing them, this will cause offending code to panic
 the machine so you can figure out who is twiddling your bits.

 Of course you'll have to unprotect the memory when you want to access
 it for legitimate reasons.

 You owe the oracle a how-to on acually doing this, a paragraph or two
 would suffice.

 thanks,
 -Or^H^HAlfred


If I understand this correctly I have to use the pmap_protect function.

For testing I integrate the following sequence within a device driver
attach routine.

 {
  int i;
  char * t_ptr;

  t_ptr = (char*) malloc(1027,M_DEVBUF,M_NOWAIT);
  for(i=0;i1027,i++)
   *t_ptr = 'x';
  pmap_protect(kmem_map,t_ptr,t_prt + 1027,VM_PROT_READ);
  *t_ptr = 'A';
  printf("I can see this\n");
 }

No exception ocured.
What is wrong?
Wy dosn't it work?

Regards Thomas






To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



question: delay of a context - switch

1999-07-09 Thread Thomas Klein
Hi

Dose anyone know how long a the kernel is busy with context switching
(beetween two processes) ?
Has anyone tested this yet?
I estimate of about 7 usec duration for that, (on a Pentium 400) but
I think that's to long. 

Regards
 Thomas


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



question: delay of a context - switch

1999-07-08 Thread Thomas Klein

Hi

Dose anyone know how long a the kernel is busy with context switching
(beetween two processes) ?
Has anyone tested this yet?
I estimate of about 7 usec duration for that, (on a Pentium 400) but
I think that's to long. 

Regards
 Thomas


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



questing: delay of a context - switch

1999-06-30 Thread Thomas Klein

Hi

Dose anyone know how long a the kernel is buisy with context switching
(beetween two processes) ?
Has anyone testet this yet?
I have made estimate of 7 usec duration for that, (on a Pentium 400) but
I think that's to long. 

Regards
 Thomas


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



questing: delay of a context - switch

1999-06-30 Thread Thomas Klein
Hi

Dose anyone know how long a the kernel is buisy with context switching
(beetween two processes) ?
Has anyone testet this yet?
I have made estimate of 7 usec duration for that, (on a Pentium 400) but
I think that's to long. 

Regards
 Thomas


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message