mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* patching kdb to Centos kernel : error
@ 2008-08-17  6:00 Satish Eerpini
  2008-08-17  6:42 ` Valdis.Kletnieks
  0 siblings, 1 reply; 3+ messages in thread
From: Satish Eerpini @ 2008-08-17  6:00 UTC (permalink / raw)
  To: linux-kernel

hi everyone , i was trying to patch kdb with CentOS 5.0 kernel
(2.6.18-8) , and had a few rejects ( which i am still trying to
resolve) ,.... but apart from the rejects during the kernel
compilation i got the following error which does not seem to have
anything to do with the rejects ............
i have got an error in a kdb module, which has nothing to do with the
rejected patches ( or so i guess ) :

              kdb/modules/kdbm_pg.c: In function 'kdbm_show_page':
              kdb/modules/kdbm_pg.c:349: error: implicit declaration
of function 'PageChecked'
              kdb/modules/kdbm_pg.c: In function 'kdbm_inode':
              kdb/modules/kdbm_pg.c:507: error: 'struct inode' has no
member named 'u'

 the code(in kdb/modules/kdbm_pg.c) which is causing the second error
is something like this :

             iaddr += offsetof(struct inode, u);

what i am not able to understand is that if 'u' is not a correct
member of the inode , .. then what did they( whoever wrote this piece
code) intend by 'u' ? , .....

....
and for the first error , ... i just checked out the code ....
according to the line no shown in the error .....the code is :

             kdb_page_flags(page, Checked);

and i don't see any function PageChecked ....! so what can the error
actually mean ??

Thanks in advance
Satish
--
http://satish.playdrupal.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: patching kdb to Centos kernel : error
  2008-08-17  6:00 patching kdb to Centos kernel : error Satish Eerpini
@ 2008-08-17  6:42 ` Valdis.Kletnieks
  2008-08-17 11:13   ` Satish Eerpini
  0 siblings, 1 reply; 3+ messages in thread
From: Valdis.Kletnieks @ 2008-08-17  6:42 UTC (permalink / raw)
  To: Satish Eerpini; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1597 bytes --]

On Sun, 17 Aug 2008 11:30:41 +0530, Satish Eerpini said:
> hi everyone , i was trying to patch kdb with CentOS 5.0 kernel
> (2.6.18-8) 

You might want to make sure you're using a 2.6.18-vintage kdb patch, as
trying to fit a 2.6.26 kdb onto a 2.6.18 kernel is unlikely to bring joy.

> resolve) ,.... but apart from the rejects during the kernel
> compilation i got the following error which does not seem to have
> anything to do with the rejects ............

No, the rejects during the patch are almost certainly related to your
compile errors...

>  the code(in kdb/modules/kdbm_pg.c) which is causing the second error
> is something like this :
> 
>              iaddr += offsetof(struct inode, u);
> 
> what i am not able to understand is that if 'u' is not a correct
> member of the inode , .. then what did they( whoever wrote this piece
> code) intend by 'u' ? , .....

Your kdb patch probably includes a patch to include/linux/fs.h that adds a
member 'u' to a 'struct inode'.  If this generated a reject, then the member 'u'
won't be in the struct, and your compile dies...

> and for the first error , ... i just checked out the code ....
> according to the line no shown in the error .....the code is :
> 
>              kdb_page_flags(page, Checked);
> 
> and i don't see any function PageChecked ....! so what can the error
> actually mean ??

kdb_page_flags is probably a macro that does something like:

#define kdb_page_flags(a,b) (..... Page##b)

The 'implicit declaration' is most likely a missing #include someplace,
which again hints at the rejects from a misapplied patch...

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: patching kdb to Centos kernel : error
  2008-08-17  6:42 ` Valdis.Kletnieks
