* I confused about diff(simple question)
@ 2005-07-10 5:41 guorke
2005-07-10 5:42 ` guorke
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: guorke @ 2005-07-10 5:41 UTC (permalink / raw)
To: linux-kernel
like:
/*
@@ -220,9 +232,8(HERE: why not -220,9 +220,8) @@ fastcall notrace void
do_page_fault(stru
struct vm_area_struct * vma;
unsigned long address;
unsigned long page;
- int write;
- siginfo_t info;
-
+ int write, si_code;
+
/* get the address */
__asm__("movl %%cr2,%0":"=r" (address));
trace_special(regs->eip, error_code, address);
@@ -236,7 +247,7 (HERE: why not -236,7,+236,7) @@ fastcall notrace
void do_page_fault(stru
tsk = current;
- info.si_code = SEGV_MAPERR;
+ si_code = SEGV_MAPERR;
/*
* We fault-in kernel-space virtual memory on-demand. The
@@ -316,7 +327,7 (HERE -316,7, +316,7) @@ fastcall notrace void
do_page_fault(stru
* we can handle it..
*/
good_area:
- info.si_code = SEGV_ACCERR;
+ si_code = SEGV_ACCERR;
write = 0;
switch (error_code & 3) {
default: /* 3: write, present */
@@ -390,11 +401,7 (HERE:why not -390,11,+390,11) @@ bad_area_nosemaphore:
/* Kernel addresses are always protection faults */
tsk->thread.error_code = error_code | (address >= TASK_SIZE);
tsk->thread.trap_no = 14;
- info.si_signo = SIGSEGV;
- info.si_errno = 0;
- /* info.si_code has been set above */
- info.si_addr = (void __user *)address;
- force_sig_info(SIGSEGV, &info, tsk);
+ force_sig_info_fault(SIGSEGV, si_code, address, tsk);
return;
}
@@ -500,11 +507,7(HERE: why not -500,11,+500,7) @@ do_sigbus:
tsk->thread.cr2 = address;
tsk->thread.error_code = error_code;
tsk->thread.trap_no = 14;
- info.si_signo = SIGBUS;
- info.si_errno = 0;
- info.si_code = BUS_ADRERR;
- info.si_addr = (void __user *)address;
- force_sig_info(SIGBUS, &info, tsk);
+ force_sig_info_fault(SIGBUS, BUS_ADRERR, address, tsk);
return;
...
in :-220,9 +232,8
I think the old file from the line 220,and have 9 lines,then the
newfile have 8 lines
so must delete one line. but why +232,it from the line 232 ?
like this..
maybe it's very very simple.but i really confused it.wishes helps,
Thanks
--------
guorke
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: I confused about diff(simple question)
2005-07-10 5:41 I confused about diff(simple question) guorke
@ 2005-07-10 5:42 ` guorke
2005-07-10 6:11 ` Willy Tarreau
2005-07-10 6:13 ` randy_dunlap
2 siblings, 0 replies; 4+ messages in thread
From: guorke @ 2005-07-10 5:42 UTC (permalink / raw)
To: linux-kernel
On 7/10/05, guorke <gourke@gmail.com> wrote:
> like:
>
> /*
> @@ -220,9 +232,8(HERE: why not -220,9 +220,8) @@ fastcall notrace void
> do_page_fault(stru
> struct vm_area_struct * vma;
> unsigned long address;
> unsigned long page;
> - int write;
> - siginfo_t info;
> -
> + int write, si_code;
> +
> /* get the address */
> __asm__("movl %%cr2,%0":"=r" (address));
> trace_special(regs->eip, error_code, address);
> @@ -236,7 +247,7 (HERE: why not -236,7,+236,7) @@ fastcall notrace
> void do_page_fault(stru
>
> tsk = current;
>
> - info.si_code = SEGV_MAPERR;
> + si_code = SEGV_MAPERR;
>
> /*
> * We fault-in kernel-space virtual memory on-demand. The
> @@ -316,7 +327,7 (HERE -316,7, +316,7) @@ fastcall notrace void
> do_page_fault(stru
> * we can handle it..
> */
> good_area:
> - info.si_code = SEGV_ACCERR;
> + si_code = SEGV_ACCERR;
> write = 0;
> switch (error_code & 3) {
> default: /* 3: write, present */
> @@ -390,11 +401,7 (HERE:why not -390,11,+390,11) @@ bad_area_nosemaphore:
> /* Kernel addresses are always protection faults */
> tsk->thread.error_code = error_code | (address >= TASK_SIZE);
> tsk->thread.trap_no = 14;
> - info.si_signo = SIGSEGV;
> - info.si_errno = 0;
> - /* info.si_code has been set above */
> - info.si_addr = (void __user *)address;
> - force_sig_info(SIGSEGV, &info, tsk);
> + force_sig_info_fault(SIGSEGV, si_code, address, tsk);
> return;
> }
>
> @@ -500,11 +507,7(HERE: why not -500,11,+500,7) @@ do_sigbus:
> tsk->thread.cr2 = address;
> tsk->thread.error_code = error_code;
> tsk->thread.trap_no = 14;
> - info.si_signo = SIGBUS;
> - info.si_errno = 0;
> - info.si_code = BUS_ADRERR;
> - info.si_addr = (void __user *)address;
> - force_sig_info(SIGBUS, &info, tsk);
> + force_sig_info_fault(SIGBUS, BUS_ADRERR, address, tsk);
> return;
>
> ...
>
> in :-220,9 +232,8
> I think the old file from the line 220,and have 9 lines,then the
> newfile have 8 lines
> so must delete one line. but why +232,it from the line 232 ?
> like this..
>
> maybe it's very very simple.but i really confused it.wishes helps,
>
> Thanks
>
> --------
> guorke
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: I confused about diff(simple question)
2005-07-10 5:41 I confused about diff(simple question) guorke
2005-07-10 5:42 ` guorke
@ 2005-07-10 6:11 ` Willy Tarreau
2005-07-10 6:13 ` randy_dunlap
2 siblings, 0 replies; 4+ messages in thread
From: Willy Tarreau @ 2005-07-10 6:11 UTC (permalink / raw)
To: guorke; +Cc: linux-kernel
On Sun, Jul 10, 2005 at 01:41:40PM +0800, guorke wrote:
> like:
>
> /*
> @@ -220,9 +232,8(HERE: why not -220,9 +220,8) @@ fastcall notrace void
> do_page_fault(stru
> struct vm_area_struct * vma;
> unsigned long address;
> unsigned long page;
> - int write;
> - siginfo_t info;
> -
> + int write, si_code;
> +
(...)
> I think the old file from the line 220,and have 9 lines,then the
> newfile have 8 lines
> so must delete one line. but why +232,it from the line 232 ?
> like this..
because there was another chunk before this one, which added 12 lines,
so the offset in the old file is 220, and the offset in the new file is
232 because of the previous chunk.
Willy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: I confused about diff(simple question)
2005-07-10 5:41 I confused about diff(simple question) guorke
2005-07-10 5:42 ` guorke
2005-07-10 6:11 ` Willy Tarreau
@ 2005-07-10 6:13 ` randy_dunlap
2 siblings, 0 replies; 4+ messages in thread
From: randy_dunlap @ 2005-07-10 6:13 UTC (permalink / raw)
To: guorke; +Cc: linux-kernel
On Sun, 10 Jul 2005 13:41:40 +0800 guorke wrote:
| like:
|
| /*
| @@ -220,9 +232,8(HERE: why not -220,9 +220,8) @@ fastcall notrace void
| do_page_fault(stru
| struct vm_area_struct * vma;
| unsigned long address;
| unsigned long page;
| - int write;
| - siginfo_t info;
| -
| + int write, si_code;
| +
| /* get the address */
| __asm__("movl %%cr2,%0":"=r" (address));
| trace_special(regs->eip, error_code, address);
| @@ -236,7 +247,7 (HERE: why not -236,7,+236,7) @@ fastcall notrace
| void do_page_fault(stru
|
| tsk = current;
|
| - info.si_code = SEGV_MAPERR;
| + si_code = SEGV_MAPERR;
|
| /*
| * We fault-in kernel-space virtual memory on-demand. The
| @@ -316,7 +327,7 (HERE -316,7, +316,7) @@ fastcall notrace void
| do_page_fault(stru
| * we can handle it..
| */
| good_area:
| - info.si_code = SEGV_ACCERR;
| + si_code = SEGV_ACCERR;
| write = 0;
| switch (error_code & 3) {
| default: /* 3: write, present */
| @@ -390,11 +401,7 (HERE:why not -390,11,+390,11) @@ bad_area_nosemaphore:
| /* Kernel addresses are always protection faults */
| tsk->thread.error_code = error_code | (address >= TASK_SIZE);
| tsk->thread.trap_no = 14;
| - info.si_signo = SIGSEGV;
| - info.si_errno = 0;
| - /* info.si_code has been set above */
| - info.si_addr = (void __user *)address;
| - force_sig_info(SIGSEGV, &info, tsk);
| + force_sig_info_fault(SIGSEGV, si_code, address, tsk);
| return;
| }
|
| @@ -500,11 +507,7(HERE: why not -500,11,+500,7) @@ do_sigbus:
| tsk->thread.cr2 = address;
| tsk->thread.error_code = error_code;
| tsk->thread.trap_no = 14;
| - info.si_signo = SIGBUS;
| - info.si_errno = 0;
| - info.si_code = BUS_ADRERR;
| - info.si_addr = (void __user *)address;
| - force_sig_info(SIGBUS, &info, tsk);
| + force_sig_info_fault(SIGBUS, BUS_ADRERR, address, tsk);
| return;
|
| ...
|
| in :-220,9 +232,8
| I think the old file from the line 220,and have 9 lines,then the
| newfile have 8 lines
| so must delete one line. but why +232,it from the line 232 ?
That patch segment begins at line 232 in the new file because the
previous patch segments added 12 lines (232 - 220).
Now, were there some previous patch segments (that you omitted) or
not? If not, it is confusing...
| like this..
|
| maybe it's very very simple.but i really confused it.wishes helps,
---
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-07-10 6:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-10 5:41 I confused about diff(simple question) guorke
2005-07-10 5:42 ` guorke
2005-07-10 6:11 ` Willy Tarreau
2005-07-10 6:13 ` randy_dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®