* Linus Torvalds <torvalds@linux-foundation.org> wrote:yeah - sorry - the '16' was a blast from the past, i just took the old 2.6.24 condition on the 32-bit side which didnt use PF_INSTR (PF_INSTR came in as a cleanup during the unification), and when the confirmation came that this fixed the crash i sent the pull request. That's how this nonsensical mixing happened, and that's why i missed the 'if (error_code & PF_INSTR)' branch. The patch below (ontop of the tree) is a first cut at fixing all these problems - but i'd wait at least 24 hours with applying this to let it be tested through - it affects both 32-bit and 64-bit. The fix further cleans up this codepath and removes an #ifdef. Ingo ------------------------> Subject: x86: prefetch fix #2 From: Ingo Molnar <mingo@elte.hu> Date: Thu Mar 27 21:29:09 CET 2008 Linus noticed a second bug and an uncleanliness: - we'd return on any instruction fetch fault - we'd use both the value of 16 and the PF_INSTR symbol which are the same and make no sense the cleanup nicely unifies this piece of logic. Signed-off-by: Ingo Molnar <mingo@elte.hu> --- arch/x86/mm/fault.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) Index: linux-x86.q/arch/x86/mm/fault.c =================================================================== --- linux-x86.q.orig/arch/x86/mm/fault.c +++ linux-x86.q/arch/x86/mm/fault.c @@ -103,14 +103,10 @@ static int is_prefetch(struct pt_regs *r int prefetch = 0; unsigned char *max_instr; -#ifdef CONFIG_X86_32 - /* Catch an obscure case of prefetch inside an NX page: */ - if ((__supported_pte_mask & _PAGE_NX) && (error_code & 16)) - return 0; -#endif - - /* If it was a exec fault on NX page, ignore */ - if (error_code & PF_INSTR) + /* + * Catch an obscure case of prefetch inside an NX page: + */ + if ((__supported_pte_mask & _PAGE_NX) && (error_code & PF_INSTR)) return 0; instr = (unsigned char *)convert_ip_to_linear(current, regs); --
| David Miller | [GIT]: Networking |
| Fred . | Please add ZFS support (from GPL sources) |
| Linus Torvalds | Linux 2.6.26-rc4 |
| Jan Engelhardt | Re: why does x86 "make defconfig" build a single, lonely module? |
git: | |
| Jörg Sommer | [PATCH 2/4] Rework redo_merge |
| Matthieu Moy | git push to a non-bare repository |
| Michael Dressel | git merge --no-commit <branch>; does commit |
| Joakim Tjernlund | [FEATURE REQUEST] git clone, just clone selected branches? |
| Daniel Ouellet | identifying sparse files and get ride of them trick available? |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Unix Fan | Re: Vulnerability Note VU#800113 - Multiple DNS implementations vulnerable to cach... |
| Ihar Hrachyshka | Re: That whole "Linux stealing our code" thing |
| Daniel Brewer | Re: fsync performance hit on 1.6.1 |
| YAMAMOTO Takashi | yamt-km branch |
| der Mouse | Re: mjf-devfs2 branch |
| Ian Zagorskih | POSIX timer_settime() dosn't set timer in some cases (lost accuracy) |
