--- linux-2.2.17/arch/alpha/config.in~ Mon Sep 4 18:39:16 2000 +++ linux-2.2.17/arch/alpha/config.in Tue Oct 31 13:18:57 2000 @@ -299,8 +299,7 @@ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then tristate 'Kernel FP software completion' CONFIG_MATHEMU else define_bool CONFIG_MATHEMU y fi - -bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +source ../sysrq.in endmenu --- linux-2.2.17/arch/arm/config.in~ Wed Jun 7 22:26:42 2000 +++ linux-2.2.17/arch/arm/config.in Tue Oct 31 13:19:11 2000 @@ -214,7 +214,7 @@ mainmenu_option next_comment comment 'Kernel hacking' bool 'Debug kernel errors' CONFIG_DEBUG_ERRORS #bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC -bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +source ../sysrq.in endmenu --- linux-2.2.17/arch/i386/config.in~ Mon Sep 4 18:39:16 2000 +++ linux-2.2.17/arch/i386/config.in Tue Oct 31 13:29:03 2000 @@ -204,8 +204,7 @@ mainmenu_option next_comment comment 'Kernel hacking' #bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC -bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +source ../sysrq.in endmenu - --- linux-2.2.17/arch/m68k/config.in~ Wed Jun 7 22:26:42 2000 +++ linux-2.2.17/arch/m68k/config.in Tue Oct 31 13:19:27 2000 @@ -448,8 +448,8 @@ mainmenu_option next_comment comment 'Kernel hacking' #bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC -bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +source ../sysrq.in bool 'Remote debugging support' CONFIG_KGDB endmenu --- linux-2.2.17/arch/mips/config.in~ Wed Jun 7 22:26:42 2000 +++ linux-2.2.17/arch/mips/config.in Tue Oct 31 13:19:42 2000 @@ -303,7 +303,7 @@ bool ' Build fp execption handler module' CONFIG_MIPS_FPE_MODULE fi if [ "$CONFIG_SERIAL" = "y" ]; then bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG fi -bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +source ../sysrq.in endmenu --- linux-2.2.17/arch/ppc/config.in~ Mon Sep 4 18:39:16 2000 +++ linux-2.2.17/arch/ppc/config.in Tue Oct 31 13:20:01 2000 @@ -195,9 +195,9 @@ endmenu mainmenu_option next_comment comment 'Kernel hacking' -bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +source ../sysrq.in bool 'Include kgdb kernel debugger' CONFIG_KGDB bool 'Include xmon kernel debugger' CONFIG_XMON endmenu --- linux-2.2.17/arch/s390/config.in~ Wed Jun 7 22:26:42 2000 +++ linux-2.2.17/arch/s390/config.in Tue Oct 31 13:20:30 2000 @@ -66,8 +66,9 @@ int ' Profile shift count' CONFIG_PROFILE_SHIFT 2 fi if [ "$CONFIG_CTC" = "y" ]; then bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG fi -# this does not work. bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +##### this does not work. +# source ../sysrq.in +##### endmenu - --- linux-2.2.17/arch/sparc/config.in~ Wed Jun 7 22:26:42 2000 +++ linux-2.2.17/arch/sparc/config.in Tue Oct 31 13:20:43 2000 @@ -219,8 +219,7 @@ endmenu mainmenu_option next_comment comment 'Kernel hacking' -bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +source ../sysrq.in endmenu - --- linux-2.2.17/arch/sparc64/config.in~ Mon Sep 4 18:39:16 2000 +++ linux-2.2.17/arch/sparc64/config.in Tue Oct 31 13:21:02 2000 @@ -282,8 +282,8 @@ endmenu mainmenu_option next_comment comment 'Kernel hacking' -bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +source ../sysrq.in #bool 'ECache flush trap support at ta 0x72' CONFIG_EC_FLUSH_TRAP endmenu --- linux-2.2.17/arch/sysrq.in~ Thu Jan 1 01:00:00 1970 +++ linux-2.2.17/arch/sysrq.in Tue Oct 31 13:23:52 2000 @@ -0,0 +1,22 @@ +# +# For a description of the syntax of this configuration file, +# see Documentation/kbuild/config-language.txt. +# +# This section is included from the various arch-dependant +# config.in files, and provides the common SysRq options. +# This ensures that these options have a common description. +# +bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +if [ "$CONFIG_MAGIC_SYSRQ" = "y" -a "$CONFIG_EXPERIMENTAL" = "y" ]; then + bool ' Enable dump of syslog to floppy (EXPERIMENTAL)' CONFIG_MAGIC_SYSRQ_DUMPLOG + if [ "$CONFIG_MAGIC_SYSRQ_DUMPLOG" = "y" ]; then + choice ' SysLog buffer size' \ + " 32k CONFIG_MAGIC_SYSRQ_LOG_32K \ + 64k CONFIG_MAGIC_SYSRQ_LOG_64K \ + 128k CONFIG_MAGIC_SYSRQ_LOG_128K \ + 256k CONFIG_MAGIC_SYSRQ_LOG_256K \ + 512k CONFIG_MAGIC_SYSRQ_LOG_512K \ + 1024k CONFIG_MAGIC_SYSRQ_LOG_1M \ + 2048k CONFIG_MAGIC_SYSRQ_LOG_2M" 32k + fi +fi --- linux-2.2.17/Documentation/Configure.help~ Mon Sep 4 18:39:15 2000 +++ linux-2.2.17/Documentation/Configure.help Tue Oct 31 13:26:43 2000 @@ -10397,10 +10397,17 @@ immediately or dump some status information). This is accomplished by pressing various keys while holding SysRq (Alt+PrintScreen). The keys are documented in Documentation/sysrq.txt. Don't say Y unless you really know what this hack does. +System Request facility to dump the SysLog to /dev/fd0 +CONFIG_MAGIC_SYSRQ_DUMPLOG + If you say Y here, you will have the ability to dump that part of + the system log that is still in the kernel buffer area to the disc + in /dev/fd0 which will normally give you the ability to capture the + kernel panic messages that normally result in a system lockup. + ISDN subsystem CONFIG_ISDN ISDN ("Integrated Services Digital Networks", called RNIS in France) is a special type of fully digital telephone service; it's mostly used to connect to your Internet service provider (with SLIP or --- linux-2.2.17/drivers/char/sysrq.c~ Thu May 4 01:16:39 2000 +++ linux-2.2.17/drivers/char/sysrq.c Tue Oct 31 13:11:35 2000 @@ -131,16 +131,25 @@ case 'l': /* L -- kill all processes including init */ printk("Kill ALL Tasks (even init)\n"); send_sig_all(SIGKILL, 1); orig_log_level = 8; break; +#ifdef CONFIG_MAGIC_SYSRQ_DUMPLOG + case 'd': /* D -- dump syslog to /dev/fd0 */ + printk("Dump SysLog to /dev/fd0\n"); + printk("(Not yet implemented)\n"); + break; +#endif default: /* Unknown: help */ if (kbd) printk("unRaw "); #ifdef CONFIG_VT if (tty) printk("saK "); +#endif +#ifdef CONFIG_MAGIC_SYSRQ_DUMPLOG + printk("Dump "); #endif printk("Boot "); if (sysrq_power_off) printk("Off "); printk("Sync Unmount showPc showTasks showMem loglevel0-8 tErm kIll killalL\n"); --- linux-2.2.17/kernel/printk.c~ Sat Oct 28 10:01:20 2000 +++ linux-2.2.17/kernel/printk.c Tue Oct 31 13:15:01 2000 @@ -20,11 +20,36 @@ #include #include #include -#define LOG_BUF_LEN (16384) +#ifndef CONFIG_MAGIC_SYSRQ_DUMPLOG +# define LOG_BUF_LEN (16 * 1024) +#else +# ifdef CONFIG_MAGIC_SYSRQ_LOG_32K +# define LOG_BUF_LEN (32 * 1024) +# endif +# ifdef CONFIG_MAGIC_SYSRQ_LOG_64K +# define LOG_BUF_LEN (64 * 1024) +# endif +# ifdef CONFIG_MAGIC_SYSRQ_LOG_128K +# define LOG_BUF_LEN (128 * 1024) +# endif +# ifdef CONFIG_MAGIC_SYSRQ_LOG_256K +# define LOG_BUF_LEN (256 * 1024) +# endif +# ifdef CONFIG_MAGIC_SYSRQ_LOG_512K +# define LOG_BUF_LEN (512 * 1024) +# endif +# ifdef CONFIG_MAGIC_SYSRQ_LOG_1M +# define LOG_BUF_LEN (1 * 1024 * 1024) +# endif +# ifdef CONFIG_MAGIC_SYSRQ_LOG_2M +# define LOG_BUF_LEN (2 * 1024 * 1024) +# endif +#endif + #define LOG_BUF_MASK (LOG_BUF_LEN-1) static char buf[1024]; /* printk's without a loglevel use this.. */