This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re-send [PATCH] : Validating address in runtime


Wenji Huang wrote:
Hi,

Regarding PR6646, seems no good way to solve it. I just think maybe double checking the address in runtime to make things safer.

This patch adds validating address vs name mapping in runtime for several symbols which are used in initializing process. So kernel oops could be early avoided in case of incorrect vmlinux or wrong address.

Any comments are welcome.
  ........................................
> .......................................
	  return -1;
	}

+	if (_stp_validate_addr("modules_op", (unsigned long)modules_op))
+	  return -1;
+

Above mentioned code breaks systemtap on ppc64 systems, Execution of a basic systemtap script fails with following error. I removed above 3 lines of code and now systemtap works well.


[root@llm27lp1 systemtap]# ./stap -e 'probe kernel.function("sys_open") { printf("hello\n")}'
Error inserting module '/tmp/stapIrEgpn/stap_be5242edefcfe2d56878f1a090e33b6b_250.ko': Operation not permitted
Pass 5: run failed. Try again with more '-v' (verbose) options.
=========================
dmesg shows


Systemtap Error at _stp_validate_addr:191 Incorrect mapping 0xc0000000005da7d0 vs modules_op.
Systemtap Error at _stp_transport_init:277 failed to initialize modules
================



Thanks Srinivasa DS.






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]