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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 07 Sep 2011 14:54:54 +0200
From:	Michal Marek <mmarek@...e.cz>
To:	Shakthi Kannan <shakthimaan@...il.com>
Cc:	linux-kernel@[209.132.180.67]
Subject: Re: CRC calculation in Module.symvers

On 7.9.2011 07:58, Shakthi Kannan wrote:
> 1. How the CRC is computed for an exported symbol present in
> Module.symvers file, and

The symbol type is recursively expanded and a checksum is computed from
the expanded


> 2. Given a kernel .c file, how can I obtain the CRC checksums for a symbol.
> 
> For linux-3.0.2 (example), I compiled with CONFIG_MODVERSIONS=y, and
> running 'make' built vmlinux, and generated the Module.symvers file. I
> believe genksyms is used to create the Module.symvers file?
> 
> I had referred the "Kernel Symbols and CONFIG_MODVERSIONS"
> documentation [1] written by Mark McLoughlin. I tried the following in
> the top-level kernel sources:
> 
>  $ gcc -E -D__GENKSYMS__ -DCONFIG_MODVERSIONS -DEXPORT_SYMTAB
> crypto/api.c -I/tmp/linux-3.0.2/include
> -I/tmp/linux-3.0.2/arch/x86/include | ./scripts/genksyms/genksyms

You need at least -include include/generated/autoconf.h, but the easies
would be

$ make V=1 crypto/api.symtypes

this will generate a file with the symbol expansions. And if you copy
the commandline without the >/dev/null redirection, you'll see the
calculated checksums on standard output.

Michal
--
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