LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Errors when compiling kernel with grsecurity (https://www.linuxquestions.org/questions/linux-kernel-70/errors-when-compiling-kernel-with-grsecurity-4175575938/)

Gremerun 03-26-2016 09:57 PM

Errors when compiling kernel with grsecurity
 
I am trying to compile a kernel with the grsecurity patch. When I run the actual patch command (patch -p1 < ../grsecurity-3.1-4.4.6-201603221748.patch) I get an output that looks like this, this is only a small bit of it:

Code:

13 out of 13 hunks ignored -- saving rejects to file arch/x86/kernel/process.c.rej
patching file arch/x86/kernel/process_32.c
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
7 out of 7 hunks ignored -- saving rejects to file arch/x86/kernel/process_32.c.rej
patching file arch/x86/kernel/process_64.c
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
5 out of 5 hunks ignored -- saving rejects to file arch/x86/kernel/process_64.c.rej
patching file arch/x86/kernel/ptrace.c
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
9 out of 9 hunks ignored -- saving rejects to file arch/x86/kernel/ptrace.c.rej
patching file arch/x86/kernel/pvclock.c
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file arch/x86/kernel/pvclock.c.rej
patching file arch/x86/kernel/reboot.c
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.

I mostly clicked the default on that because of the amount there was, when I compiled with (fakeroot make deb-pkg) I got these errors:

Code:

cc1: some warnings being treated as errors
Kbuild:80: recipe for target 'arch/x86/kernel/asm-offsets.s' failed
make[3]: *** [arch/x86/kernel/asm-offsets.s] Error 1
Makefile:1001: recipe for target 'prepare0' failed
make[2]: *** [prepare0] Error 2
scripts/package/Makefile:91: recipe for target 'deb-pkg' failed
make[1]: *** [deb-pkg] Error 2
Makefile:1253: recipe for target 'deb-pkg' failed
make: *** [deb-pkg] Error 2


I feel like the problem is applying the patch, I'm not sure what the output means but I think it is saying that the patch has already been applied. But how can this be? I downloaded it from kernel.org and applied it straight away.

Thank you for any help.

Keith Hedger 03-28-2016 06:56 AM

The filea you are trying to patch have had the patch applied, probably upstream or due to a previous patch, check you actually need to apply this patch on this version of the siftware


All times are GMT -5. The time now is 10:26 AM.