LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-07-2006, 12:01 AM   #1
synapse
Member
 
Registered: Jan 2004
Location: On Planet Earth.
Distribution: Slackware 12
Posts: 244

Rep: Reputation: 30
how to patch (or what to patch )


Hi

Recently i got a smc wireless network interface (usb) and following certain links I found I had to use the ndiswrapper to start this device, this is working, secondly I have to patch the kernel someware and this is the part im struggling with. This is the patch script.

What exactly do I patch ( A little confuzed thanx )

Running slackware 11
Toshiba sattelite L-20
2.6.18.1 kernel



diff -urN linux-2.6.18/arch/i386/Kconfig.debug linux-2.6.18-16kstacks/arch/i386/Kconfig.debug
--- linux-2.6.18/arch/i386/Kconfig.debug 2006-09-19 23:42:06.000000000 -0400
+++ linux-2.6.18-16kstacks/arch/i386/Kconfig.debug 2006-09-27 13:09:54.000000000 -0400
@@ -66,6 +66,14 @@
on the VM subsystem for higher order allocations. This option
will also use IRQ stacks to compensate for the reduced stackspace.

+config 16KSTACKS
+ bool "Use 16Kb for kernel stacks instead of 8Kb"
+ depends on DEBUG_KERNEL
+ help
+ If you say Y here the kernel will use a 16Kb stacksize for the
+ kernel stack attached to each process/thread. This option
+ will also use IRQ stacks to compensate for the reduced stackspace.
+
config X86_FIND_SMP_CONFIG
bool
depends on X86_LOCAL_APIC || X86_VOYAGER
diff -urN linux-2.6.18/arch/i386/defconfig linux-2.6.18-16kstacks/arch/i386/defconfig
--- linux-2.6.18/arch/i386/defconfig 2006-09-19 23:42:06.000000000 -0400
+++ linux-2.6.18-16kstacks/arch/i386/defconfig 2006-09-27 13:09:54.000000000 -0400
@@ -1518,12 +1518,14 @@
#
# CONFIG_PRINTK_TIME is not set
CONFIG_MAGIC_SYSRQ=y
-# CONFIG_DEBUG_KERNEL is not set
+CONFIG_DEBUG_KERNEL=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_EARLY_PRINTK=y
CONFIG_X86_FIND_SMP_CONFIG=y
CONFIG_X86_MPPARSE=y
+# CONFIG_4KSTACKS is not set
+CONFIG_16KSTACKS=y

#
# Security options
diff -urN linux-2.6.18/arch/i386/kernel/irq.c linux-2.6.18-16kstacks/arch/i386/kernel/irq.c
--- linux-2.6.18/arch/i386/kernel/irq.c 2006-09-19 23:42:06.000000000 -0400
+++ linux-2.6.18-16kstacks/arch/i386/kernel/irq.c 2006-09-27 13:11:05.000000000 -0400
@@ -33,7 +33,7 @@
}
#endif

-#ifdef CONFIG_4KSTACKS
+#if defined(CONFIG_4KSTACKS) || defined(CONFIG_16KSTACKS)
/*
* per-CPU IRQ handling contexts (thread information and stack)
*/
@@ -55,7 +55,7 @@
{
/* high bit used in ret_from_ code */
int irq = ~regs->orig_eax;
-#ifdef CONFIG_4KSTACKS
+#if defined(CONFIG_4KSTACKS) || defined(CONFIG_16KSTACKS)
union irq_ctx *curctx, *irqctx;
u32 *isp;
#endif
@@ -82,7 +82,7 @@
}
#endif

-#ifdef CONFIG_4KSTACKS
+#if defined(CONFIG_4KSTACKS) || defined(CONFIG_16KSTACKS)

curctx = (union irq_ctx *) current_thread_info();
irqctx = hardirq_ctx[smp_processor_id()];
@@ -126,7 +126,7 @@
return 1;
}

-#ifdef CONFIG_4KSTACKS
+#if defined(CONFIG_4KSTACKS) || defined(CONFIG_16KSTACKS)

/*
* These should really be __section__(".bss.page_aligned") as well, but
diff -urN linux-2.6.18/include/asm-i386/irq.h linux-2.6.18-16kstacks/include/asm-i386/irq.h
--- linux-2.6.18/include/asm-i386/irq.h 2006-09-19 23:42:06.000000000 -0400
+++ linux-2.6.18-16kstacks/include/asm-i386/irq.h 2006-09-27 13:09:54.000000000 -0400
@@ -24,7 +24,7 @@
# define ARCH_HAS_NMI_WATCHDOG /* See include/linux/nmi.h */
#endif

-#ifdef CONFIG_4KSTACKS
+#if defined(CONFIG_4KSTACKS) || defined(CONFIG_16KSTACKS)
extern void irq_ctx_init(int cpu);
extern void irq_ctx_exit(int cpu);
# define __ARCH_HAS_DO_SOFTIRQ
diff -urN linux-2.6.18/include/asm-i386/module.h linux-2.6.18-16kstacks/include/asm-i386/module.h
--- linux-2.6.18/include/asm-i386/module.h 2006-09-19 23:42:06.000000000 -0400
+++ linux-2.6.18-16kstacks/include/asm-i386/module.h 2006-09-27 13:09:54.000000000 -0400
@@ -69,8 +69,12 @@
#ifdef CONFIG_4KSTACKS
#define MODULE_STACKSIZE "4KSTACKS "
#else
+#ifdef CONFIG_16KSTACKS
+#define MODULE_STACKSIZE "16KSTACKS "
+#else
#define MODULE_STACKSIZE ""
#endif
+#endif

#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_REGPARM MODULE_STACKSIZE

diff -urN linux-2.6.18/include/asm-i386/thread_info.h linux-2.6.18-16kstacks/include/asm-i386/thread_info.h
--- linux-2.6.18/include/asm-i386/thread_info.h 2006-09-19 23:42:06.000000000 -0400
+++ linux-2.6.18-16kstacks/include/asm-i386/thread_info.h 2006-09-27 13:09:54.000000000 -0400
@@ -56,8 +56,12 @@
#ifdef CONFIG_4KSTACKS
#define THREAD_SIZE (4096)
#else
+#ifdef CONFIG_16KSTACKS
+#define THREAD_SIZE (16384)
+#else
#define THREAD_SIZE (8192)
#endif
+#endif

#define STACK_WARN (THREAD_SIZE/8)
/*
 
Old 11-07-2006, 01:22 AM   #2
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
try skipping the patch. Ussually the larger stack size is a work around for possible crashes with windows drivers under linuxant/ndiswrapper.

If you still want to try it tho, do this:

Code:
cd /usr/src/linux
patch -p1 -i /path/to/nameofpatch.patch
Then you have to recompile your kernel (after you 'make menuconfig' and enable that new option) and reboot with the new kernel. Check the sticky up top if your unsure how to go about that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i patch 2.4.21-37 kernel with antidote2 security patch suchi Linux - Kernel 4 09-05-2006 02:29 AM
Unable to patch 2.6.11.7 kernel with Reiser4 mm patch SlackwareInAZ Slackware 9 04-26-2005 06:33 AM
How to Install patch-o-matic(a iptables patch) on redhat 9? itebooks Linux - Security 1 07-23-2004 08:51 AM
debian-patch-debianlogo w/2.6.5 kernel-patch-lpp Outabux Debian 11 05-20-2004 01:21 PM
How to Apply patch for Mass Storage device to work? (uss725-2.4.20-rc2.patch) cevjr Linux - Hardware 3 04-20-2004 11:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration