public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ravikiran G Thirumalai <kiran@scalex86.org>
To: Ingo Molnar <mingo@elte.hu>, torvalds@linux-foundation.org
Cc: linux-kernel@vger.kernel.org,
	Glauber de Oliveira Costa <glommer@gmail.com>
Subject: [PATCH] x86: Fix 27-rc crash on vsmp due to paravirt during module load
Date: Mon, 22 Sep 2008 22:58:47 -0700	[thread overview]
Message-ID: <20080923055847.GA26882@localdomain> (raw)

27-rc fails to boot up if configured to use modules.  Turns out vsmp_patch
was marked __init, and vsmp_patch being the pvops 'patch' routine for vsmp,
a call to vsmp_patch just turns out to execute a code page with series of 0xcc
(POISON_FREE_INITMEM -- int3).  Since apply_paravirt can only be called during
init/module load, make vsmp_patch with "__init_or_module"

Please apply

Thanks,
Kiran
---

vsmp_patch has been marked with __init ever since pvops, however,
apply_paravirt can be called during module load causing calls to
freed memory location.

Since apply_paravirt can only be called during bootup and module load,
mark vsmp patch with "__init_or_module"

Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>

Index: linux-2.6/arch/x86/kernel/vsmp_64.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/vsmp_64.c	2008-09-19 11:37:54.000000000 -0700
+++ linux-2.6/arch/x86/kernel/vsmp_64.c	2008-09-21 15:50:18.000000000 -0700
@@ -61,7 +61,7 @@
 	native_restore_fl((flags | X86_EFLAGS_IF) & (~X86_EFLAGS_AC));
 }
 
-static unsigned __init vsmp_patch(u8 type, u16 clobbers, void *ibuf,
+static unsigned __init_or_module vsmp_patch(u8 type, u16 clobbers, void *ibuf,
 				  unsigned long addr, unsigned len)
 {
 	switch (type) {


             reply	other threads:[~2008-09-23  5:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-23  5:58 Ravikiran G Thirumalai [this message]
2008-09-23  8:31 ` [PATCH] x86: Fix 27-rc crash on vsmp due to paravirt during module load Ingo Molnar
2008-09-23 18:03   ` Ravikiran G Thirumalai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080923055847.GA26882@localdomain \
    --to=kiran@scalex86.org \
    --cc=glommer@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox