Skip to content
Snippets Groups Projects
  1. Oct 24, 2013
    • Tomasz Grabiec's avatar
      ramfs: fix use-after-free when ranaming files · 858a2289
      Tomasz Grabiec authored
      
      This happens when you move a file to a different directory.
      
      Thread 2 (Thread 2):
       1  0x000000000032ed3b in halt_no_interrupts ()
         at ../../arch/x64/processor.hh:239
         osv::halt () at ../../core/power.cc:28
       2  0x000000000020e7fe in abort (
          msg=msg@entry=0x580160 "page fault outside application")
          at ../../runtime.cc:109
       3  0x00000000002ecfdc in page_fault (ef=0xffffc0003e362008)
          at ../../core/mmu.cc:981
       4  <signal handler called>
       5  merge (b=0xffffc0003b4e8000, a=0xfffffffffffffff8)
          at ../../core/mempool.cc:421
       6  memory::free_page_range_locked (range=range@entry=0xffffc0003b4e8000)
          at ../../core/mempool.cc:436
       7  0x00000000003186d7 in memory::free_page_range (
          range=range@entry=0xffffc0003b4e8000) at ../../core/mempool.cc:448
       8  0x0000000000319280 in free_large (obj=0xffffc0003b4e9000)
          at ../../core/mempool.cc:460
       9  std_free (object=0xffffc0003b4e9000) at ../../core/mempool.cc:790
       10 free (obj=0xffffc0003b4e9000) at ../../core/mempool.cc:892
       11 0x0000000000340e52 in ramfs_free_node (np=np@entry=0xffffc0003d250d40)
          at ../../fs/ramfs/ramfs_vnops.c:78
       12 0x0000000000340ed2 in ramfs_remove_node (dnp=0xffffc0003d250a00,
          np=0xffffc0003d250d40) at ../../fs/ramfs/ramfs_vnops.c:131
       13 0x0000000000340ffd in ramfs_rename (dvp1=0xffffc0003fc9a180,
          vp1=0xffffc0003fc9a100, name1=<optimized out>, dvp2=0xffffc0003fc9a280,
          vp2=<optimized out>, name2=0x2000001fedf1 "prefix_suffix")
          at ../../fs/ramfs/ramfs_vnops.c:380
       14 0x0000000000340069 in sys_rename (src=<optimized out>,
          dest=<optimized out>) at ../../fs/vfs/vfs_syscalls.c:671
       15 0x000000000033a3b2 in rename (oldpath=<optimized out>,
          newpath=0xffffc0003e858cc0 "/tmp/t3-26e1b47c/prefix_suffix")
          at ../../fs/vfs/main.cc:634
      
      Signed-off-by: default avatarTomasz Grabiec <tgrabiec@cloudius-systems.com>
      858a2289
    • Pekka Enberg's avatar
      drivers/vga: Fix VGAConsole::write() · e0b7db23
      Pekka Enberg authored
      
      Spotted by Clang:
      
      ../../drivers/vga.hh:15:18: error: 'VGAConsole::write' hides overloaded virtual function
            [-Werror,-Woverloaded-virtual]
          virtual void write(const char *str);
                       ^
      ../../drivers/console.hh:16:18: note: hidden overloaded virtual function 'Console::write'
            declared here: different number of parameters (2 vs 1)
          virtual void write(const char *str, size_t len) = 0;
                       ^
      
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      e0b7db23
    • Pekka Enberg's avatar
      arch-cpu.hh: Fix arch_thread forward declaration · ba2abdf7
      Pekka Enberg authored
      
      Spotted by Clang:
      
      ../../arch/x64/arch-cpu.hh:57:1: error: 'arch_thread' defined as a struct here but previously
            declared as a class [-Werror,-Wmismatched-tags]
      struct arch_thread {
      ^
      ../../arch/x64/arch-cpu.hh:37:1: note: did you mean struct here?
      class arch_thread;
      ^~~~~
      struct
      
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      ba2abdf7
    • Pekka Enberg's avatar
      elf.hh: Fix symbol_module forward declaration · d24fbaeb
      Pekka Enberg authored
      
      Spotted by Clang.
      
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      d24fbaeb
    • Pekka Enberg's avatar
      sched.hh: Fix struct cpu friend and forward declarations · 1cc07c2b
      Pekka Enberg authored
      
      Spotted by Clang.
      
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      1cc07c2b
    • Pekka Enberg's avatar
      sched.hh: Fix arch_cpu friend declaration · f5eb3fdd
      Pekka Enberg authored
      
      Spotted by Clang:
      
      ../../include/sched.hh:278:12: error: class 'arch_cpu' was previously
      declared as a struct
            [-Werror,-Wmismatched-tags]
          friend class arch_cpu;
                 ^
      ../../arch/x64/arch-cpu.hh:39:8: note: previous use is here
      struct arch_cpu {
             ^
      ../../include/sched.hh:278:12: note: did you mean struct here?
          friend class arch_cpu;
                 ^~~~~
                 struct
      
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      f5eb3fdd
    • Pekka Enberg's avatar
      arch-cpu.hh: Fix arch_cpu forward declaration · 766b9719
      Pekka Enberg authored
      
      Spotted by Clang:
      
      ../../include/sched.hh:278:12: error: class 'arch_cpu' was previously declared as a struct
            [-Werror,-Wmismatched-tags]
          friend class arch_cpu;
                 ^
      ../../arch/x64/arch-cpu.hh:39:8: note: previous use is here
      struct arch_cpu {
             ^
      ../../include/sched.hh:278:12: note: did you mean struct here?
          friend class arch_cpu;
                 ^~~~~
                 struct
      
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      766b9719
    • Pekka Enberg's avatar
      trace.hh: Fix assigner_type forward declaration · 986afc38
      Pekka Enberg authored
      
      Spotted by Clang:
      
      ../../include/osv/trace.hh:58:1: error: 'assigner_type' defined as a struct template here but
            previously declared as a class template [-Werror,-Wmismatched-tags]
      struct assigner_type<storage_args<s_args...>, runtime_args<r_args...>> {
      ^
      ../../include/osv/trace.hh:45:1: note: did you mean struct here?
      class assigner_type;
      ^~~~~
      struct
      
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      986afc38
  2. Oct 23, 2013
  3. Oct 22, 2013
  4. Oct 21, 2013
  5. Oct 20, 2013
    • Dmitry Fleytman's avatar
      net: maximum IP datagram size decreased by ETH header length · a69d39a6
      Dmitry Fleytman authored
      
      FreeBSD networking code limits IP datagram size by IP_MAXPACKET
      which is exactly 64K. This calculation doesn't take into account
      Ethernet header length and may generate Ethernet packet longer than 64K.
      
      Such a packet cannot be processed properly by some devices (Xen netback)
      and being dropped.
      
      This patch fixes this corner case for all supported IP protocols.
      
      Signed-off-by: default avatarDmitry Fleytman <dmitry@daynix.com>
      a69d39a6
    • Dmitry Fleytman's avatar
      net: Use Jubmo packets zone for m_defrag() allocations · f6a8880b
      Dmitry Fleytman authored
      
      This patch fixes part of TCP instability/low throughput problems on Xen.
      
      On transmit networking stack passes to Xen netfront driver a list of mbufs
      of up to PAGE_SIZE (4096) bytes each.
      In case the list consists of more than MAX_TX_REQ_FRAGS (18) fragments
      driver tries to defragment it with m_defrag().
      
      m_defrag() in turn tries to build list of buffers of up to MCLBYTES
      (2048) bytes each. This leads to even longer chain and packet being dropped.
      As a result around 1% of TCP segments are lost and intensive TCP
      retransmissions and slowdowns occur.
      
      This patch makes m_defrag() use Jumbo packets zone for allocation, i.e.
      PAGE_SIZE per mbuf.
      
      This patch is pretty similar to what Glauber done on RX path before.
      
      Signed-off-by: default avatarDmitry Fleytman <dmitry@daynix.com>
      f6a8880b
  6. Oct 18, 2013
  7. Oct 17, 2013
Loading