aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-02Update e2fsprogs.lsm for 1.46.6 releaseTheodore Ts'o
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-02debian: remove package-specific copyright noticesTheodore Ts'o
These are causing a large number of Lintian warnings "file-without-copyright-information". Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-02Update release notes, etc., for the 1.46.6 releaseTheodore Ts'o
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-02config: update config.{guess,sub}Theodore Ts'o
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-02po: update zh_CN.po (from translationproject.org)Wenbin Lv
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-02po: update uk.po (from translationproject.org)Yuri Chornoivan
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-02po: update sv.po (from translationproject.org)Göran Uddeborg
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-02po: update sr.po (from translationproject.org)Мирослав Николић
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-02po: update pl.po (from translationproject.org)Jakub Bogusz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-02po: update nl.po (from translationproject.org)Benno Schulenberg
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-02po: update ms.po (from translationproject.org)Sharuzzaman Ahmat Raslan
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-02po: update fr.po (from translationproject.org)Samuel Thibault
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-02po: update es.po (from translationproject.org)Antonio Ceballos
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-02po: update de.po (from translationproject.org)Mario Blättermann
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-02po: update cs.po (from translationproject.org)Petr Pisar
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-02Snap for 9552483 from 78079e101fcf4429db581e6ed7c96c3ee1b27418 to udc-releaseAndroid Build Coastguard Worker
Change-Id: I2814e40191dd00fcf76a68bb4918230eadab5e6e
2023-02-01badblocks: fix operation with large-ish block sizes and/or countsCorey Hickey
test_rw() and test_nd() need to allocate two or three times the product of the block size and the block counts. This can overflow the signed int type of block_size and result in allocate_buffer() being called with a value smaller than intended. Once that buffer is written to, badblocks segfaults. Since allocate_buffer() accepts a size_t, change the input validation to use SIZE_MAX and cast accordingly when calculating the argument. Fixing the segfault allows larger values to be passed to read() and write(); these need to be cast to size_t as well in order to avoid a signed integer overflow causing failure, in which case badblocks would fall back to testing a single block at once. Before: $ misc/badblocks -w -b 4096 -c 524288 -e 1 -s -v /tmp/testfile.bin Checking for bad blocks in read-write mode From block 0 to 524287 Segmentation fault $ misc/badblocks -n -b 4096 -c 524288 -e 1 -s -v /tmp/testfile.bin Checking for bad blocks in non-destructive read-write mode From block 0 to 524287 Checking for bad blocks (non-destructive read-write test) Segmentation fault After: $ misc/badblocks -w -b 4096 -c 524288 -e 1 -s -v /tmp/testfile.bin Checking for bad blocks in read-write mode From block 0 to 524287 Testing with pattern 0xaa: done Reading and comparing: done Testing with pattern 0x55: done Reading and comparing: done Testing with pattern 0xff: done Reading and comparing: done Testing with pattern 0x00: done Reading and comparing: done Pass completed, 0 bad blocks found. (0/0/0 errors) $ misc/badblocks -n -b 4096 -c 524288 -e 1 -s -v /tmp/testfile.bin Checking for bad blocks in non-destructive read-write mode From block 0 to 524287 Checking for bad blocks (non-destructive read-write test) Testing with random pattern: done Pass completed, 0 bad blocks found. (0/0/0 errors) Signed-off-by: Corey Hickey <bugfood-c@fatooh.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-01badblocks: separate and improve error messages for blocks_at_onceCorey Hickey
Since the conditional checks the product of block_size and blocks_at_once, reporting that the problem is solely with blocks_at_once is misleading. Also change the error to use the name of the parameter listed in the manual rather than the variable name. Since blocks_at_once is unsigned, change the test to == rather than <=. Before: $ misc/badblocks -w -b 16777216 -c 524288 -e 1 -s -v /tmp/testfile.bin misc/badblocks: Invalid blocks_at_once: 524288 After: $ misc/badblocks -w -b 16777216 -c 524288 -e 1 -s -v /tmp/testfile.bin misc/badblocks: For block size 16777216, blocks_at_once too large: 524288 $ misc/badblocks -w -b 16777216 -c 0 -e 1 -s -v /tmp/testfile.bin misc/badblocks: Invalid number of blocks: 0 Signed-off-by: Corey Hickey <bugfood-c@fatooh.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-01badblocks: fix mis-printed error from block size checkCorey Hickey
block_size is parsed as an unsigned int from parse_uint(), so retain it as such until _after_ it has been constrained to a size within INT_MAX. Lower level code still requires this to be an int, so cast to int for anything below main(). Before: $ misc/badblocks -w -b 4294967295 -c 1 /tmp/testfile.bin misc/badblocks: Invalid block size: -1 After: $ misc/badblocks -w -b 4294967295 -c 1 /tmp/testfile.bin misc/badblocks: Invalid block size: 4294967295 Signed-off-by: Corey Hickey <bugfood-c@fatooh.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-01badblocks: print a more explanatory message when a parameter is too largeCorey Hickey
Before: $ misc/badblocks -w -b 4294967296 -c 1 /tmp/testfile.bin misc/badblocks: invalid block size - 4294967296 After: $ misc/badblocks -w -b 4294967296 -c 1 /tmp/testfile.bin misc/badblocks: block size too large - 4294967296 The original error is retained for invalid arguments, e.g.: $ misc/badblocks -w -b foo -c 1 /tmp/testfile.bin misc/badblocks: invalid block size - foo Signed-off-by: Corey Hickey <bugfood-c@fatooh.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-01fuse2fs: support "fuse2fs -o offset=<bytes>"Matt Stark
This works the same way that mount -o offset=<bytes> works, and can be used to mount particular partitions from a whole disk image. Signed-off-by: Matt Stark <msta@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-01ext2fs: Use 64bit lseek when _FILE_OFFSET_BITS is 64Khem Raj
Use lseek() with 64bit off_t when _FILE_OFFSET_BITS is 64 this fixes build with musl where there is no _llseek but lseek is using off_t which is 64bit on musl Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-01Add option to enable/disable largefile supportKhem Raj
fallocate can be used to have 64bit off_t provided its compiled with _FILE_OFFSET_BITS=64 which will be added automatically when --enable-largefile is used. [ Run autoreconf to update configure and config.h.in -- TYT ] Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-01libext2fs: reject opening a file system where the blocks per group < 8Theodore Ts'o
A file system where the superblock claims that the blocks per group is less than 8 is invalid, so let's reject it at ext2fs_open() time. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-01Update Makefile dependenciesTheodore Ts'o
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-01libext2fs: unix_io: fix_potential error path deadlock in flush_cached_blocks()Theodore Ts'o
We can't call the error handler while holding the CACHE_MUTEX (see previous commit, "libext2fs: unix_io: fix_potential error path deadlock in reuse_cache()" for details), so first try to write out all of the dirty blocks in the cache, and then for those where we had errors, then call the error handler. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-01libext2fs: unix_io: fix potential error path deadlock in reuse_cache()Theodore Ts'o
This was reported by [1] but the fix was incorrect. The issue is that when unix_io was made thread-safe, it was necessary that to add a CACHE_MUTEX to protect multiple threads from potentially colliding with the very simple writeback cache used by the unix_io I/O manager. The original I/O manager was purposefully kept simple, used a fixed-size cache; accordingly, the locking used also kept simple, and used a single global mutex. [1] https://lore.kernel.org/r/310fb77f-dfed-1196-c4ee-30d5138ee5a2@huawei.com The problem was that if an application (such as e2fsck) registers a write error handler, that handler would be called with the CACHE_MUTEX still held, and if that application tried to do any I/O --- for example, closing the file system using ext2fs_close() and then exiting --- the application would deadlock. We should perhaps fix this either by deciding that the simple Unix I/O cache doesn't actually buy much beyond some system call overhead, or by putting in a full-fledged buffer I/O cache system which uses a much larger cache with allocated memory, fine-grained locking and Direct I/O to prevent double cache at the kernel and userspace level. However, for now, fix the problem by waiting until after we have released the CACHE_MUTEX before calling the write handler. This is good enough given how e2fsck's ehandler.c use case, and in practice no one else really uses the error handler in any case. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-01libext2fs: unix_io: add flag which suppresses calling the write error handlerTheodore Ts'o
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-02-01AOSP: Android: run bpfmt on all bp filesEric Biggers
Ran the following command: bpfmt -w $(find . -name Android.bp) Change-Id: Ia08c8d481199dfa917dbed2dc218df167f101ce5 From AOSP commit: 30fa5b9af82695711cc1bf749fbb0cd18afa008a
2023-02-01AOSP: Android: consolidate warning suppressionsEric Biggers
For warnings not supported by upstream e2fsprogs, it's a waste of time to suppress them only in specific places, as they can show up anywhere in future releases of e2fsprogs. Let's consolidate all these warning suppressions into the top-level Android.bp for e2fsprogs. Change-Id: Icebc03289dae920cb1b673e605c48f7f2b517625 From AOSP commit: d08d59557a34c6362e3660e7e35bc118591dbbfa
2023-02-01AOSP: Android: stop suppressing warnings from macOS buildEric Biggers
This is no longer needed. Change-Id: Ie6a1c098a2e5b9db42c9a239ddfbf682cbd3bad2 From AOSP commit: 890e23673b7496bbf400e6bb5fd555bbb3c4b88f
2023-02-01AOSP: Android: stop suppressing warnings controlled by -WallEric Biggers
Upstream fully supports -Wall now. Change-Id: Ida895a1c5dfdf168bc6f50049680b2d2bfbb2942 From AOSP commit: 0ef947d1d4890b3fd4509bc1f3c98bb0f0a525f5
2023-02-01AOSP: Android: consolidate addition of include/mingw/Eric Biggers
To match what the autotools-based build system does now, always add include/mingw/ to the include path on Windows. I don't think this makes a real difference anywhere, but this is much simpler. Change-Id: I92fdaf3e58029dfca3187af928d943270b2a2109 From AOSP commit: c9aa74eac41f8feeabb2321383161c7cf92cb49b
2023-02-01AOSP: Android: add a new upstream source fileEric Biggers
Change-Id: Iafeccde9acca678e665b49a4cdb42ac0672e2a84 From AOSP commit: f22381d07818ff7e55e89698a1daf23ba2357d69
2023-02-01AOSP: lib/support: don't assume qsort_r() is always available on LinuxEric Biggers
Since commit 4e5f24ae4267 ("Use an autoconf test to detect for a BSD- or GNU-style qsort_r function"), e2fsck fails to build for Android because lib/support/sort_r.h assumes that qsort_r() is always available on "Linux", but in fact it's not supported by Android's libc. Rename _SORT_R_LINUX to _SORT_R_GNU to clarify that it's really the glibc convention for qsort_r(), not the "Linux" convention per se, and make sort_r.h stop setting it automatically when __linux__ is defined. Note: this change does *not* prevent glibc's qsort_r() from being used when e2fsprogs is built using the autotools-based build system, as 'configure' checks for qsort_r() too. This change just affects the fallback behavior for when qsort_r() was not already detected. Fixes: 4e5f24ae4267 ("Use an autoconf test to detect for a BSD- or GNU-style qsort_r function") Signed-off-by: Eric Biggers <ebiggers@google.com> Link: https://lore.kernel.org/r/20230130215829.863455-1-ebiggers@kernel.org Change-Id: I4ed2fd6aef5a0d62960988d29e35acd337bb7d02 From AOSP commit: 9f289d0add4f12fa2e4b21754141363a2759d152
2023-02-01AOSP: Stop explicitly specifying -fno-strict-aliasingEric Biggers
The upstream build system for e2fsprogs doesn't use -fno-strict-aliasing, so update the Android.bp files to match. Note: Android's build system currently uses -fno-strict-aliasing by default anyway, so this change doesn't actually enable strict aliasing. But that's a bit besides the point. The point is that this project doesn't need anything special, so we don't need to do anything special. Change-Id: Ifa637058fd95fdc2b6994a8b801b238e929c1f13 From AOSP commit: c30a15e5d615748d4824dec26f1bda1a86be979c
2023-02-01AOSP: mke2fs: stop suppressing warnings for Windows buildEric Biggers
The warning this was intended to suppress was already fixed by upstream commit 108f3021a6b6 ("mke2fs: use ext2fs_get_device_size2() on all platforms"). Test: mmm external/e2fsprogs Change-Id: I12de1b58e839658568c2f7cd30f1c2a227fe15f2 From AOSP commit: 7c581e836497595d0748953eb2b533777d9f4fd4
2023-01-31AOSP: e2fsdroid: stop disabling address sanitizationEric Biggers
Address sanitization was disabled in e2fsdroid over 5 years ago, due to a bug in libext2fs. However, that bug has long since been fixed by upstream commit 689b7be2da01 ("libext2fs: avoid dereferencing beyond allocated memory in xattr code"). So it should be fine to re-enable address sanitization now. Bug: 68387795 Change-Id: I89a7a1ec1a45d0a2ed76d2e5938dbc127eb267a6 From AOSP commit: c3b223fedcb94e5763c48b93a4445289d13a5eb0
2023-01-31AOSP: Update lib/ext2fs/Android.bp for upstream changeEric Biggers
Compile windows_io.c on Windows, and unix_io.c everywhere else. Change-Id: Ieab0b9ad5a9f7c275153e0f90553761693967762 Signed-off-by: Eric Biggers <ebiggers@google.com> From AOSP commit: 0c82cec0d1aa70c993b5231a2c2244eb5175e638
2023-01-31AOSP: mke2fs.microdroid: Allow non-APEX version of libsShikha Panwar
Microdroid uses mke2fs to format encryptedstore partition. This happens in parallel to apex activation by apexd. Hence, sometime, mke2fs would fail if some linker libraries are not available. Create a target (mke2fs.microdroid) with bootstrap: true Bug: 238179332 Test: Build succeeds & atest MicrodroidTests#encryptedStorageAvailable Change-Id: I1aa493bfc188bb78e21efe98423f4a79215f7d95 From AOSP commit: 54818f635e4249db903dd17fca22ae11b3c0f3a0
2023-01-31AOSP: Create blkid_staticDennis Shen
static_apexer_tools depends on deapexer which depends on blkid. So we need a static version of blkid. BUG: b/257933023 TEST: local build of blkid_static Change-Id: I191840a21df1c10f4371acbe8067f39f148f28b8 From AOSP commit: 2aa5b65667e71bc278117caffa46c331d75d2803
2023-01-31AOSP: Make blkid host_supportedDennis Shen
We need blkid in deapexer to get the filesystem type of the payload image. However, blkid will not be installed to host out dir unless we make it host_supported which is what this change is about. BUG: b/255963179, b/240288941 TEST: m deapexer; then check out/host/linux-x86/bin Change-Id: I46c1e18b9dbdbeb41c7dfe4e26496004d1b2b3de From AOSP commit: f12ebffc345741380d9a30ddac528a9b995657cd
2023-01-31e4defrag: avoid potential buffer overflow caused by very long file namesTheodore Ts'o
Addresses-Coverity-Bug: 1520603 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-01-31Merge changes from topic "e2fsprogs-1.46.6-rc1+" am: 1c856d2bbd am: ↵Eric Biggers
f59fcd2d00 am: 22c7ef59d5 Original change: https://android-review.googlesource.com/c/platform/external/e2fsprogs/+/2407842 Change-Id: I7f3f48860520fe447fd48b7cdb15403f9a6406bd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-31Merge changes from topic "e2fsprogs-1.46.6-rc1+" am: 1c856d2bbd am: f59fcd2d00Eric Biggers
Original change: https://android-review.googlesource.com/c/platform/external/e2fsprogs/+/2407842 Change-Id: I18e842786fc5f9b12fe147d6af74cb6a599765dc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-31Merge changes from topic "e2fsprogs-1.46.6-rc1+" am: 1c856d2bbdEric Biggers
Original change: https://android-review.googlesource.com/c/platform/external/e2fsprogs/+/2407842 Change-Id: I13b887f6bcbc7265b69e0ec563b05d85b62f606f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-31Merge changes from topic "e2fsprogs-1.46.6-rc1+"Eric Biggers
* changes: Update generated files for Android Android: run bpfmt on all bp files Android: consolidate warning suppressions Android: stop suppressing warnings from macOS build Android: stop suppressing warnings controlled by -Wall Android: consolidate addition of include/mingw/ Android: add a new upstream source file lib/support: don't assume qsort_r() is always available on Linux Merge upstream commit 'b0101535a35c' into aosp/master
2023-01-31debian: make the copyright file machine readableViraj Shah
Debian introduced a machine-readable copyright file a while ago. Convert the general copyright file and the package-specific ones, splitting the info that belongs to the package-specific ones. Drop debian/e2fsck-static.copyright because that does not have a file set that is very distinct from the general source; it would just replicate parts of it. This change adds some missing licenses that have to be documented according to Debian Policy §12.5 as well as the copyright info for many files. Signed-off-by: Viraj Shah <viraj.shah@linutronix.de> Signed-off-by: Bastian Germann <bage@linutronix.de> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-01-31dict: Add modifification note required by licenseBastian Germann
The Kazlib license says: "Permission is also granted to adapt this software to produce derivative works, as long as the modified versions carry this copyright notice and additional notices stating that the work has been modified." Add the missing notice stating that the work has been modified. Signed-off-by: Bastian Germann <bage@linutronix.de> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-01-30Update generated files for AndroidEric Biggers
Change-Id: I7da01654acdf39f4a7e7f6f3829c1043c1a6f079