Skip to contentSkip to conversation

ipipe: Comment in __ipipe_handle_exception

Xenomai Jan Kiszka 2 participants 4 messages Sep 11, 2014

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

Hi Philippe,

in 2338107647 I found this:

@@ -383,6 +380,8 @@ int __ipipe_handle_exception(struct pt_regs *regs, long error_code, int vector)
local_irq_disable();
}

+ /*
+ * XXX: We don't trace page faults (yet?). */
if (vector == ex_do_page_fault)
cr2 = native_read_cr2();

What is the background? Any open issue?

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
#1 lore raw
Quoted 14 lines · Jan Kiszka

Hi Philippe,

in 2338107647 I found this:

(quoted diff) +2 -0
@@ -383,6 +380,8 @@ int __ipipe_handle_exception(struct pt_regs *regs, long error_code, int vector)
 			local_irq_disable();
 	}
 
+	/*
+	 * XXX: We don't trace page faults (yet?). */
 	if (vector == ex_do_page_fault)
 		cr2 = native_read_cr2();
 
Quoted 2 lines

What is the background? Any open issue?

The current interposition we do via std_extable is not aware of trace_* hooks in entry*.S, so we end up bypassing the trace encapsulation entirely in __ipipe_handle_exception. Nothing bad, it just needs some work to do this cleanly. This is for x86_64, ia32 might be slightly different, but the issue should apply the same way.

Signature · 1 line
Philippe.
author
#2 lore raw
Quoted 15 lines · Philippe Gerum
Quoted 14 lines · Jan Kiszka

Hi Philippe,

in 2338107647 I found this:

(quoted diff) +2 -0
@@ -383,6 +380,8 @@ int __ipipe_handle_exception(struct pt_regs *regs, long error_code, int vector)
 			local_irq_disable();
 	}
 
+	/*
+	 * XXX: We don't trace page faults (yet?). */
 	if (vector == ex_do_page_fault)
 		cr2 = native_read_cr2();
 
Quoted 8 lines
Quoted 2 lines

What is the background? Any open issue?

The current interposition we do via std_extable is not aware of trace_* hooks in entry*.S, so we end up bypassing the trace encapsulation entirely in __ipipe_handle_exception. Nothing bad, it just needs some work to do this cleanly. This is for x86_64, ia32 might be slightly different, but the issue should apply the same way.

Which tracing are you referring to? There are at least three in the assembly entries (ftrace, Linux IRQSOFF tracing, I-pipe tracing). And I unfortunately still don't get how those relate to the reading of CR2.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
#3 lore raw
Quoted 25 lines · Jan Kiszka
Quoted 15 lines · Philippe Gerum
Quoted 14 lines · Jan Kiszka

Hi Philippe,

in 2338107647 I found this:

(quoted diff) +2 -0
@@ -383,6 +380,8 @@ int __ipipe_handle_exception(struct pt_regs *regs, long error_code, int vector)
 			local_irq_disable();
 	}
 
+	/*
+	 * XXX: We don't trace page faults (yet?). */
 	if (vector == ex_do_page_fault)
 		cr2 = native_read_cr2();
 
Quoted 8 lines
Quoted 2 lines

What is the background? Any open issue?

The current interposition we do via std_extable is not aware of trace_* hooks in entry*.S, so we end up bypassing the trace encapsulation entirely in __ipipe_handle_exception. Nothing bad, it just needs some work to do this cleanly. This is for x86_64, ia32 might be slightly different, but the issue should apply the same way.

Quoted 6 lines

Which tracing are you referring to? There are at least three in the assembly entries (ftrace, Linux IRQSOFF tracing, I-pipe tracing). And I unfortunately still don't get how those relate to the reading of CR2.

Jan

CONFIG_TRACING, for ftrace.

Signature · 1 line
Philippe.