[clang-cl] Don't count linker inputs against /Fo and /Fa (#232611)
The /Fo and /Fa checks reject a file name when there is more than one
input. But the input list also holds object files, libraries, and linker
options such as -Xlinker, which go straight to the linker and never get
an output named by /Fo or /Fa. So
clang-cl /c foo.c /Fofoo.obj -Xlinker -bar
failed with "cannot specify '/Fofoo.obj' when compiling multiple source
files". MSVC's cl.exe also accepts .obj and .lib inputs next to
/Fo<file>.
Count only the inputs that get compiled.
Fixes #216085.
Merge tag 'fs_for_v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull ext2, isofs, udf and quota updates from Jan Kara:
- ext2 changes to support clang context tracking
- multiple isofs hardenings and cleanups
- several udf hardening fixes
- block use of fs-specific quota formats with incorrect filesystem
* tag 'fs_for_v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: (26 commits)
udf: fix return value for non-recorded-allocated extents in udf_map_block()
isofs: shrink the name conversion buffer
isofs: pass the name buffer size to get_rock_ridge_filename()
isofs: report the Joliet name length in statfs
isofs: return long Joliet names whole
isofs: Simplify isofs_read_level3_size()
[15 lines not shown]
Merge tag 'fsnotify_for_v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull fsnotify updates from Jan Kara:
"A couple of smaller changes for fsnotify"
* tag 'fsnotify_for_v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
fanotify: report names longer than NAME_MAX
fanotify: Re-add Matt Bobrowski as a reviewer
fsnotify: fix typo "anonynous" in comment
Merge tag 'configfs-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/leitao/linux
Pull configfs updates from Breno Leitao:
- Attribute structures can now be const (Thomas Weißschuh)
- The first selftests for the configfs userspace interface, plus a
sample subsystem that accepts symlinks to test against. They include
a race of symlink(2) against rmdir of the target, which exercises the
use-after-free fixed in v7.3-rc3.
- Rust bindings, merged from Andreas Hindborg's signed tag: fix the
data offset calculation in subsystem callbacks (marked for stable),
add the missing Send and Sync bounds, and correct a safety comment.
* tag 'configfs-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/leitao/linux:
samples: configfs: constify the configfs_attribute structures
configfs: Allow the registration of const struct configfs_attribute
configfs: Constify configfs_bin_attribute
[10 lines not shown]
Try the last superset first in the tie-break
Flang reruns the selection for each runtime alternative, and comparing
every tied pair made that slow when many tied variants are subsets of a
later one. Tied variants often share a superset, so check the last one
found before scanning all of them.
Merge tag 'cifs-for-7.4' of https://git.manguebit.org/linux
Pull smb client updates from Paulo Alcantara:
- Implement ->fileattr_set so chattr(1) compression changes (chattr
+c/-c) go through the generic VFS fileattr path and its permission
and serialization checks instead of the raw FS_IOC_SETFLAGS fallback
and remove the now-unreachable file flags ioctl handlers
- Require stable pages when the connection is signed or SMB compression
is enabled, so a buffered write can no longer modify a folio that is
still in flight and corrupt its signature (surfaced as -EIO) or, with
compression, silently corrupt the data stored on the server
- Stop breaking a file's just-granted lease while probing it for a
Minshall+French symlink, by reusing an already open handle or opening
with the inode's lease key
- Fix several out-of-bounds reads and use-after-free bug in SMB1
[37 lines not shown]
Merge tag 'hfs-v7.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/hfs
Pull hfs/hfsplus updates from Viacheslav Dubeyko:
"Fix {hfs,hfsplus}_btree_close() (Bruno Produit):
- B-tree nodes with a zero reference count remain in the node hash
until folio reclaim or tree teardown frees them. The folio release
callbacks remove nodes while holding hash_lock, but
hfs_btree_close() walks and frees the same hash without that lock.
Reclaim can therefore unhash and free a node after close has loaded
its pointer, causing a use-after-free or double-free. Detach each
node with hfs_bnode_unhash() while holding hash_lock before
inspecting and freeing it. Drop the lock before hfs_bnode_free() so
a large tree is not freed while holding a spinlock.
Fix hfs_inode_setattr() and hfs_brec_insert() (Davy Felipe):
- hfs_inode_setattr() rejects unsupported UID, GID and mode changes,
but returns the value stored in error when the filesystem is not
mounted with the quiet option. At this point error is zero, as
execution has already passed a successful setattr_prepare() call.
[29 lines not shown]
Merge tag 'nilfs2-v7.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/nilfs2
Pull nilfs2 updates from Viacheslav Dubeyko:
"Fix issues in nilfs_sufile_get_suinfo(), nilfs_scan_dsync_log(), and
nilfs_find_or_create_root() (Aldo Ariel Panzardo):
- If the requested segment number is greater than the total number of
segments, the function may process segment numbers outside the
filesystem.
- nilfs_scan_dsync_log() trusts the block counts in each on-disk file
information entry. If fi_ndatablk is greater than fi_nblocks, the
data block loop can consume excessive summary entries and the later
subtraction used to derive the number of node blocks underflows.
- nilfs_find_or_create_root() links a new checkpoint root into the
checkpoint tree and drops ns_cptree_lock before creating the root's
sysfs group. If nilfs_sysfs_create_snapshot_group() then fails, the
root is freed while it is still reachable from ns_cptree, so a
concurrent nilfs_lookup_root() can dereference freed memory.
Fix typos in comments, reported by scripts/checkpatch.pl using the
[72 lines not shown]
[CIR][NFC] Refactor calling convention lowering classification (#233639)
This change refactors the CIR calling convention lowering pass to move
classification into a `CIRABIClassifier` class and creates a subclass of
that to perform target-specific handling.
In order to make review easier, I have left as much code as possible in
its previous location. I'll follow up with another PR that moves
definitions into the file where is logically belongs.
Assisted-by: Cursor / claude-opus-5.5
Merge tag 'affs-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull affs updates from David Sterba:
"AFFS has attracted the AI security scanners but there's probably
little real impact.
A few fixes, more will come in the future, but it's low priority"
* tag 'affs-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
affs: validate blocks before freeing them
affs: split hash-lock subclass and reject self-referencing dir entry
affs: don't instantiate dentry if affs_insert_hash failed
Merge tag 'for-7.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs updates from David Sterba:
"User visible changes:
- remove tweakable sysfs way to enable features, used only for
extent-irefs which has been default since 3.12; the sysfs interface
makes it complicated due to locking and context, unlike ioctl
- change which backup superblock does mount option
'rescue=usebackuproot' choose, skip the last one due to rotation,
for more fine grained control add options selecting a specific
backup superblock by index (usebackuproot_N)
Notable fixes:
- syslog message fixup of error state description, duplicate 'E'
renamed to 'H' (emergency shutdown), added 'I 'when delayed iputs
are blocked
[66 lines not shown]
Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux
Pull fsverity updates from Eric Biggers:
"Patches from Andrey Albershteyn to prepare for XFS fsverity support:
- Report verification errors through fserror, instead of only through
an unstructured log message and generic I/O error return
- Move the reporting of STATX_ATTR_VERITY into the VFS, so that each
fsverity-capable filesystem doesn't need to do it. This also fixes
a bug where btrfs didn't return STATX_ATTR_VERITY in
attributes_mask
- Make the VFS prevent enabling DAX on fsverity files, so that it
will be handled in a single place for ext4 and XFS
- Move ext4 and f2fs's code to read verity metadata from the
pagecache into shared code, so that XFS will be able to use it too
[13 lines not shown]
[Clang][counted_by] Don't re-evaluate the base of a counted_by pointer access for -fsanitize=array-bounds (#232228)
When indexing a 'counted_by' pointer field with -fsanitize=array-bounds,
EmitCountedByBoundsChecking was handed an invalid address and re-emitted
the field's l-value to locate the count. That re-evaluated the struct base,
duplicating its side-effects:
struct p { int count; int *buf __counted_by(count); };
struct p *q;
int f(int i) { return q++->buf[i]; } // 'q' incremented twice
int g(int i) { return get()->buf[i]; } // 'get' called twice
i.e. enabling the sanitizer changed the program's behavior.
Emit the subscript base exactly as before, but have ScalarExprEmitter
record the l-value it loads the 'counted_by' field from, and pass that
address to the bounds check. The base is emitted the same way with
and without the sanitizer, so the load keeps its debug location,
ptrauth authentication, 'align_value' assumption, and
[4 lines not shown]
Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux
Pull fscrypt updates from Eric Biggers:
"A few minor cleanups for fs/crypto/"
* tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux:
MAINTAINERS: List the fscrypt branches
fscrypt: Move several items from fscrypt_private.h to .c files
fscrypt: Use aes_ecb_encrypt() for v1 key derivation
[CIR] Fix GCC ambiguity after #232835 (#233734)
After #232835, some GCC versions fail to compile CIR due to an ambiguity
in a call to `mlir::LLVM::InsertValueOp::create`. Fix this ambiguity by
explicitly specifying the last argument.
---------
Signed-off-by: Steffen Holst Larsen <sholstla at amd.com>
Co-authored-by: Akimasa Watanuki <mencotton0410 at gmail.com>