@ 2008-08-17 11:13   ` Satish Eerpini
  0 siblings, 0 replies; 3+ messages in thread
From: Satish Eerpini @ 2008-08-17 11:13 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: linux-kernel

i am patching kdb-v4.4-2.6.18-common-1 and kdb-v4.4-2.6.18-i386-1

and following are the rejects i got , ... and nowhere could i make
sense for the above mentioned errors , ... am i missing on something
over here ?

include/linux/sysctl.h.rej from kdb-v4.4-2.6.18-common-1 ( i could fix
this, or so i think , ... by manually adding the macro definitions to
the header file , .... and i agree i am totally unaware of the
consequences )

***************
*** 150,155 ****
  	KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */
  	KERN_COMPAT_LOG=73,	/* int: print compat layer  messages */
  	KERN_MAX_LOCK_DEPTH=74,
  };


--- 150,156 ----
  	KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */
  	KERN_COMPAT_LOG=73,	/* int: print compat layer  messages */
  	KERN_MAX_LOCK_DEPTH=74,
+ 	KERN_KDB=75,		/* int: kdb on/off */
  };


arch/i386/kernel/traps.c.rej from  kdb-v4.4-2.6.18-i386-1 :

***************
*** 786,791 ****
  	printk(" on CPU%d, eip %08lx, registers:\n",
  		smp_processor_id(), regs->eip);
  	show_registers(regs);
  	printk(KERN_EMERG "console shuts up ...\n");
  	console_silent();
  	spin_unlock(&nmi_print_lock);
--- 797,805 ----
  	printk(" on CPU%d, eip %08lx, registers:\n",
  		smp_processor_id(), regs->eip);
  	show_registers(regs);
+ #ifdef	CONFIG_KDB
+ 	kdb(KDB_REASON_NMI, 0, regs);
+ #endif	/* CONFIG_KDB */
  	printk(KERN_EMERG "console shuts up ...\n");
  	console_silent();
  	spin_unlock(&nmi_print_lock);

arch/i386/kernel/vmlinux.lds.S.rej from kdb-v4.4-2.6.18-i386-1 :

***************
*** 134,139 ****
  	*(.con_initcall.init)
    }
    __con_initcall_end = .;
    SECURITY_INIT
    . = ALIGN(4);
    __alt_instructions = .;
--- 134,144 ----
  	*(.con_initcall.init)
    }
    __con_initcall_end = .;
+   __kdb_initcall_start = .;
+   .kdb_initcall.init : AT(ADDR(.kdb_initcall.init) - LOAD_OFFSET) {
+ 	*(.kdb_initcall.init)
+   }
+   __kdb_initcall_end = .;
    SECURITY_INIT
    . = ALIGN(4);
    __alt_instructions = .;


, .... i seem to be using the correct kdb patch but the rejects seem
to be the result of the fact that redhat guys have a lot of custom
patches which are added to get the redhat/CentOS kernel . Also because
i could patch kernel 2.6.18.4 without any problems what so ever .



Thanks
Satish

  On Sun, Aug 17, 2008 at 12:12 PM,  <Valdis.Kletnieks@vt.edu> wrote:
> On Sun, 17 Aug 2008 11:30:41 +0530, Satish Eerpini said:
>> hi everyone , i was trying to patch kdb with CentOS 5.0 kernel
>> (2.6.18-8)
>
> You might want to make sure you're using a 2.6.18-vintage kdb patch, as
> trying to fit a 2.6.26 kdb onto a 2.6.18 kernel is unlikely to bring joy.
>
>> resolve) ,.... but apart from the rejects during the kernel
>> compilation i got the following error which does not seem to have
>> anything to do with the rejects ............
>
> No, the rejects during the patch are almost certainly related to your
> compile errors...
>
>>  the code(in kdb/modules/kdbm_pg.c) which is causing the second error
>> is something like this :
>>
>>              iaddr += offsetof(struct inode, u);
>>
>> what i am not able to understand is that if 'u' is not a correct
>> member of the inode , .. then what did they( whoever wrote this piece
>> code) intend by 'u' ? , .....
>
> Your kdb patch probably includes a patch to include/linux/fs.h that adds a
> member 'u' to a 'struct inode'.  If this generated a reject, then the member 'u'
> won't be in the struct, and your compile dies...
>
>> and for the first error , ... i just checked out the code ....
>> according to the line no shown in the error .....the code is :
>>
>>              kdb_page_flags(page, Checked);
>>
>> and i don't see any function PageChecked ....! so what can the error
>> actually mean ??
>
> kdb_page_flags is probably a macro that does something like:
>
> #define kdb_page_flags(a,b) (..... Page##b)
>
> The 'implicit declaration' is most likely a missing #include someplace,
> which again hints at the rejects from a misapplied patch...
>



-- 
http://satish.playdrupal.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-17 11:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-17  6:00 patching kdb to Centos kernel : error Satish Eerpini
2008-08-17  6:42 ` Valdis.Kletnieks
2008-08-17 11:13   ` Satish Eerpini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®