Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jul 2005 19:57:31 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/amd64/amd64 dump_machdep.c src/sys/i386/i386 dump_machdep.c src/sys/ia64/ia64 dump_machdep.c
Message-ID:  <200507021957.j62JvVhP011084@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
marcel      2005-07-02 19:57:31 UTC

  FreeBSD src repository

  Modified files:
    sys/amd64/amd64      dump_machdep.c 
    sys/i386/i386        dump_machdep.c 
    sys/ia64/ia64        dump_machdep.c 
  Log:
  Fix a buglet that was present in the ia64 code and that got inherited
  by amd64 and i386: For buffered writes we collect data and write it
  out a ${DEV_BSIZE}-sized block at a time. The fragsz variable is used
  to keep track of how much data we have collected in the buffer so far
  and it's reset to zero immediately after writing a block to the dump
  device.
  When the last, possibly partially filled buffer is flushed, we didn't
  reset fragsz to 0 and as such would stop reflecting reality. Since we
  currently only need to do buffered writes once, this isn't a problem.
  However, when kernel dumps are made by hand (say by callling doadump
  from within DDB), the improperly cleared state from the first call to
  dumpsys causes the next call to dumpsys to create an invalid code file.
  This change resets fragsz after flushing the partially filled buffer so
  that it fixes the two problems at once.
  
  Approved by: re (scottl)
  
  Revision  Changes    Path
  1.11      +1 -0      src/sys/amd64/amd64/dump_machdep.c
  1.11      +1 -0      src/sys/i386/i386/dump_machdep.c
  1.13      +1 -0      src/sys/ia64/ia64/dump_machdep.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507021957.j62JvVhP011084>