Luigi Rizzo schrieb: > In a nutshell, the kmodpatch utility can print or alter the content > of device/quirk tables in kernel modules (I think Linux has some > similar tool, though i don't remember the name -- or perhaps it is > a feature of insmod ?). This looks useful for experimentation. > Feedback welcome. Attached is a slightly cleaned up version of your tool. I style(9)ified it a bit, added const and static, removed unused stuff (asm("jmp foo")?), added error checks in some places, which were missing, and ensured that the table read in from file is NUL-terminated. I also marked one place with XXX, where I think there is an off-by-one error. > DESCRIPTION > [...] > A couple of real life examples: > > kmodpatch umass.ko - _at_0 0x4050 0x4a5 0x0101 0x4200 > set the kernel to use flags UMASS_PROTO_SCSI | UMASS_PROTO_BBB and > quirks WRONG_CSWSIG | NO_SYNCHRONIZE_CACHE for a certain GSM phone > that implements the umass interface; > > kmodpatch uscanner.ko - _at_0 0x04b8 0x084a 0 > let uscanner.ko recognise a newly introduced MFP scanner device. I think, this should be moved into the EXAMPLES section. Regards Christoph PS: Hopefully you haven't forgotten my patch.Received on Thu Jan 01 2009 - 19:27:55 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:39 UTC