History

bin2c: move bin2c in scripts/basic

This patch series does not do kernel signature verification yet. I plan to post another patch series for that. Now distributions are already signing PE/COFF bzImage with PKCS7 signature I plan to parse and verify those signatures. Primary goal of this patchset is to prepare groundwork so that kernel image can be signed and signatures be verified during kexec load. This should help with two things. - It should allow kexec/kdump on secureboot enabled machines. - In general it can help even without secureboot. By being able to verify kernel image signature in kexec, it should help with avoiding module signing restrictions. Matthew Garret showed how to boot into a custom kernel, modify first kernel's memory and then jump back to old kernel and bypass any policy one wants to. This patch (of 15): Kexec wants to use bin2c and it wants to use it really early in the build process. See arch/x86/purgatory/ code in later patches. So move bin2c in scripts/basic so that it can be built very early and be usable by arch/x86/purgatory/

Vivek Goyal committed 12 years ago

Commit 8370ede1 parent 05f65b56 files · +6 −7Browse files

Showing the changes to scripts (5 of 6 files). Show all

Unified · Split

5 files
  1. scripts/.gitignore +0 −1
  2. scripts/Makefile +0 −1
  3. scripts/basic/.gitignore +1 −0
  4. scripts/basic/Makefile +1 −0
  5. scripts/basic/bin2c.c +3 −4
scripts/.gitignore+0−1
@@ -4,7 +4,6 @@ · 3 unmodified lines
4conmakehash4conmakehash
5kallsyms5kallsyms
6pnmtologo6pnmtologo
7bin2c
8unifdef7unifdef
9ihex2fw8ihex2fw
10recordmcount9recordmcount
scripts/Makefile+0−1
@@ -13,7 +13,6 @@ HOST_EXTRACFLAGS += -I$(srctree)/tools/include · 12 unmodified lines
13hostprogs-$(CONFIG_KALLSYMS) += kallsyms13hostprogs-$(CONFIG_KALLSYMS) += kallsyms
14hostprogs-$(CONFIG_LOGO) += pnmtologo14hostprogs-$(CONFIG_LOGO) += pnmtologo
15hostprogs-$(CONFIG_VT) += conmakehash15hostprogs-$(CONFIG_VT) += conmakehash
16hostprogs-$(CONFIG_IKCONFIG) += bin2c
17hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount16hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount
18hostprogs-$(CONFIG_BUILDTIME_EXTABLE_SORT) += sortextable17hostprogs-$(CONFIG_BUILDTIME_EXTABLE_SORT) += sortextable
19hostprogs-$(CONFIG_ASN1) += asn1_compiler18hostprogs-$(CONFIG_ASN1) += asn1_compiler
scripts/basic/.gitignore+1−0
@@ -1 +1,2 @@
1fixdep1fixdep
2bin2c
scripts/basic/Makefile+1−0
@@ -9,6 +9,7 @@ · 8 unmodified lines
9# fixdep: Used to generate dependency information during build process9# fixdep: Used to generate dependency information during build process
10 10
11hostprogs-y := fixdep11hostprogs-y := fixdep
12hostprogs-$(CONFIG_IKCONFIG) += bin2c
12always := $(hostprogs-y)13always := $(hostprogs-y)
13 14
14# fixdep is needed to compile other host programs15# fixdep is needed to compile other host programs
scripts/basic/bin2c.crenamed from scripts/bin2c.c+3−4
@@ -11,7 +11,7 @@ · 10 unmodified lines
11 11
12int main(int argc, char *argv[])12int main(int argc, char *argv[])
13{13{
14 int ch, total=0;14 int ch, total = 0;
15 15
16 if (argc > 1)16 if (argc > 1)
17 printf("const char %s[] %s=\n",17 printf("const char %s[] %s=\n",
@@ -19,10 +19,9 @@ int main(int argc, char *argv[]) · 1 unmodified line
19 19
20 do {20 do {
21 printf("\t\"");21 printf("\t\"");
22 while ((ch = getchar()) != EOF)22 while ((ch = getchar()) != EOF) {
23 {
24 total++;23 total++;
25 printf("\\x%02x",ch);24 printf("\\x%02x", ch);
26 if (total % 16 == 0)25 if (total % 16 == 0)
27 break;26 break;
28 }27 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t