title: no lookup_page for if statement
PATCH 1/1 title: no lookup_page for if statement
This patch removes the if define statement for page_lookup in order to remove a fix me of this not being defined as of yet.
--- 0001-title-no-lookup_page-for-if-statement.patch | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 0001-title-no-lookup_page-for-if-statement.patch
0001-title-no-lookup_page-for-if-statement.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 23c4afac6742d5df1d083ab6335a0a69f38c76b0 Mon Sep 17 00:00:00 2001 +From: Nicholas Krause <[email protected]> +Date: Mon, 14 Jul 2014 14:39:02 -0400 +Subject: [PATCH] title: no lookup_page for if statement + +This patch removes the if define statement for page_lookup in order +to remove a fix me of this not being defined as of yet. + +Signed-off-by: Nicholas Krause <[email protected]> +--- + arch/tile/mm/fault.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c +index 6c05712..2297bf7 100644 +--- a/arch/tile/mm/fault.c ++++ b/arch/tile/mm/fault.c +@@ -513,8 +513,6 @@ no_context: + + bust_spinlocks(1); + +- /* FIXME: no lookup_address() yet */ +-#ifdef SUPPORT_LOOKUP_ADDRESS + if (fault_num == INT_ITLB_MISS) { + pte_t *pte = lookup_address(address); + +@@ -523,7 +521,6 @@ no_context: + " non-executable page - exploit attempt?" + " (uid: %d)\n", current->uid); + } +-#endif + if (address < PAGE_SIZE) + pr_alert("Unable to handle kernel NULL pointer dereference\n"); + else +-- +1.9.1 +
Signature · 1 line
1.9.1
Quoted 28 lines · Nicholas Krause
This patch removes the if define statement for
page_lookupin order to remove a fix me of this not being defined as of yet.Signed-off-by Nicholas Krause <[email protected]>--- 0001-title-no-lookup_page-for-if-statement.patch | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 0001-title-no-lookup_page-for-if-statement.patch0001-title-no-lookup_page-for-if-statement.patch new file +13
-0@@ -0,0 +1,37 @@ +From 23c4afac6742d5df1d083ab6335a0a69f38c76b0 Mon Sep 17 00:00:00 2001 +From: Nicholas Krause <[email protected]> +Date: Mon, 14 Jul 2014 14:39:02 -0400 +Subject: [PATCH] title: no lookup_page for if statement + +This patch removes the if define statement for page_lookup in order +to remove a fix me of this not being defined as of yet. + +Signed-off-by: Nicholas Krause <[email protected]> +--- + arch/tile/mm/fault.c | 3 --- + 1 file changed, 3 deletions(-) +
0001-title-no-lookup_page-for-if-statement.patch line 23
Quoted 10 lines
0001-title-no-lookup_page-for-if-statement.patch new file +10
-0+diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c +index 6c05712..2297bf7 100644 +--- a/arch/tile/mm/fault.c ++++ b/arch/tile/mm/fault.c +@@ -513,8 +513,6 @@ no_context: + + bust_spinlocks(1); + +- /* FIXME: no lookup_address() yet */ +-#ifdef SUPPORT_LOOKUP_ADDRESS
Nicholas, stop! Just stop.
Quoted 4 lines
0001-title-no-lookup_page-for-if-statement.patch new file +4
-0+ if (fault_num == INT_ITLB_MISS) { + pte_t *pte = lookup_address(address); + +@@ -523,7 +521,6 @@ no_context:
0001-title-no-lookup_page-for-if-statement.patch line 37
Quoted 10 lines
0001-title-no-lookup_page-for-if-statement.patch new file +10
-0+ " non-executable page - exploit attempt?" + " (uid: %d)\n", current->uid); + } +-#endif + if (address < PAGE_SIZE) + pr_alert("Unable to handle kernel NULL pointer dereference\n"); + else +-- +1.9.1 +
For those not yet familiar with this train wreck, please do
git grep SUPPORT_LOOKUP_ADDRESS
Paul Bolle
Quoted 61 lines · Paul Bolle
Quoted 28 lines · Nicholas Krause
This patch removes the if define statement for
page_lookupin order to remove a fix me of this not being defined as of yet.Signed-off-by Nicholas Krause <[email protected]>--- 0001-title-no-lookup_page-for-if-statement.patch | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 0001-title-no-lookup_page-for-if-statement.patch0001-title-no-lookup_page-for-if-statement.patch new file +13
-0@@ -0,0 +1,37 @@ +From 23c4afac6742d5df1d083ab6335a0a69f38c76b0 Mon Sep 17 00:00:00 2001 +From: Nicholas Krause <[email protected]> +Date: Mon, 14 Jul 2014 14:39:02 -0400 +Subject: [PATCH] title: no lookup_page for if statement + +This patch removes the if define statement for page_lookup in order +to remove a fix me of this not being defined as of yet. + +Signed-off-by: Nicholas Krause <[email protected]> +--- + arch/tile/mm/fault.c | 3 --- + 1 file changed, 3 deletions(-) +0001-title-no-lookup_page-for-if-statement.patch line 23
Quoted 10 lines
0001-title-no-lookup_page-for-if-statement.patch new file +10
-0+diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c +index 6c05712..2297bf7 100644 +--- a/arch/tile/mm/fault.c ++++ b/arch/tile/mm/fault.c +@@ -513,8 +513,6 @@ no_context: + + bust_spinlocks(1); + +- /* FIXME: no lookup_address() yet */ +-#ifdef SUPPORT_LOOKUP_ADDRESSNicholas, stop! Just stop.
Quoted 4 lines
0001-title-no-lookup_page-for-if-statement.patch new file +4
-0+ if (fault_num == INT_ITLB_MISS) { + pte_t *pte = lookup_address(address); + +@@ -523,7 +521,6 @@ no_context:0001-title-no-lookup_page-for-if-statement.patch line 37
Quoted 10 lines
0001-title-no-lookup_page-for-if-statement.patch new file +10
-0+ " non-executable page - exploit attempt?" + " (uid: %d)\n", current->uid); + } +-#endif + if (address < PAGE_SIZE) + pr_alert("Unable to handle kernel NULL pointer dereference\n"); + else +-- +1.9.1 +For those not yet familiar with this train wreck, please do
git grepSUPPORT_LOOKUP_ADDRESS
Quoted 2 lines
Paul Bolle
Very well , I will not work on this any longer as I seem to be just screwing it up.
Cheers Nick
PATCH 1/1 title: no lookup_page for if statement
In reply to Paul BolleHi Nicholas,
Quoted 3 lines · Paul Bolle
Nicholas, stop! Just stop.
You have been trying to send patches fixing FIX ME for the past few days. A lot of maintainers are really upset with you since you do not follow the proper procedures while submitting patches.
Lots of maintainers have asked you to stop sending in patches. If you do not listen, they will start redirecting your mail to /dev/null. (many have already done that)
Please read Documentation/SubmittingPatches atleast once. Please test your patches by _atleast_ compiling the kernel ensuring that your changes are compiling.
There are other tasks to do than sending in code patches. Like documentation patches. Read the documentation and try to understand them. Fix spelling/grammar mistakes there. Once you are comfortable with programming in C, you can send it code patches.
Frankly, your build testing is great and might be helping. Just report that builds fail, you don't need to send in code patches which you are not sure are fixes for the failures.
Finally, join kernelnewbies mailing list and learn by asking/answering questions.
Regards,
Signature · 1 line
Andev
Quoted 5 lines · Paul Bolle
Quoted 4 lines · Nicholas Krause
Quoted 4 lines
This patch removes the if define statement for
page_lookupin order to remove a fix me of this not being defined as of yet.Signed-off-by Nicholas Krause<[email protected]>
Nicholas, you can't just enable this code; it will break the build, since there is no lookup_address() symbol on tile.
I'd like to encourage you to look for more substantive kinds of changes to submit to LKML. This one and the last one (adding some underscores to some obsolete symbols) both have ended up costing me some time to look at and figure out what's actually going on, but for no real value. I suspect there may be "janitor" tasks that are more useful if you are looking for small starting points (Google for "linux kernel janitors").
That said I'm going to go ahead and check in the following change which actually does work, now that my attention has been drawn here.
arch/tile/mm/fault.c +6 -9
@@ -513,17 +513,14 @@ no_context:bust_spinlocks (1 ); -/* FIXME: no lookup_address() yet */ -#ifdef SUPPORT_LOOKUP_ADDRESS -if (fault_num ==INT_ITLB_MISS ) { -pte_t *pte =lookup_address (address); +if (fault_num ==INT_ITLB_MISS && address >=PAGE_OFFSET ) { +pte_t *pte =virt_to_kpte (address); -if (pte &&pte_present (*pte) && !pte_exec_kernel (*pte)) -pr_crit ("kernel tried to execute" -" non-executable page - exploit attempt?" -" (uid: %d)\n" , current->uid); +if (pte &&pte_present (*pte) && !pte_exec (*pte)) +pr_crit ("kernel tried to execute non-executable page" +" - exploit attempt? (uid: %d)\n" , +from_kuid (&init_user_ns,current_uid ())); } -#endif if (address <PAGE_SIZE )pr_alert ("Unable to handle kernel NULL pointer dereference\n" );else
Signature · 2 lines
Chris Metcalf, Tilera Corp. http://www.tilera.com
Quoted 55 lines · Chris Metcalf
Quoted 7 lines · Paul Bolle
Quoted 5 lines · Nicholas Krause
Quoted 5 lines
This patch removes the if define statement for
page_lookupin order to remove a fix me of this not being defined as of yet.Signed-off-by Nicholas Krause<[email protected]>Nicholas, you can't just enable this code; it will break the build, since there is no
lookup_address()symbol on tile.I'd like to encourage you to look for more substantive kinds of changes to submit to LKML. This one and the last one (adding some underscores to some obsolete symbols) both have ended up costing me some time to look at and figure out what's actually going on, but for no real value. I suspect there may be "janitor" tasks that are more useful if you are looking for small starting points (Google for "linux kernel janitors").
That said I'm going to go ahead and check in the following change which actually does work, now that my attention has been drawn here.
arch/tile/mm/fault.c +4
-8@@ -513,17 +513,14 @@ no_context:bust_spinlocks (1 ); -/* FIXME: no lookup_address() yet */ -#ifdef SUPPORT_LOOKUP_ADDRESS -if (fault_num ==INT_ITLB_MISS ) { -pte_t *pte =lookup_address (address); +if (fault_num ==INT_ITLB_MISS && address >=PAGE_OFFSET ) { +pte_t *pte =virt_to_kpte (address); -if (pte &&pte_present (*pte) && !pte_exec_kernel (*pte)) -pr_crit ("kernel tried to execute" -" non-executable page - exploit attempt?" -" (uid: %d)\n" , current->uid); +if (pte &&pte_present (*pte) && !pte_exec (*pte)) + pr_crit("kernel tried to execute non-executablepage"
arch/tile/mm/fault.c +2
-1+" - exploit attempt? (uid: %d)\n" , + from_kuid(&init_user_ns, current_uid())); } -#endif if (address <PAGE_SIZE ) pr_alert("Unable to handle kernel NULL pointerdereference\n");
else
Quoted 4 lines
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
Chris,
Understood I screwed up here. I am doing other changes with build and warning errors. Plus some
fix me issues that are simple. I will double check my patches and the code they are relating to more
carefully. I should have asked you before writing this patch:(. Nick