1. 01 May, 2008 10 commits
    • Julia Lawall's avatar
      [CRYPTO] cryptd: Correct kzalloc error test · b1145ce3
      Julia Lawall authored
      Normally, kzalloc returns NULL or a valid pointer value, not a value to be
      tested using IS_ERR.
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      b1145ce3
    • Herbert Xu's avatar
      [CRYPTO] eseqiv: Fix off-by-one encryption · 46f8153c
      Herbert Xu authored
      After attaching the IV to the head during encryption, eseqiv does not
      increase the encryption length by that amount.  As such the last block
      of the actual plain text will be left unencrypted.
      
      Fortunately the only user of this code hifn currently crashes so this
      shouldn't affect anyone :)
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      46f8153c
    • Herbert Xu's avatar
      [CRYPTO] api: Fix scatterwalk_sg_chain · 8ec970d8
      Herbert Xu authored
      When I backed out of using the generic sg chaining (as it isn't currently
      portable) and introduced scatterwalk_sg_chain/scatterwalk_sg_next I left
      out the sg_is_last check in the latter.  This causes it to potentially
      dereference beyond the end of the sg array.
      
      As most uses of scatterwalk_sg_next are bound by an overall length, this
      only affected the chaining code in authenc and eseqiv. Thanks to Patrick
      McHardy for identifying this problem.
      
      This patch also clears the "last" bit on the head of the chained list as
      it's no longer last.  This also went missing in scatterwalk_sg_chain and
      is present in sg_chain.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      8ec970d8
    • Patrick McHardy's avatar
      [CRYPTO] authenc: Fix async crypto crash in crypto_authenc_genicv() · 16161329
      Patrick McHardy authored
      crypto_authenc_givencrypt_done uses req->data as struct aead_givcrypt_request,
      while it really points to a struct aead_request, causing this crash:
      
      BUG: unable to handle kernel paging request at 6b6b6b6b
      IP: [<dc87517b>] :authenc:crypto_authenc_genicv+0x23/0x109
      *pde = 00000000
      Oops: 0000 [#1] PREEMPT DEBUG_PAGEALLOC
      Modules linked in: hifn_795x authenc esp4 aead xfrm4_mode_tunnel sha1_generic hmac crypto_hash]
      
      Pid: 3074, comm: ping Not tainted (2.6.25 #4)
      EIP: 0060:[<dc87517b>] EFLAGS: 00010296 CPU: 0
      EIP is at crypto_authenc_genicv+0x23/0x109 [authenc]
      EAX: daa04690 EBX: daa046e0 ECX: dab0a100 EDX: daa046b0
      ESI: 6b6b6b6b EDI: dc872054 EBP: c033ff60 ESP: c033ff0c
       DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
      Process ping (pid: 3074, ti=c033f000 task=db883a80 task.ti=dab6c000)
      Stack: 00000000 daa046b0 c0215a3e daa04690 dab0a100 00000000 ffffffff db9fd7f0
             dba208c0 dbbb1720 00000001 daa04720 00000001 c033ff54 c0119ca9 dc852a75
             c033ff60 c033ff60 daa046e0 00000000 00000001 c033ff6c dc87527b 00000001
      Call Trace:
       [<c0215a3e>] ? dev_alloc_skb+0x14/0x29
       [<c0119ca9>] ? printk+0x15/0x17
       [<dc87527b>] ? crypto_authenc_givencrypt_done+0x1a/0x27 [authenc]
       [<dc850cca>] ? hifn_process_ready+0x34a/0x352 [hifn_795x]
       [<dc8353c7>] ? rhine_napipoll+0x3f2/0x3fd [via_rhine]
       [<dc851a56>] ? hifn_check_for_completion+0x4d/0xa6 [hifn_795x]
       [<dc851ab9>] ? hifn_tasklet_callback+0xa/0xc [hifn_795x]
       [<c011d046>] ? tasklet_action+0x3f/0x66
       [<c011d230>] ? __do_softirq+0x38/0x7a
       [<c0105a5f>] ? do_softirq+0x3e/0x71
       [<c011d17c>] ? irq_exit+0x2c/0x65
       [<c010e0c0>] ? smp_apic_timer_interrupt+0x5f/0x6a
       [<c01042e4>] ? apic_timer_interrupt+0x28/0x30
       [<dc851640>] ? hifn_handle_req+0x44a/0x50d [hifn_795x]
       ...
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      16161329
    • Theodore Ts'o's avatar
      Update .gitignore to include include/linux/bounds.h · e4c576b9
      Theodore Ts'o authored
      (which is autogenerated by kbuild)
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e4c576b9
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · ccc75184
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
        ipv6: Compilation fix for compat MCAST_MSFILTER sockopts.
      ccc75184
    • Al Viro's avatar
      Fix dnotify/close race · 214b7049
      Al Viro authored
      We have a race between fcntl() and close() that can lead to
      dnotify_struct inserted into inode's list *after* the last descriptor
      had been gone from current->files.
      
      Since that's the only point where dnotify_struct gets evicted, we are
      screwed - it will stick around indefinitely.  Even after struct file in
      question is gone and freed.  Worse, we can trigger send_sigio() on it at
      any later point, which allows to send an arbitrary signal to arbitrary
      process if we manage to apply enough memory pressure to get the page
      that used to host that struct file and fill it with the right pattern...
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      214b7049
    • Linus Torvalds's avatar
      x86: Mark OPTIMIZE_INLINING broken · 6d98ca73
      Linus Torvalds authored
      So Ingo finally did figure out why UML broke with this option: UML
      passes gcc the -fno-unit-at-a-time flag, and apparently that wreaks
      havoc with gcc's inlining.
      
      We could turn off -fno-unit-at-a-time for UML for gcc4+ (which is what
      x86 does), but there's bad blood about this whole option, and it does
      show that the thing is just fragile as heck.
      
      So let tempers cool, and disable the thing, and we can revisit the
      decision later.
      
      Cc: Adrian Bunk <bunk@kernel.org>
      Cc: David Miller <davem@davemloft.net>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6d98ca73
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes3 · 958a2f29
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes3: (21 commits)
        x86: numaq fix
        x86: 8K stacks by default
        x86: ioremap ram check fix
        x86: fix HT cpu booting on 32-bit
        x86: optimize inlining off
        x86: CONFIG_X86_ELAN fix
        x86: Kconfig fix
        x86 PAT: fix performance drop for glx, use UC minus for ioremap(), ioremap_nocache() and pci_mmap_page_range()
        x86: use defconfigs from x86/configs/*
        toshiba: use ioremap_cached
        revert: "x86: ioremap(), extend check to all RAM pages"
        x86: don't bother printing compat vdso address
        fix: x86: support for new UV apic
        x86: fix early-BUG message
        x86: iommu_sac_force can become static
        x86: add proper header for reboot_force
        x86 VISWS: build fix
        x86, voyager: fix ioremap_nocache()
        hpet: fix
        x86: unexport kmap_atomic_to_page
        ...
      958a2f29
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6 · 6de3d58d
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
        klist: fix coding style errors in klist.h and klist.c
        driver core: remove no longer used "struct class_device"
        pcmcia: remove pccard_sysfs_interface warnings
        devres: support addresses greater than an unsigned long via dev_ioremap
        kobject: do not copy vargs, just pass them around
        sysfs: sysfs_update_group stub for CONFIG_SYSFS=n
        DEBUGFS: Correct location of debugfs API documentation.
        driver core: warn about duplicate driver names on the same bus
        klist: implement klist_add_{after|before}()
        klist: implement KLIST_INIT() and DEFINE_KLIST()
        sysfs: Disallow truncation of files in sysfs
      6de3d58d
  2. 30 Apr, 2008 30 commits