lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <469DD41A.10506@alcatel-lucent.com>
Date:	Wed, 18 Jul 2007 16:49:30 +0800
From:	gshan <gshan@...atel-lucent.com>
To:	linux-kernel@...r.kernel.org
Subject: How to include sysmap in 2.6 kernel image

Hey Guys,

Recently, I'm working on xmon. The xmon needs sysmap for symbol lookup, 
however I don't know how to include sysmap to uImage. I looked the 
kernel source code for a while and found the kernel image need contain 
struct bi_record *rec. Everybody knows how to include this?

arch/ppc/kernel/setup.c::parse_bootinfo()

void parse_bootinfo(struct bi_record *rec)
{
       if (rec == NULL || rec->tag != BI_FIRST)
               return;
       while (rec->tag != BI_LAST) {
               ulong *data = rec->data;

               printk(KERN_INFO "%s:*********** 0x%08lx\n", 
__FUNCTION__, rec->tag);

               switch (rec->tag) {
               case BI_CMD_LINE:
                       strlcpy(cmd_line, (void *)data, sizeof(cmd_line));
                       break;
               case BI_SYSMAP:
                       sysmap = (char *)((data[0] >= (KERNELBASE)) ? 
data[0] :
                                         (data[0]+KERNELBASE));
                       sysmap_size = data[1];
                       break;
#ifdef CONFIG_BLK_DEV_INITRD
               case BI_INITRD:
                       initrd_start = data[0] + KERNELBASE;
                       initrd_end = data[0] + data[1] + KERNELBASE;
                       break;
#endif /* CONFIG_BLK_DEV_INITRD */
#ifdef CONFIG_PPC_MULTIPLATFORM
               case BI_MACHTYPE:
                       _machine = data[0];
                       break;
#endif
               case BI_MEMSIZE:
                       boot_mem_size = data[0];
                       break;
               }
               rec = (struct bi_record *)((ulong)rec + rec->size);
       }
}


Thanks,
Gavin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