summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update release notes, etc., for the 1.47.0 releaseHEADv1.47.0masterTheodore Ts'o2023-02-0610-705/+975
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* debian: update to standards version 4.6.2Theodore Ts'o2023-02-061-1/+1
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Merge branch 'maint' into nextTheodore Ts'o2023-02-059-334/+3
|\
| * Fix date in the release notes for v1.46.6Theodore Ts'o2023-02-021-1/+1
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * Update e2fsprogs.lsm for 1.46.6 releasev1.46.6Theodore Ts'o2023-02-021-2/+2
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * debian: remove package-specific copyright noticesTheodore Ts'o2023-02-027-331/+0
| | | | | | | | | | | | | | These are causing a large number of Lintian warnings "file-without-copyright-information". Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | Merge branch 'maint' into nextTheodore Ts'o2023-02-0249-8188/+9627
|\ \ | |/
| * Update release notes, etc., for the 1.46.6 releaseTheodore Ts'o2023-02-026-407/+539
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * config: update config.{guess,sub}Theodore Ts'o2023-02-022-13/+36
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update zh_CN.po (from translationproject.org)Wenbin Lv2023-02-021-618/+650
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update uk.po (from translationproject.org)Yuri Chornoivan2023-02-021-617/+649
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update sv.po (from translationproject.org)Göran Uddeborg2023-02-021-619/+640
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update sr.po (from translationproject.org)Мирослав Николић2023-02-021-616/+649
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update pl.po (from translationproject.org)Jakub Bogusz2023-02-021-618/+639
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update nl.po (from translationproject.org)Benno Schulenberg2023-02-021-625/+661
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update ms.po (from translationproject.org)Sharuzzaman Ahmat Raslan2023-02-021-674/+681
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update fr.po (from translationproject.org)Samuel Thibault2023-02-021-617/+638
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update es.po (from translationproject.org)Antonio Ceballos2023-02-021-617/+649
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update de.po (from translationproject.org)Mario Blättermann2023-02-021-1223/+1479
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update cs.po (from translationproject.org)Petr Pisar2023-02-021-617/+649
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * badblocks: fix operation with large-ish block sizes and/or countsCorey Hickey2023-02-011-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * badblocks: separate and improve error messages for blocks_at_onceCorey Hickey2023-02-011-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * badblocks: fix mis-printed error from block size checkCorey Hickey2023-02-011-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * badblocks: print a more explanatory message when a parameter is too largeCorey Hickey2023-02-011-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * fuse2fs: support "fuse2fs -o offset=<bytes>"Matt Stark2023-02-011-1/+6
| | | | | | | | | | | | | | | | 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>
| * ext2fs: Use 64bit lseek when _FILE_OFFSET_BITS is 64Khem Raj2023-02-011-2/+2
| | | | | | | | | | | | | | | | | | 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>
| * Add option to enable/disable largefile supportKhem Raj2023-02-014-5/+218
| | | | | | | | | | | | | | | | | | | | | | 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>
| * libext2fs: reject opening a file system where the blocks per group < 8Theodore Ts'o2023-02-011-1/+1
| | | | | | | | | | | | | | 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>
| * Update Makefile dependenciesTheodore Ts'o2023-02-012-0/+4
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * libext2fs: unix_io: fix_potential error path deadlock in flush_cached_blocks()Theodore Ts'o2023-02-011-13/+48
| | | | | | | | | | | | | | | | | | | | 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>
| * libext2fs: unix_io: fix potential error path deadlock in reuse_cache()Theodore Ts'o2023-02-011-6/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * libext2fs: unix_io: add flag which suppresses calling the write error handlerTheodore Ts'o2023-02-011-8/+11
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * AOSP: Android: run bpfmt on all bp filesEric Biggers2023-02-016-7/+13
| | | | | | | | | | | | | | | | | | Ran the following command: bpfmt -w $(find . -name Android.bp) Change-Id: Ia08c8d481199dfa917dbed2dc218df167f101ce5 From AOSP commit: 30fa5b9af82695711cc1bf749fbb0cd18afa008a
| * AOSP: Android: consolidate warning suppressionsEric Biggers2023-02-017-36/+13
| | | | | | | | | | | | | | | | | | | | 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
| * AOSP: Android: stop suppressing warnings from macOS buildEric Biggers2023-02-011-4/+0
| | | | | | | | | | | | | | This is no longer needed. Change-Id: Ie6a1c098a2e5b9db42c9a239ddfbf682cbd3bad2 From AOSP commit: 890e23673b7496bbf400e6bb5fd555bbb3c4b88f
| * AOSP: Android: stop suppressing warnings controlled by -WallEric Biggers2023-02-017-14/+0
| | | | | | | | | | | | | | Upstream fully supports -Wall now. Change-Id: Ida895a1c5dfdf168bc6f50049680b2d2bfbb2942 From AOSP commit: 0ef947d1d4890b3fd4509bc1f3c98bb0f0a525f5
| * AOSP: Android: consolidate addition of include/mingw/Eric Biggers2023-02-016-6/+3
| | | | | | | | | | | | | | | | | | 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
| * AOSP: Android: add a new upstream source fileEric Biggers2023-02-011-0/+1
| | | | | | | | | | Change-Id: Iafeccde9acca678e665b49a4cdb42ac0672e2a84 From AOSP commit: f22381d07818ff7e55e89698a1daf23ba2357d69
| * AOSP: lib/support: don't assume qsort_r() is always available on LinuxEric Biggers2023-02-011-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * AOSP: Stop explicitly specifying -fno-strict-aliasingEric Biggers2023-02-013-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * AOSP: mke2fs: stop suppressing warnings for Windows buildEric Biggers2023-02-011-6/+0
| | | | | | | | | | | | | | | | | | | | 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
| * AOSP: e2fsdroid: stop disabling address sanitizationEric Biggers2023-01-311-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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
| * AOSP: Update lib/ext2fs/Android.bp for upstream changeEric Biggers2023-01-311-0/+2
| | | | | | | | | | | | | | | | 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
| * AOSP: mke2fs.microdroid: Allow non-APEX version of libsShikha Panwar2023-01-311-5/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * AOSP: Create blkid_staticDennis Shen2023-01-311-0/+16
| | | | | | | | | | | | | | | | | | | | 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
| * AOSP: Make blkid host_supportedDennis Shen2023-01-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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
| * e4defrag: avoid potential buffer overflow caused by very long file namesTheodore Ts'o2023-01-311-3/+4
| | | | | | | | | | Addresses-Coverity-Bug: 1520603 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * debian: make the copyright file machine readableViraj Shah2023-01-315-166/+592
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * dict: Add modifification note required by licenseBastian Germann2023-01-312-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'maint' into nextTheodore Ts'o2023-01-3038-79/+149
|\ \ | |/