Re: Will smp alternative try to patch init text also?
On Wed, Feb 14, 2007 at 11:51:31AM +0100, Gerd Hoffmann wrote: > Vivek Goyal wrote: > > So what happens if somebody builds a SMP kernel and runs on a UP machine. > > Later it hotplus one CPU. Then kernel will switch to SMP mode. Looking > > at the code it looks like it will also try to patch init text which is > > no more there and will corrupt something else? > > There are range checks for both kernel (_text -> _etext) and modules > (.text section). Anything outside isn't patched. > Oh... I missed that. Thanks. Vivek - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Will smp alternative try to patch init text also?
Vivek Goyal wrote: > So what happens if somebody builds a SMP kernel and runs on a UP machine. > Later it hotplus one CPU. Then kernel will switch to SMP mode. Looking > at the code it looks like it will also try to patch init text which is > no more there and will corrupt something else? There are range checks for both kernel (_text -> _etext) and modules (.text section). Anything outside isn't patched. cheers, Gerd -- Gerd Hoffmann <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Will smp alternative try to patch init text also?
Hi, I just built a 2.6.20 kernel with CONFIG_RELOCATABLE=y. While going through relocation entries for .smp_locks section, I see some relocation entries present w.r.t to init section also. Below I am pasting just few of them. Relocation section '.rel.smp_locks' at offset 0x6079c8 contains 4662 entries: Offset InfoTypeSym.Value Sym. Name c058e000 1201 R_386_32 c0593000 .init.text c058e004 1201 R_386_32 c0593000 .init.text c058e008 1201 R_386_32 c0593000 .init.text So what happens if somebody builds a SMP kernel and runs on a UP machine. Later it hotplus one CPU. Then kernel will switch to SMP mode. Looking at the code it looks like it will also try to patch init text which is no more there and will corrupt something else? Am I missing something? MODPOST whitelists the references from .smp_locks section to .init.text, hence these warnings are not displayed during compilation. Thanks Vivek - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Will smp alternative try to patch init text also?
Hi, I just built a 2.6.20 kernel with CONFIG_RELOCATABLE=y. While going through relocation entries for .smp_locks section, I see some relocation entries present w.r.t to init section also. Below I am pasting just few of them. Relocation section '.rel.smp_locks' at offset 0x6079c8 contains 4662 entries: Offset InfoTypeSym.Value Sym. Name c058e000 1201 R_386_32 c0593000 .init.text c058e004 1201 R_386_32 c0593000 .init.text c058e008 1201 R_386_32 c0593000 .init.text So what happens if somebody builds a SMP kernel and runs on a UP machine. Later it hotplus one CPU. Then kernel will switch to SMP mode. Looking at the code it looks like it will also try to patch init text which is no more there and will corrupt something else? Am I missing something? MODPOST whitelists the references from .smp_locks section to .init.text, hence these warnings are not displayed during compilation. Thanks Vivek - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Will smp alternative try to patch init text also?
Vivek Goyal wrote: So what happens if somebody builds a SMP kernel and runs on a UP machine. Later it hotplus one CPU. Then kernel will switch to SMP mode. Looking at the code it looks like it will also try to patch init text which is no more there and will corrupt something else? There are range checks for both kernel (_text - _etext) and modules (.text section). Anything outside isn't patched. cheers, Gerd -- Gerd Hoffmann [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Will smp alternative try to patch init text also?
On Wed, Feb 14, 2007 at 11:51:31AM +0100, Gerd Hoffmann wrote: Vivek Goyal wrote: So what happens if somebody builds a SMP kernel and runs on a UP machine. Later it hotplus one CPU. Then kernel will switch to SMP mode. Looking at the code it looks like it will also try to patch init text which is no more there and will corrupt something else? There are range checks for both kernel (_text - _etext) and modules (.text section). Anything outside isn't patched. Oh... I missed that. Thanks. Vivek - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/