Date: Tue, 29 Apr 2003 12:46:42 -0700 (PDT) From: Poul-Henning Kamp <phk@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/geom/bde g_bde_crypt.c Message-ID: <200304291946.h3TJkgA2003040@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
phk 2003/04/29 12:46:42 PDT FreeBSD src repository Modified files: sys/geom/bde g_bde_crypt.c Log: Fix an obscure fencepost error in GBDE's sector mapping code: For certain combinations of sectorsize, mediasize and random numbers (used to define the mapping), a multisector read or write would ignore some subset of the sectors past the first sector in the request because those sectors would be mapped past the end of the parent device, and normal "end of media" truncation would zap that part of the request. Rev 1.19+1.20 of g_bde_work.c added the check which should have alerted me to this happening. This commit maps the request correctly and adds KASSERTS to make sure things stay inside the parent device. This does not change the on-disk layout of GBDE, there is no need to backup/restore. Revision Changes Path 1.14 +26 -0 src/sys/geom/bde/g_bde_crypt.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304291946.h3TJkgA2003040>