lkml.org 
[lkml]   [2011]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [GIT PULL] x86/vdso changes for v3.1
On Thu, Aug 25, 2011 at 10:06 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> On Thu, Aug 25, 2011 at 7:51 AM, Andrew Lutomirski <luto@mit.edu> wrote:
>> On Thu, Aug 25, 2011 at 1:58 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
>>> Hi,

>>>
>>> commit 59e97e4d6fbcd5b74a94cb48bcbfc6f8478a5e93
>>> Author: Andy Lutomirski <luto@mit.edu>
>>> Date:   Wed Jul 13 09:24:10 2011 -0400
>>>
>>>    x86: Make alternative instruction pointers relative
>>>
>>>    This save a few bytes on x86-64 and means that future patches can
>>>    apply alternatives to unrelocated code.
>>>
>>>    Signed-off-by: Andy Lutomirski <luto@mit.edu>
>>>    Link: http://lkml.kernel.org/r/ff64a6b9a1a3860ca4a7b8b6dc7b4754f9491cd7.1310563276.git.luto@mit.edu
>>>    Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
>>>
>>
>> I probably missed a hardcoded alternative entry that depends on
>> config.  Can you send me your System.map and the output of objdump -s
>> -j .altinstructions vmlinux?
>>
> see attached.
>
>> I'm also having issues building from your .config.  Building
>> 59e97e4d6fbcd5b74a94cb48bcbfc6f8478a5e93 asks me about Moorestown MID
>> platform, Ethernet, etc.
>>
> yes, the config is against -rc3. An `oldnoconfig' should do the job
> before the build.
>

I still can't reproduce this. I'm building the attached .config on
the v3.1-rc3, running make ARCH=i386 oldnoconfig (which spews a lot of
changes), then building with ARCH=i386 and test-booting in KVM. No
panic.

Can you either send me a real .config and exact commit that you're
building or try the attached patch and tell me what it says?

Thanks,
Andy
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index c638228..ac73a38 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -277,11 +277,14 @@ void __init_or_module apply_alternatives(struct alt_instr *start,
for (a = start; a < end; a++) {
instr = (u8 *)&a->instr_offset + a->instr_offset;
replacement = (u8 *)&a->repl_offset + a->repl_offset;
+ printk(KERN_ERR "start=%p a=%d instr_offset=%d instr=%pS repl_offset=%d repl=%pS instrlen=%d repllen=%d\n", start, (int)(a-start), a->instr_offset, instr, a->repl_offset, replacement, (int)a->instrlen, (int)a->replacementlen);
BUG_ON(a->replacementlen > a->instrlen);
BUG_ON(a->instrlen > sizeof(insnbuf));
BUG_ON(a->cpuid >= NCAPINTS*32);
- if (!boot_cpu_has(a->cpuid))
+ if (!boot_cpu_has(a->cpuid)) {
+ printk(KERN_ERR " no change\n");
continue;
+ }

memcpy(insnbuf, replacement, a->replacementlen);

@@ -293,6 +296,8 @@ void __init_or_module apply_alternatives(struct alt_instr *start,
a->instrlen - a->replacementlen);

text_poke_early(instr, insnbuf, a->instrlen);
+
+ printk(KERN_ERR " done\n");
}
}

@@ -533,7 +538,9 @@ void __init alternative_instructions(void)
* patching.
*/

+ printk(KERN_ERR "About to apply_alternatives\n");
apply_alternatives(__alt_instructions, __alt_instructions_end);
+ printk(KERN_ERR "apply_alternatives done\n");

/* switch to patch-once-at-boottime-only mode and free the
* tables in case we know the number of CPUs will never ever
\
 
 \ /
  Last update: 2011-08-25 21:19    [W:0.055 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site