summaryrefslogtreecommitdiffstats
path: root/contrib/bmake
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2016-06-29 18:19:05 +0000
committersobomax <sobomax@FreeBSD.org>2016-06-29 18:19:05 +0000
commitfa8fbeaaf4661c3e889ec31ede7c062acfc54ce2 (patch)
tree41fefe9e286f3843ed2d8454c4520a4ee66348f5 /contrib/bmake
parent19e196315ea112a4d6e5618f871df55902e3bb99 (diff)
downloadFreeBSD-src-fa8fbeaaf4661c3e889ec31ede7c062acfc54ce2.zip
FreeBSD-src-fa8fbeaaf4661c3e889ec31ede7c062acfc54ce2.tar.gz
1.Improve handling around last compressed block of the file, which is
necessary because CLOOP format lacks explicit EOF or length, so that in the presence of padding or when the CLOOP is put onto a larger partition upper level provider size may be larger. Bound amount of extra data that we might touch to the max length of the compressed block and detect zero-padding in the last cluster, which when sector is all-zero might cause us to emit bogus I/O error after decompression of that fails. To not make code any more complicated that it needs to be deal with it in lazy-manner, i.e. when we first access that specific cluster. This change also fixes stupid mistake in the LZMA code, inherited from geom_lzma, which does not share length of the output buffer buffer with the decompression routine, so that in the presence of corrupted or purposedly tailored data may easily cause heap overflow and kernel memory corruption. Beef up validation of the CLOOP TOC by checking that lengths of all but the last compressed clusters match upper limit set by the decompressor and improve some error diagnostic output while I am here. 2.Add kern.geom.uzip.attach_to tunable to artifically limit attaching uzip to certain devices in the dev tree only. For example the following only makes us attaching to the GPT labels: kern.geom.uzip.attach_to="gpt/*" 3.Add kern.geom.uzip.noattach_to, which does opposite to the (2) above, i.e. prevents geom_uzip from tasting / attaching to providers matching some pattern. By default we don't attach to our own kind, i.e. kern.geom.uzip.noattach_to="*.uzip". It saves us quite some CPU cycles, esp on low-end embedded systems. Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7013
Diffstat (limited to 'contrib/bmake')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud