1. 27 7月, 2010 15 次提交
  2. 26 7月, 2010 16 次提交
  3. 25 7月, 2010 2 次提交
  4. 24 7月, 2010 3 次提交
  5. 23 7月, 2010 4 次提交
    • S
      nconfig: Fix segfault when help contains special characters · 58f915a3
      Stephen Boyd 提交于
      nconfig segfaults when help text contains the character '%'. For a quick
      example, navigate to the kernel compression options and get the help for
      bzip2. Doing so triggers a call to mvwprintw() with a string containing
      '%' and no extra arguments to fill in the specifier's value. Fix this
      case by printing the literal string retrieved from the kconfig.
      
       #0  0x00002b52b6b11d83 in vfprintf () from /lib/libc.so.6
       #1  0x00002b52b6bad010 in __vsnprintf_chk () from /lib/libc.so.6
       #2  0x00002b52b623991b in _nc_printf_string () from
       /lib/libncursesw.so.5
       #3  0x00002b52b6234cff in vwprintw () from /lib/libncursesw.so.5
       #4  0x00002b52b6234db9 in mvwprintw () from /lib/libncursesw.so.5
       #5  0x00000000004151d8 in fill_window (win=0x21b64c0,
           text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression ratio and
           speed is intermediate.\nDecompression speed is slowest among the
           three.  The kernel\nsize is about 10% smaller with bzip2, in
           comparison to gzip.\nBzip2 us"...)
           at scripts/kconfig/nconf.gui.c:229
       #6  0x0000000000416335 in show_scroll_win (main_window=0x21a5630,
               title=0x157fa30 "Bzip2",
       	    text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression
       	    ratio and speed is intermediate.\nDecompression speed is
       	    slowest among the three.  The kernel\nsize is about 10%
       	    smaller with bzip2, in comparison to gzip.\nBzip2 us"...)
           at scripts/kconfig/nconf.gui.c:535
       #7  0x00000000004055b2 in show_help (menu=0x157f9d0)
               at scripts/kconfig/nconf.c:1257
       #8  0x0000000000405897 in conf_choice (menu=0x157f130)
       	    at scripts/kconfig/nconf.c:1321
       #9  0x0000000000405326 in conf (menu=0x157d130) at
       	    scripts/kconfig/nconf.c:1208
       #10 0x00000000004052e8 in conf (menu=0xb434a0) at
       	    scripts/kconfig/nconf.c:1203
       #11 0x0000000000406092 in main (ac=2, av=0x7fff96a93c38)
      
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Nir Tzachar <nir.tzachar@gmail.com>
      Signed-off-by: NStephen Boyd <bebarino@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      58f915a3
    • A
      KVM: Use kmalloc() instead of vmalloc() for KVM_[GS]ET_MSR · 7a73c028
      Avi Kivity 提交于
      We don't need more than a page, and vmalloc() is slower (much
      slower recently due to a regression).
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      7a73c028
    • X
      KVM: MMU: fix conflict access permissions in direct sp · 6aa0b9de
      Xiao Guangrong 提交于
      In no-direct mapping, we mark sp is 'direct' when we mapping the
      guest's larger page, but its access is encoded form upper page-struct
      entire not include the last mapping, it will cause access conflict.
      
      For example, have this mapping:
              [W]
            / PDE1 -> |---|
        P[W]          |   | LPA
            \ PDE2 -> |---|
              [R]
      
      P have two children, PDE1 and PDE2, both PDE1 and PDE2 mapping the
      same lage page(LPA). The P's access is WR, PDE1's access is WR,
      PDE2's access is RO(just consider read-write permissions here)
      
      When guest access PDE1, we will create a direct sp for LPA, the sp's
      access is from P, is W, then we will mark the ptes is W in this sp.
      
      Then, guest access PDE2, we will find LPA's shadow page, is the same as
      PDE's, and mark the ptes is RO.
      
      So, if guest access PDE1, the incorrect #PF is occured.
      
      Fixed by encode the last mapping access into direct shadow page
      Signed-off-by: NXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      6aa0b9de
    • B
      Merge commit 'kumar/merge' into merge · 7ffb65f8
      Benjamin Herrenschmidt 提交于
      7ffb65f8