Giter VIP home page Giter VIP logo

Comments (11)

jpoimboe avatar jpoimboe commented on June 17, 2024

Hm, is that the full log file? I didn't see any errors. What patch did you use?

from kpatch.

kim0 avatar kim0 commented on June 17, 2024

The patch was this: http://paste.fedoraproject.org/101714/14000722

This is basically a concatenation of two patches that fix cve-2014-0196. The patches were extracted directly from git (git format-patch -1 ). Not sure if the free form text before the patches destroy the patch, or if concat'ing the 2 files would cause this. Either way, I guess a more friendly error message is due. Thanks a lot!

from kpatch.

jpoimboe avatar jpoimboe commented on June 17, 2024

@kim0 Are you sure the log file isn't truncated?

I'm not able to recreate because I have the 3.14.3-200.fc20.x86_64 kernel for which the patches seem to be already applied.

from kpatch.

kim0 avatar kim0 commented on June 17, 2024

@jpoimboe I re-ran this to test, it's still failing. I'm specifically on the old kernel to test patching this bug out (planning to write an article on this). You can get the old kernel srpm from http://kojipkgs.fedoraproject.org//packages/kernel/3.14.2/200.fc20/src/kernel-3.14.2-200.fc20.src.rpm

So here's exactly what I did this time:
1- Build a kernel from that SRPM referenced above, booted my system from that
2- Ran: ./kpatch/kpatch-build/kpatch-build all.patch -r kernel-3.14.2-200.fc20.src.rpm
Using cache at /root/.kpatch/3.14.2-200.fc20.x86_64/src
Testing patch file
checking file drivers/tty/n_tty.c
checking file drivers/tty/tty_buffer.c
Building original kernel
Building patched kernel
Detecting changed objects
Rebuilding changed objects
Extracting new and modified ELF sections
ERROR: kpatch build failed. Check /tmp/kpatch-build-1400171485.log for more details.

3- md5sum /tmp/kpatch-build-1400171485.log
aef0381b6b439169d4ee273371b117da /tmp/kpatch-build-1400171485.log

4- # fpaste /tmp/kpatch-build-1400171485.log
Uploading (7.0KiB)...
http://ur1.ca/hbm2s -> http://paste.fedoraproject.org/102168/40017544

5- As a bonus, I did an extra debug build and tar/bz2'ed the directory, which you can download form https://mega.co.nz/#!NpMEHYQJ!ez8HoC-LS4nV9aj0ow32hjZahYFX6dGGgOXlM5sK8j0

Thanks!

from kpatch.

jpoimboe avatar jpoimboe commented on June 17, 2024

@kim0 Thanks for the koji source RPM link, I didn't know about that. I'm able to recreate now. Taking a look.

from kpatch.

jpoimboe avatar jpoimboe commented on June 17, 2024

@kim0 It turns out we were getting a seg fault in the patch build utility. It should be fixed now. Let us know if you have any more issues.

from kpatch.

kim0 avatar kim0 commented on June 17, 2024

Thanks! It does build correctly now, however the resulting .ko does not load. See below. Thanks!

[root@f20-kim0labs ~]# kpatch info kpatch-all.ko
Patch information for kpatch-all.ko:
filename: /root/kpatch-all.ko
license: GPL
depends: kpatch
vermagic: 3.14.2-200.fc20.x86_64 SMP mod_unload
parm: replace:replace all previously loaded patch modules (bool)
[root@f20-kim0labs ~]#
[root@f20-kim0labs ~]#
[root@f20-kim0labs ~]# kpatch load kpatch-all.ko
loading patch module: kpatch-all.ko
insmod: ERROR: could not insert module kpatch-all.ko: Invalid module format
kpatch: failed to load patch kpatch-all.ko

from kpatch.

sjenning avatar sjenning commented on June 17, 2024

@kim0 what does your dmesg say? (just the last few lines that show the module loading errors)

from kpatch.

kim0 avatar kim0 commented on June 17, 2024

a ha, seems that's because I'm running a compiled kernel, and I went with fedora's recommendation and added a different buildid

[13081.886317] kpatch_all: version magic '3.14.2-200.fc20.x86_64 SMP mod_unload ' should be '3.14.2-200.kim0.fc20.x86_64 SMP mod_unload '

Any suggestions how to work around this last hurdle

from kpatch.

jpoimboe avatar jpoimboe commented on June 17, 2024

@kim0 Do you happen to have a source RPM for the .kim0 kernel?

from kpatch.

jpoimboe avatar jpoimboe commented on June 17, 2024

If so, that would be easiest. Just point kpatch-build to the new source RPM with '-r'.

from kpatch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.