1. 23 8月, 2007 1 次提交
  2. 18 7月, 2007 1 次提交
    • T
      kallsyms: make KSYM_NAME_LEN include space for trailing '\0' · 9281acea
      Tejun Heo 提交于
      KSYM_NAME_LEN is peculiar in that it does not include the space for the
      trailing '\0', forcing all users to use KSYM_NAME_LEN + 1 when allocating
      buffer.  This is nonsense and error-prone.  Moreover, when the caller
      forgets that it's very likely to subtly bite back by corrupting the stack
      because the last position of the buffer is always cleared to zero.
      
      This patch increments KSYM_NAME_LEN by one and updates code accordingly.
      
      * off-by-one bug in asm-powerpc/kprobes.h::kprobe_lookup_name() macro
        is fixed.
      
      * Where MODULE_NAME_LEN and KSYM_NAME_LEN were used together,
        MODULE_NAME_LEN was treated as if it didn't include space for the
        trailing '\0'.  Fix it.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Acked-by: NPaulo Marques <pmarques@grupopie.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9281acea
  3. 17 7月, 2007 2 次提交
  4. 12 7月, 2007 1 次提交
    • T
      sysfs: kill unnecessary attribute->owner · 7b595756
      Tejun Heo 提交于
      sysfs is now completely out of driver/module lifetime game.  After
      deletion, a sysfs node doesn't access anything outside sysfs proper,
      so there's no reason to hold onto the attribute owners.  Note that
      often the wrong modules were accounted for as owners leading to
      accessing removed modules.
      
      This patch kills now unnecessary attribute->owner.  Note that with
      this change, userland holding a sysfs node does not prevent the
      backing module from being unloaded.
      
      For more info regarding lifetime rule cleanup, please read the
      following message.
      
        http://article.gmane.org/gmane.linux.kernel/510293
      
      (tweaked by Greg to not delete the field just yet, to make it easier to
      merge things properly.)
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7b595756
  5. 09 5月, 2007 7 次提交
  6. 03 5月, 2007 3 次提交
  7. 28 4月, 2007 1 次提交
  8. 03 4月, 2007 1 次提交
  9. 10 3月, 2007 1 次提交
  10. 24 2月, 2007 2 次提交
  11. 17 2月, 2007 3 次提交
  12. 08 2月, 2007 3 次提交
  13. 06 1月, 2007 1 次提交
  14. 31 12月, 2006 1 次提交
  15. 14 12月, 2006 1 次提交
  16. 08 12月, 2006 1 次提交
  17. 04 12月, 2006 1 次提交
  18. 02 12月, 2006 1 次提交
  19. 31 10月, 2006 1 次提交
  20. 29 10月, 2006 1 次提交
  21. 12 10月, 2006 1 次提交
    • F
      [PATCH] fix Module taint flags listing in Oops/panic · fa3ba2e8
      Florin Malita 提交于
      Module taint flags listing in Oops/panic has a couple of issues:
      
      * taint_flags() doesn't null-terminate the buffer after printing the flags
      
      * per-module taints are only set if the kernel is not already tainted
        (with that particular flag) => only the first offending module gets its
        taint info correctly updated
      
      Some additional changes:
      
      * 'license_gplok' is no longer needed - equivalent to !(taints &
        TAINT_PROPRIETARY_MODULE) - so we can drop it from struct module *
        exporting module taint info via /proc/module:
      
      pwc 88576 0 - Live 0xf8c32000
      evilmod 6784 1 pwc, Live 0xf8bbf000 (PF)
      Signed-off-by: NFlorin Malita <fmalita@gmail.com>
      Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      fa3ba2e8
  22. 03 10月, 2006 1 次提交
    • F
      [PATCH] Create kallsyms_lookup_size_offset() · ffc50891
      Franck Bui-Huu 提交于
      Some uses of kallsyms_lookup() do not need to find out the name of a symbol
      and its module's name it belongs.  This is specially true in arch specific
      code, which needs to unwind the stack to show the back trace during oops
      (mips is an example).  In this specific case, we just need to retreive the
      function's size and the offset of the active intruction inside it.
      
      Adds a new entry "kallsyms_lookup_size_offset()" This new entry does
      exactly the same as kallsyms_lookup() but does not require any buffers to
      store any names.
      
      It returns 0 if it fails otherwise 1.
      Signed-off-by: NFranck Bui-Huu <vagabon.xyz@gmail.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ffc50891
  23. 02 10月, 2006 1 次提交
    • R
      [PATCH] list module taint flags in Oops/panic · 2bc2d61a
      Randy Dunlap 提交于
      When listing loaded modules during an oops or panic, also list each
      module's Tainted flags if non-zero (P: Proprietary or F: Forced load only).
      
      If a module is did not taint the kernel, it is just listed like
      	usbcore
      but if it did taint the kernel, it is listed like
      	wizmodem(PF)
      
      Example:
      [ 3260.121718] Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP:
      [ 3260.121729]  [<ffffffff8804c099>] :dump_test:proc_dump_test+0x99/0xc8
      [ 3260.121742] PGD fe8d067 PUD 264a6067 PMD 0
      [ 3260.121748] Oops: 0002 [1] SMP
      [ 3260.121753] CPU 1
      [ 3260.121756] Modules linked in: dump_test(P) snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device ide_cd generic ohci1394 snd_hda_intel snd_hda_codec snd_pcm snd_timer snd ieee1394 snd_page_alloc piix ide_core arcmsr aic79xx scsi_transport_spi usblp
      [ 3260.121785] Pid: 5556, comm: bash Tainted: P      2.6.18-git10 #1
      
      [Alternatively, I can look into listing tainted flags with 'lsmod',
      but that won't help in oopsen/panics so much.]
      
      [akpm@osdl.org: cleanup]
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2bc2d61a
  24. 30 9月, 2006 1 次提交
  25. 26 9月, 2006 1 次提交
    • E
      [PATCH] load_module: no BUG if module_subsys uninitialized · 1cc5f714
      Ed Swierk 提交于
      Invoking load_module() before param_sysfs_init() is called crashes in
      mod_sysfs_setup(), since the kset in module_subsys is not initialized yet.
      
      In my case, net-pf-1 is getting modprobed as a result of hotplug trying to
      create a UNIX socket.  Calls to hotplug begin after the topology_init
      initcall.
      
      Another patch for the same symptom (module_subsys-initialize-earlier.patch)
      moves param_sysfs_init() to the subsys initcalls, but this is still not
      early enough in the boot process in some cases.  In particular,
      topology_init() causes /sbin/hotplug to run, which requests net-pf-1 (the
      UNIX socket protocol) which can be compiled as a module.  Moving
      param_sysfs_init() to the postcore initcalls fixes this particular race,
      but there might well be other cases where a usermodehelper causes a module
      to load earlier still.
      
      The patch makes load_module() return an error rather than crashing the
      kernel if invoked before module_subsys is initialized.
      
      Cc: Mark Huang <mlhuang@cs.princeton.edu>
      Cc: Greg KH <greg@kroah.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1cc5f714
  26. 15 7月, 2006 1 次提交