ClangBuiltLinux / linux

Linux kernel source tree
Other
241 stars 14 forks source link

-Wframe-larger-than in fs/namespace.c #1964

Closed nathanchance closed 8 months ago

nathanchance commented 9 months ago

CI sees this warning with ARCH=i386 defconfig with LLVM 13 and older after https://git.kernel.org/vfs/vfs/c/49889374ab925e10708d638ae7ebec5da7ac69a6:

fs/namespace.c:4995:1: error: stack frame size (1276) exceeds limit (1024) in function '__ia32_sys_statmount' [-Werror,-Wframe-larger-than]
SYSCALL_DEFINE4(statmount, const struct mnt_id_req __user *, req,
^
include/linux/syscalls.h:225:36: note: expanded from macro 'SYSCALL_DEFINE4'
#define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
                                   ^
include/linux/syscalls.h:233:2: note: expanded from macro 'SYSCALL_DEFINEx'
        __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
        ^
arch/x86/include/asm/syscall_wrapper.h:232:2: note: expanded from macro '__SYSCALL_DEFINEx'
        __IA32_SYS_STUBx(x, name, __VA_ARGS__)                          \
        ^
arch/x86/include/asm/syscall_wrapper.h:117:2: note: expanded from macro '__IA32_SYS_STUBx'
        __SYS_STUBx(ia32, sys##name,                                    \
        ^
arch/x86/include/asm/syscall_wrapper.h:77:7: note: expanded from macro '__SYS_STUBx'
        long __##abi##_##name(const struct pt_regs *regs)               \
             ^
<scratch space>:7:1: note: expanded from here
__ia32_sys_statmount
^
1 error generated.

I bisected the fix in LLVM to https://github.com/llvm/llvm-project/commit/bb15861e149ac1ce01ed5bd87f760e9469b20a9d. I think this is exacerbated by ARCH=i386's use of -ffreestanding (which has come up before in https://github.com/ClangBuiltLinux/linux/issues/1583), as the warning disappears if I remove that addition from arch/x86/Makefile (and the stack usage for that function drops to 684 bytes, which I can see with -Wframe-larger-than=512).

The diff of the IR before and after that change is pretty massive but I think it is the compound literal assignment in prepare_kstatmount() that messes things up here, as it appears that the compound literal is stack allocated via alloca in addition to the variables ks and kreq?

IR diff of __ia32_sys_statmount in fs/namespace.ll ```diff diff --git a/bad-namespace.ll b/good-namespace.ll index 071e76c261bb..1fc418d671a6 100644 --- a/bad-namespace.ll +++ b/good-namespace.ll @@ -2,8 +2,6 @@ define dso_local i32 @__ia32_sys_statmount(%struct.pt_regs* inreg nocapture readonly %regs) local_unnamed_addr #1 align 4 { entry: %mnt_path.i.i.i.i.i = alloca %struct.path, align 8 - %.compoundliteral.sroa.5.i.i.i = alloca { %struct.path, %struct.statmount }, align 8 - %.compoundliteral.sroa.7.i.i.i = alloca { i32, i32, i32, i64, i64, %struct.mutex, %struct.seq_operations*, i32, %struct.file*, i8* }, align 8 %kreq.i.i = alloca %struct.mnt_id_req, align 4 %ks.i.i = alloca %struct.kstatmount, align 4 %bx = getelementptr inbounds %struct.pt_regs, %struct.pt_regs* %regs, i32 0, i32 0 @@ -56,20 +54,18 @@ if.then36.i.i.i.i: ; preds = %if.end24.i.i.i %sub.i.i.i.i = add nsw i32 %spec.select.i.i.i, -24 %add.ptr37.i36.i.i.i = getelementptr %struct.mnt_id_req, %struct.mnt_id_req* %4, i32 1 %add.ptr37.i.i.i.i = bitcast %struct.mnt_id_req* %add.ptr37.i36.i.i.i to i8* - %call.i.i.i.i = call i32 @check_zeroed_user(i8* inreg %add.ptr37.i.i.i.i, i32 inreg %sub.i.i.i.i) #21 + %call.i.i.i.i = call i32 @check_zeroed_user(i8* inreg %add.ptr37.i.i.i.i, i32 inreg %sub.i.i.i.i) #20 %cmp38.i.i.i.i = icmp slt i32 %call.i.i.i.i, 1 %tobool40.not.i.i.i.i = icmp eq i32 %call.i.i.i.i, 0 %..i.i.i.i = select i1 %tobool40.not.i.i.i.i, i32 -7, i32 %call.i.i.i.i br i1 %cmp38.i.i.i.i, label %__se_sys_statmount.exit, label %if.end8.i.i.i.i.i.i if.end8.i.i.i.i.i.i: ; preds = %if.then36.i.i.i.i, %if.end24.i.i.i - %call1.i.i.i.i.i = call i32 @_copy_from_user(i8* inreg nonnull %6, i8* inreg %10, i32 inreg 24) #21 + %call1.i.i.i.i.i = call i32 @_copy_from_user(i8* inreg nonnull %6, i8* inreg %10, i32 inreg 24) #20 %phi.cmp.i.i.i.i = icmp eq i32 %call1.i.i.i.i.i, 0 br i1 %phi.cmp.i.i.i.i, label %retry.preheader.i.i, label %__se_sys_statmount.exit retry.preheader.i.i: ; preds = %if.end8.i.i.i.i.i.i - %.compoundliteral.sroa.5.i.0..sroa_cast86.i.i = bitcast { %struct.path, %struct.statmount }* %.compoundliteral.sroa.5.i.i.i to i8* - %.compoundliteral.sroa.7.i.0..sroa_cast84.i.i = bitcast { i32, i32, i32, i64, i64, %struct.mutex, %struct.seq_operations*, i32, %struct.file*, i8* }* %.compoundliteral.sroa.7.i.i.i to i8* %cmp.i.i.i.i = icmp ugt i32 %2, -1073741824 %sub.i.i40.i.i = sub i32 -1073741824, %2 %cmp1.i.i.i.i = icmp ult i32 %sub.i.i40.i.i, %1 @@ -117,42 +113,27 @@ retry.preheader.i.i: ; preds = %if.end8.i.i.i.i.i.i %14 = bitcast %struct.kstatmount* %ks.i.i to i8** %size.i62.i.i = getelementptr inbounds %struct.statmount, %struct.statmount* %sm1.i.i.i, i32 0, i32 0 %15 = bitcast %struct.statmount* %sm1.i.i.i to i8* - br label %retry.i.i + br i1 %narrow.i.i.i.i, label %__se_sys_statmount.exit, label %retry.i.i, !prof !7 -retry.i.i: ; preds = %retry_statmount.exit.i.i, %retry.preheader.i.i - %seq_size.0.i.i = phi i32 [ %153, %retry_statmount.exit.i.i ], [ 12288, %retry.preheader.i.i ] - call void @llvm.lifetime.start.p0i8(i64 520, i8* nonnull %.compoundliteral.sroa.5.i.0..sroa_cast86.i.i) - call void @llvm.lifetime.start.p0i8(i64 64, i8* nonnull %.compoundliteral.sroa.7.i.0..sroa_cast84.i.i) - br i1 %narrow.i.i.i.i, label %prepare_kstatmount.exit.thread.i.i, label %if.end.i42.i.i, !prof !7 - -if.end.i42.i.i: ; preds = %retry.i.i - call void @llvm.memset.p0i8.i64(i8* noundef nonnull align 8 dereferenceable(520) %.compoundliteral.sroa.5.i.0..sroa_cast86.i.i, i8 0, i64 520, i1 false) - call void @llvm.memset.p0i8.i64(i8* noundef nonnull align 8 dereferenceable(64) %.compoundliteral.sroa.7.i.0..sroa_cast84.i.i, i8 0, i64 64, i1 false) +retry.i.i: ; preds = %retry.preheader.i.i, %retry_statmount.exit.i.i + %seq_size.0.i.i = phi i32 [ %151, %retry_statmount.exit.i.i ], [ 12288, %retry.preheader.i.i ] %16 = load i64, i64* %param.i.i.i, align 4 - %call.i.i41.i.i = call noalias i8* @kvmalloc_node(i32 inreg %seq_size.0.i.i, i32 inreg 4197568, i32 inreg -1) #25 + %call.i.i41.i.i = call noalias i8* @kvmalloc_node(i32 inreg %seq_size.0.i.i, i32 inreg 4197568, i32 inreg -1) #24 store %struct.statmount* %5, %struct.statmount** %.compoundliteral.sroa.0.0..sroa_idx.i.i.i, align 4 store i32 %2, i32* %.compoundliteral.sroa.3.0..sroa_idx12.i.i.i, align 4 store %struct.vfsmount* null, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 store i64 %16, i64* %.compoundliteral.sroa.414.0..sroa_idx15.i.i.i, align 4 - call void @llvm.memcpy.p0i8.p0i8.i32(i8* noundef align 4 dereferenceable(520) %.compoundliteral.sroa.5.0..sroa_cast16.i.i.i, i8* noundef nonnull align 8 dereferenceable(520) %.compoundliteral.sroa.5.i.0..sroa_cast86.i.i, i32 520, i1 false) #7 + call void @llvm.memset.p0i8.i32(i8* noundef align 4 dereferenceable(520) %.compoundliteral.sroa.5.0..sroa_cast16.i.i.i, i8 0, i32 520, i1 false) #7 store i8* %call.i.i41.i.i, i8** %.compoundliteral.sroa.518.0..sroa_idx19.i.i.i, align 4 store i32 %seq_size.0.i.i, i32* %.compoundliteral.sroa.6.0..sroa_idx20.i.i.i, align 4 - call void @llvm.memcpy.p0i8.p0i8.i32(i8* noundef align 4 dereferenceable(64) %.compoundliteral.sroa.7.0..sroa_cast21.i.i.i, i8* noundef nonnull align 8 dereferenceable(64) %.compoundliteral.sroa.7.i.0..sroa_cast84.i.i, i32 64, i1 false) #7 + call void @llvm.memset.p0i8.i32(i8* noundef align 4 dereferenceable(64) %.compoundliteral.sroa.7.0..sroa_cast21.i.i.i, i8 0, i32 64, i1 false) #7 %tobool9.not.i.i.i = icmp eq i8* %call.i.i41.i.i, null - br i1 %tobool9.not.i.i.i, label %prepare_kstatmount.exit.thread.i.i, label %if.end7.i.i - -prepare_kstatmount.exit.thread.i.i: ; preds = %if.end.i42.i.i, %retry.i.i - %retval.0.i43.ph.i.i = phi i32 [ -14, %retry.i.i ], [ -12, %if.end.i42.i.i ] - call void @llvm.lifetime.end.p0i8(i64 520, i8* nonnull %.compoundliteral.sroa.5.i.0..sroa_cast86.i.i) - call void @llvm.lifetime.end.p0i8(i64 64, i8* nonnull %.compoundliteral.sroa.7.i.0..sroa_cast84.i.i) - br label %__se_sys_statmount.exit + br i1 %tobool9.not.i.i.i, label %__se_sys_statmount.exit, label %if.end7.i.i -if.end7.i.i: ; preds = %if.end.i42.i.i - call void @llvm.lifetime.end.p0i8(i64 520, i8* nonnull %.compoundliteral.sroa.5.i.0..sroa_cast86.i.i) - call void @llvm.lifetime.end.p0i8(i64 64, i8* nonnull %.compoundliteral.sroa.7.i.0..sroa_cast84.i.i) - call void @down_read(%struct.rw_semaphore* inreg nonnull @namespace_sem) #21 +if.end7.i.i: ; preds = %retry.i.i + call void @down_read(%struct.rw_semaphore* inreg nonnull @namespace_sem) #20 %17 = load i64, i64* %mnt_id.i.i, align 4 - %18 = call i32 asm "movl %fs:${1:a}, $0", "=r,i,~{dirflag},~{fpsr},~{flags}"(%struct.task_struct** getelementptr inbounds (%struct.pcpu_hot, %struct.pcpu_hot* @pcpu_hot, i32 0, i32 0, i32 0, i32 0)) #24, !srcloc !50 + %18 = call i32 asm "movl %fs:${1:a}, $0", "=r,i,~{dirflag},~{fpsr},~{flags}"(%struct.task_struct** getelementptr inbounds (%struct.pcpu_hot, %struct.pcpu_hot* @pcpu_hot, i32 0, i32 0, i32 0, i32 0)) #23, !srcloc !50 %19 = inttoptr i32 %18 to %struct.task_struct* %nsproxy.i.i = getelementptr inbounds %struct.task_struct, %struct.task_struct* %19, i32 0, i32 103 %20 = load %struct.nsproxy*, %struct.nsproxy** %nsproxy.i.i, align 16 @@ -176,7 +157,7 @@ while.body.i.i.i.i: ; preds = %if.end7.i.i, %clean if.then.i.i.i.i: ; preds = %while.body.i.i.i.i %cmp3.i.i.i.i = icmp eq i64 %25, %17 - br i1 %cmp3.i.i.i.i, label %mnt_find_id_at.exit.i.i.i.split.loop.exit22, label %if.end.i.i.i.i + br i1 %cmp3.i.i.i.i, label %mnt_find_id_at.exit.i.i.i.split.loop.exit10, label %if.end.i.i.i.i if.end.i.i.i.i: ; preds = %if.then.i.i.i.i %rb_left.i.i.i.i = getelementptr inbounds %struct.rb_node, %struct.rb_node* %node.0.i.i.i.i, i32 0, i32 2 @@ -193,12 +174,12 @@ cleanup.i.i.i.i: ; preds = %if.else.i.i44.i.i, %tobool.not.i.i.i.i = icmp eq %struct.rb_node* %node.1.i.i.i.i, null br i1 %tobool.not.i.i.i.i, label %mnt_find_id_at.exit.i.i.i, label %while.body.i.i.i.i, !llvm.loop !62 -mnt_find_id_at.exit.i.i.i.split.loop.exit22: ; preds = %if.then.i.i.i.i +mnt_find_id_at.exit.i.i.i.split.loop.exit10: ; preds = %if.then.i.i.i.i %26 = bitcast %struct.rb_node* %add.ptr3.i.i.i.i.i to %struct.mount* br label %mnt_find_id_at.exit.i.i.i -mnt_find_id_at.exit.i.i.i: ; preds = %cleanup.i.i.i.i, %mnt_find_id_at.exit.i.i.i.split.loop.exit22 - %ret.3.i.i.i.i = phi %struct.mount* [ %26, %mnt_find_id_at.exit.i.i.i.split.loop.exit22 ], [ %ret.1.i.i.i.i, %cleanup.i.i.i.i ] +mnt_find_id_at.exit.i.i.i: ; preds = %cleanup.i.i.i.i, %mnt_find_id_at.exit.i.i.i.split.loop.exit10 + %ret.3.i.i.i.i = phi %struct.mount* [ %26, %mnt_find_id_at.exit.i.i.i.split.loop.exit10 ], [ %ret.1.i.i.i.i, %cleanup.i.i.i.i ] %tobool.not.i45.i.i = icmp eq %struct.mount* %ret.3.i.i.i.i, null br i1 %tobool.not.i45.i.i, label %if.then11.i.i, label %lor.lhs.false.i.i.i @@ -209,49 +190,47 @@ lor.lhs.false.i.i.i: ; preds = %mnt_find_id_at.exit br i1 %cmp.not.i.i.not.i, label %if.end13.i.i, label %if.then11.i.i if.then11.i.i: ; preds = %lor.lhs.false.i.i.i, %mnt_find_id_at.exit.i.i.i, %if.end7.i.i - call void @up_read(%struct.rw_semaphore* inreg nonnull @namespace_sem) #21 - %28 = load i8*, i8** %.compoundliteral.sroa.518.0..sroa_idx19.i.i.i, align 4 - call void @kvfree(i8* inreg %28) #21 - br label %__se_sys_statmount.exit + call void @up_read(%struct.rw_semaphore* inreg nonnull @namespace_sem) #20 + br label %cleanup.sink.split.i.i if.end13.i.i: ; preds = %lor.lhs.false.i.i.i %mnt1.i.i.i = getelementptr inbounds %struct.mount, %struct.mount* %ret.3.i.i.i.i, i32 0, i32 3 store %struct.vfsmount* %mnt1.i.i.i, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 %fs.i.i = getelementptr inbounds %struct.task_struct, %struct.task_struct* %19, i32 0, i32 100 - %29 = load %struct.fs_struct*, %struct.fs_struct** %fs.i.i, align 4 - %rlock.i.i.i.i = getelementptr inbounds %struct.fs_struct, %struct.fs_struct* %29, i32 0, i32 1, i32 0, i32 0 - call void @_raw_spin_lock(%struct.raw_spinlock* inreg %rlock.i.i.i.i) #21 - %root1.i.i.i = getelementptr inbounds %struct.fs_struct, %struct.fs_struct* %29, i32 0, i32 5 - %30 = bitcast %struct.path* %root1.i.i.i to i64* - %31 = load i64, i64* %30, align 4 - store i64 %31, i64* %11, align 4 - call void @path_get(%struct.path* inreg %.compoundliteral.sroa.5.0..sroa_idx.i.i.i) #21 - call void @_raw_spin_unlock(%struct.raw_spinlock* inreg %rlock.i.i.i.i) #21 - %32 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 - %call1.i.i.i = call zeroext i1 @ns_capable_noaudit(%struct.user_namespace* inreg nonnull @init_user_ns, i32 inreg 21) #21 + %28 = load %struct.fs_struct*, %struct.fs_struct** %fs.i.i, align 4 + %rlock.i.i.i.i = getelementptr inbounds %struct.fs_struct, %struct.fs_struct* %28, i32 0, i32 1, i32 0, i32 0 + call void @_raw_spin_lock(%struct.raw_spinlock* inreg %rlock.i.i.i.i) #20 + %root1.i.i.i = getelementptr inbounds %struct.fs_struct, %struct.fs_struct* %28, i32 0, i32 5 + %29 = bitcast %struct.path* %root1.i.i.i to i64* + %30 = load i64, i64* %29, align 4 + store i64 %30, i64* %11, align 4 + call void @path_get(%struct.path* inreg %.compoundliteral.sroa.5.0..sroa_idx.i.i.i) #20 + call void @_raw_spin_unlock(%struct.raw_spinlock* inreg %rlock.i.i.i.i) #20 + %31 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 + %call1.i.i.i = call zeroext i1 @ns_capable_noaudit(%struct.user_namespace* inreg nonnull @init_user_ns, i32 inreg 21) #20 br i1 %call1.i.i.i, label %if.end.i51.i.i, label %land.lhs.true.i.i.i land.lhs.true.i.i.i: ; preds = %if.end13.i.i - %33 = getelementptr %struct.vfsmount, %struct.vfsmount* %32, i32 0, i32 0 - %34 = load %struct.vfsmount*, %struct.vfsmount** %mnt2.i.i.i.i, align 4 - %cmp.not18.i.i.i.i = icmp eq %struct.vfsmount* %32, %34 + %32 = getelementptr %struct.vfsmount, %struct.vfsmount* %31, i32 0, i32 0 + %33 = load %struct.vfsmount*, %struct.vfsmount** %mnt2.i.i.i.i, align 4 + %cmp.not18.i.i.i.i = icmp eq %struct.vfsmount* %31, %33 br i1 %cmp.not18.i.i.i.i, label %is_path_reachable.exit.i.i.i, label %land.rhs.i.preheader.i.i.i land.rhs.i.preheader.i.i.i: ; preds = %land.lhs.true.i.i.i - %add.ptr2.i.i.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %32, i32 -1 - %35 = bitcast %struct.vfsmount* %add.ptr2.i.i.i.i to %struct.mount* + %add.ptr2.i.i.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %31, i32 -1 + %34 = bitcast %struct.vfsmount* %add.ptr2.i.i.i.i to %struct.mount* br label %land.rhs.i.i.i.i land.rhs.i.i.i.i: ; preds = %while.body.i.i49.i.i, %land.rhs.i.preheader.i.i.i - %mnt.addr.019.i.i.i.i = phi %struct.mount* [ %36, %while.body.i.i49.i.i ], [ %35, %land.rhs.i.preheader.i.i.i ] + %mnt.addr.019.i.i.i.i = phi %struct.mount* [ %35, %while.body.i.i49.i.i ], [ %34, %land.rhs.i.preheader.i.i.i ] %mnt_parent.i.i.i.i.i = getelementptr inbounds %struct.mount, %struct.mount* %mnt.addr.019.i.i.i.i, i32 0, i32 1 - %36 = load %struct.mount*, %struct.mount** %mnt_parent.i.i.i.i.i, align 4 - %cmp.i.not.i.i.i.i = icmp eq %struct.mount* %36, %mnt.addr.019.i.i.i.i + %35 = load %struct.mount*, %struct.mount** %mnt_parent.i.i.i.i.i, align 4 + %cmp.i.not.i.i.i.i = icmp eq %struct.mount* %35, %mnt.addr.019.i.i.i.i br i1 %cmp.i.not.i.i.i.i, label %do_statmount.exit.i.i, label %while.body.i.i49.i.i while.body.i.i49.i.i: ; preds = %land.rhs.i.i.i.i - %mnt1.i.i.i.i = getelementptr inbounds %struct.mount, %struct.mount* %36, i32 0, i32 3 - %cmp.not.i.i48.i.i = icmp eq %struct.vfsmount* %mnt1.i.i.i.i, %34 + %mnt1.i.i.i.i = getelementptr inbounds %struct.mount, %struct.mount* %35, i32 0, i32 3 + %cmp.not.i.i48.i.i = icmp eq %struct.vfsmount* %mnt1.i.i.i.i, %33 br i1 %cmp.not.i.i48.i.i, label %while.cond.land.rhs6_crit_edge.i.i.i.i, label %land.rhs.i.i.i.i, !llvm.loop !102 while.cond.land.rhs6_crit_edge.i.i.i.i: ; preds = %while.body.i.i49.i.i @@ -259,257 +238,257 @@ while.cond.land.rhs6_crit_edge.i.i.i.i: ; preds = %while.body.i.i49.i. br label %is_path_reachable.exit.i.i.i is_path_reachable.exit.i.i.i: ; preds = %while.cond.land.rhs6_crit_edge.i.i.i.i, %land.lhs.true.i.i.i - %dentry.addr.0.lcssa.i.in.i.i.i = phi %struct.dentry** [ %mnt_mountpoint.le.i.i.i.i, %while.cond.land.rhs6_crit_edge.i.i.i.i ], [ %33, %land.lhs.true.i.i.i ] + %dentry.addr.0.lcssa.i.in.i.i.i = phi %struct.dentry** [ %mnt_mountpoint.le.i.i.i.i, %while.cond.land.rhs6_crit_edge.i.i.i.i ], [ %32, %land.lhs.true.i.i.i ] %dentry.addr.0.lcssa.i.i.i.i = load %struct.dentry*, %struct.dentry** %dentry.addr.0.lcssa.i.in.i.i.i, align 4 - %37 = load %struct.dentry*, %struct.dentry** %dentry7.i.i.i.i, align 4 - %call8.i.i.i.i = call zeroext i1 @is_subdir(%struct.dentry* inreg %dentry.addr.0.lcssa.i.i.i.i, %struct.dentry* inreg %37) #21 + %36 = load %struct.dentry*, %struct.dentry** %dentry7.i.i.i.i, align 4 + %call8.i.i.i.i = call zeroext i1 @is_subdir(%struct.dentry* inreg %dentry.addr.0.lcssa.i.i.i.i, %struct.dentry* inreg %36) #20 br i1 %call8.i.i.i.i, label %if.end.i51.i.i, label %do_statmount.exit.i.i if.end.i51.i.i: ; preds = %is_path_reachable.exit.i.i.i, %if.end13.i.i - %38 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 - %mnt_root5.i.i.i = getelementptr inbounds %struct.vfsmount, %struct.vfsmount* %38, i32 0, i32 0 - %39 = load %struct.dentry*, %struct.dentry** %mnt_root5.i.i.i, align 4 - %call6.i.i.i = call i32 @security_sb_statfs(%struct.dentry* inreg %39) #21 + %37 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 + %mnt_root5.i.i.i = getelementptr inbounds %struct.vfsmount, %struct.vfsmount* %37, i32 0, i32 0 + %38 = load %struct.dentry*, %struct.dentry** %mnt_root5.i.i.i, align 4 + %call6.i.i.i = call i32 @security_sb_statfs(%struct.dentry* inreg %38) #20 %tobool.not.i50.i.i = icmp eq i32 %call6.i.i.i, 0 br i1 %tobool.not.i50.i.i, label %if.end8.i.i.i, label %do_statmount.exit.i.i if.end8.i.i.i: ; preds = %if.end.i51.i.i - %40 = load i64, i64* %.compoundliteral.sroa.414.0..sroa_idx15.i.i.i, align 4 - %and.i.i.i = and i64 %40, 1 + %39 = load i64, i64* %.compoundliteral.sroa.414.0..sroa_idx15.i.i.i, align 4 + %and.i.i.i = and i64 %39, 1 %tobool9.not.i52.i.i = icmp eq i64 %and.i.i.i, 0 br i1 %tobool9.not.i52.i.i, label %if.end11.i.i.i, label %if.then10.i.i.i if.then10.i.i.i: ; preds = %if.end8.i.i.i - %41 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 - %mnt_sb.i.i.i.i = getelementptr inbounds %struct.vfsmount, %struct.vfsmount* %41, i32 0, i32 1 - %42 = load %struct.super_block*, %struct.super_block** %mnt_sb.i.i.i.i, align 4 - %43 = load i64, i64* %mask.i.i.i.i, align 4 - %or.i.i.i.i = or i64 %43, 1 + %40 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 + %mnt_sb.i.i.i.i = getelementptr inbounds %struct.vfsmount, %struct.vfsmount* %40, i32 0, i32 1 + %41 = load %struct.super_block*, %struct.super_block** %mnt_sb.i.i.i.i, align 4 + %42 = load i64, i64* %mask.i.i.i.i, align 4 + %or.i.i.i.i = or i64 %42, 1 store i64 %or.i.i.i.i, i64* %mask.i.i.i.i, align 4 - %s_dev.i.i.i.i = getelementptr inbounds %struct.super_block, %struct.super_block* %42, i32 0, i32 1 - %44 = load i32, i32* %s_dev.i.i.i.i, align 8 - %shr.i.i.i.i = lshr i32 %44, 20 + %s_dev.i.i.i.i = getelementptr inbounds %struct.super_block, %struct.super_block* %41, i32 0, i32 1 + %43 = load i32, i32* %s_dev.i.i.i.i, align 8 + %shr.i.i.i.i = lshr i32 %43, 20 store i32 %shr.i.i.i.i, i32* %sb_dev_major.i.i.i.i, align 4 - %45 = load i32, i32* %s_dev.i.i.i.i, align 8 - %and.i.i.i.i = and i32 %45, 1048575 + %44 = load i32, i32* %s_dev.i.i.i.i, align 8 + %and.i.i.i.i = and i32 %44, 1048575 store i32 %and.i.i.i.i, i32* %sb_dev_minor.i.i.i.i, align 4 - %s_magic.i.i.i.i = getelementptr inbounds %struct.super_block, %struct.super_block* %42, i32 0, i32 12 - %46 = load i32, i32* %s_magic.i.i.i.i, align 8 - %conv.i.i.i.i = zext i32 %46 to i64 + %s_magic.i.i.i.i = getelementptr inbounds %struct.super_block, %struct.super_block* %41, i32 0, i32 12 + %45 = load i32, i32* %s_magic.i.i.i.i, align 8 + %conv.i.i.i.i = zext i32 %45 to i64 store i64 %conv.i.i.i.i, i64* %sb_magic.i.i.i.i, align 4 - %s_flags.i.i.i.i = getelementptr inbounds %struct.super_block, %struct.super_block* %42, i32 0, i32 10 - %47 = load i32, i32* %s_flags.i.i.i.i, align 16 - %and5.i.i.i.i = and i32 %47, 33554577 + %s_flags.i.i.i.i = getelementptr inbounds %struct.super_block, %struct.super_block* %41, i32 0, i32 10 + %46 = load i32, i32* %s_flags.i.i.i.i, align 16 + %and5.i.i.i.i = and i32 %46, 33554577 store i32 %and5.i.i.i.i, i32* %sb_flags.i.i.i.i, align 4 br label %if.end11.i.i.i if.end11.i.i.i: ; preds = %if.then10.i.i.i, %if.end8.i.i.i - %and13.i.i.i = and i64 %40, 2 + %and13.i.i.i = and i64 %39, 2 %tobool14.not.i.i.i = icmp eq i64 %and13.i.i.i, 0 br i1 %tobool14.not.i.i.i, label %if.end16.i.i.i, label %if.then15.i.i.i if.then15.i.i.i: ; preds = %if.end11.i.i.i - %48 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 - %49 = load i64, i64* %mask.i.i.i.i, align 4 - %or.i72.i.i.i = or i64 %49, 2 + %47 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 + %48 = load i64, i64* %mask.i.i.i.i, align 4 + %or.i72.i.i.i = or i64 %48, 2 store i64 %or.i72.i.i.i, i64* %mask.i.i.i.i, align 4 - %mnt_id_unique.i.i53.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %48, i32 8, i32 3 - %50 = bitcast %struct.mnt_idmap** %mnt_id_unique.i.i53.i.i to i64* - %51 = load i64, i64* %50, align 4 - store i64 %51, i64* %mnt_id.i.i.i.i, align 4 - %mnt_parent.i.i.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %48, i32 -1, i32 2 - %52 = bitcast i32* %mnt_parent.i.i.i.i to %struct.mount** - %53 = load %struct.mount*, %struct.mount** %52, align 4 - %mnt_id_unique2.i.i.i.i = getelementptr inbounds %struct.mount, %struct.mount* %53, i32 0, i32 23 - %54 = load i64, i64* %mnt_id_unique2.i.i.i.i, align 4 - store i64 %54, i64* %mnt_parent_id.i.i.i.i, align 4 - %55 = getelementptr %struct.vfsmount, %struct.vfsmount* %48, i32 8, i32 2 - %56 = load i32, i32* %55, align 4 - store i32 %56, i32* %mnt_id_old.i.i.i.i, align 4 - %57 = load %struct.mount*, %struct.mount** %52, align 4 - %mnt_id7.i.i.i.i = getelementptr inbounds %struct.mount, %struct.mount* %57, i32 0, i32 22 - %58 = load i32, i32* %mnt_id7.i.i.i.i, align 4 - store i32 %58, i32* %mnt_parent_id_old.i.i.i.i, align 4 - %mnt_flags1.i.i.i.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %48, i32 0, i32 2 - %59 = load volatile i32, i32* %mnt_flags1.i.i.i.i.i, align 4 - %and.i.i.i.i.i = lshr i32 %59, 6 + %mnt_id_unique.i.i53.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %47, i32 8, i32 3 + %49 = bitcast %struct.mnt_idmap** %mnt_id_unique.i.i53.i.i to i64* + %50 = load i64, i64* %49, align 4 + store i64 %50, i64* %mnt_id.i.i.i.i, align 4 + %mnt_parent.i.i.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %47, i32 -1, i32 2 + %51 = bitcast i32* %mnt_parent.i.i.i.i to %struct.mount** + %52 = load %struct.mount*, %struct.mount** %51, align 4 + %mnt_id_unique2.i.i.i.i = getelementptr inbounds %struct.mount, %struct.mount* %52, i32 0, i32 23 + %53 = load i64, i64* %mnt_id_unique2.i.i.i.i, align 4 + store i64 %53, i64* %mnt_parent_id.i.i.i.i, align 4 + %54 = getelementptr %struct.vfsmount, %struct.vfsmount* %47, i32 8, i32 2 + %55 = load i32, i32* %54, align 4 + store i32 %55, i32* %mnt_id_old.i.i.i.i, align 4 + %56 = load %struct.mount*, %struct.mount** %51, align 4 + %mnt_id7.i.i.i.i = getelementptr inbounds %struct.mount, %struct.mount* %56, i32 0, i32 22 + %57 = load i32, i32* %mnt_id7.i.i.i.i, align 4 + store i32 %57, i32* %mnt_parent_id_old.i.i.i.i, align 4 + %mnt_flags1.i.i.i.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %47, i32 0, i32 2 + %58 = load volatile i32, i32* %mnt_flags1.i.i.i.i.i, align 4 + %and.i.i.i.i.i = lshr i32 %58, 6 %and.lobit.i.i.i.i.i = and i32 %and.i.i.i.i.i, 1 - %and2.i.i.i.i.i = shl i32 %59, 1 - %60 = and i32 %and2.i.i.i.i.i, 2 - %61 = or i32 %60, %and.lobit.i.i.i.i.i - %62 = and i32 %and2.i.i.i.i.i, 4 - %63 = or i32 %61, %62 - %64 = and i32 %and2.i.i.i.i.i, 8 - %65 = or i32 %63, %64 - %and17.i.i.i.i.i = shl i32 %59, 3 - %66 = and i32 %and17.i.i.i.i.i, 128 - %67 = or i32 %65, %66 - %68 = shl i32 %59, 14 - %69 = and i32 %68, 2097152 - %70 = or i32 %67, %69 - %and27.i.i.i.i.i = and i32 %59, 8 + %and2.i.i.i.i.i = shl i32 %58, 1 + %59 = and i32 %and2.i.i.i.i.i, 2 + %60 = or i32 %59, %and.lobit.i.i.i.i.i + %61 = and i32 %and2.i.i.i.i.i, 4 + %62 = or i32 %60, %61 + %63 = and i32 %and2.i.i.i.i.i, 8 + %64 = or i32 %62, %63 + %and17.i.i.i.i.i = shl i32 %58, 3 + %65 = and i32 %and17.i.i.i.i.i, 128 + %66 = or i32 %64, %65 + %67 = shl i32 %58, 14 + %68 = and i32 %67, 2097152 + %69 = or i32 %66, %68 + %and27.i.i.i.i.i = and i32 %58, 8 %tobool28.not.i.i.i.i.i = icmp eq i32 %and27.i.i.i.i.i, 0 - %71 = or i32 %70, 16 - %and31.i.i.i.i.i = and i32 %59, 32 - %72 = or i32 %70, %and31.i.i.i.i.i - %73 = xor i32 %72, 32 - %attr_flags.6.in.i.i.i.i.i = select i1 %tobool28.not.i.i.i.i.i, i32 %73, i32 %71 + %70 = or i32 %69, 16 + %and31.i.i.i.i.i = and i32 %58, 32 + %71 = or i32 %69, %and31.i.i.i.i.i + %72 = xor i32 %71, 32 + %attr_flags.6.in.i.i.i.i.i = select i1 %tobool28.not.i.i.i.i.i, i32 %72, i32 %70 %attr_flags.6.i.i.i.i.i = zext i32 %attr_flags.6.in.i.i.i.i.i to i64 - %mnt_idmap.i.i.i.i.i.i.i = getelementptr inbounds %struct.vfsmount, %struct.vfsmount* %48, i32 0, i32 3 - %74 = load volatile %struct.mnt_idmap*, %struct.mnt_idmap** %mnt_idmap.i.i.i.i.i.i.i, align 4 + %mnt_idmap.i.i.i.i.i.i.i = getelementptr inbounds %struct.vfsmount, %struct.vfsmount* %47, i32 0, i32 3 + %73 = load volatile %struct.mnt_idmap*, %struct.mnt_idmap** %mnt_idmap.i.i.i.i.i.i.i, align 4 call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !61 - %cmp.i.not.i.i.i.i.i = icmp eq %struct.mnt_idmap* %74, @nop_mnt_idmap + %cmp.i.not.i.i.i.i.i = icmp eq %struct.mnt_idmap* %73, @nop_mnt_idmap %or39.i.i.i.i.i = or i64 %attr_flags.6.i.i.i.i.i, 1048576 %spec.select63.i.i.i.i.i = select i1 %cmp.i.not.i.i.i.i.i, i64 %attr_flags.6.i.i.i.i.i, i64 %or39.i.i.i.i.i store i64 %spec.select63.i.i.i.i.i, i64* %mnt_attr.i.i.i.i, align 4 - %75 = load i32, i32* %mnt_flags1.i.i.i.i.i, align 4 - %and.i45.i.i.i.i = shl i32 %75, 8 - %76 = and i32 %and.i45.i.i.i.i, 1048576 - %77 = zext i32 %76 to i64 - %mnt_master.i.i.i.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %48, i32 6, i32 1 - %78 = bitcast %struct.super_block** %mnt_master.i.i.i.i.i to %struct.mount** - %79 = load %struct.mount*, %struct.mount** %78, align 4 - %tobool1.not.i.i.i.i.i = icmp eq %struct.mount* %79, null - %or3.i.i.i.i.i = or i64 %77, 524288 - %propagation.1.i.i.i.i.i = select i1 %tobool1.not.i.i.i.i.i, i64 %77, i64 %or3.i.i.i.i.i - %and7.i.i.i.i.i = shl i32 %75, 4 - %80 = and i32 %and7.i.i.i.i.i, 131072 - %81 = zext i32 %80 to i64 - %82 = or i64 %propagation.1.i.i.i.i.i, %81 - %tobool12.not.i.i.i.i.i = icmp eq i64 %82, 0 - %propagation.3.i.i.i.i.i = select i1 %tobool12.not.i.i.i.i.i, i64 262144, i64 %82 + %74 = load i32, i32* %mnt_flags1.i.i.i.i.i, align 4 + %and.i45.i.i.i.i = shl i32 %74, 8 + %75 = and i32 %and.i45.i.i.i.i, 1048576 + %76 = zext i32 %75 to i64 + %mnt_master.i.i.i.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %47, i32 6, i32 1 + %77 = bitcast %struct.super_block** %mnt_master.i.i.i.i.i to %struct.mount** + %78 = load %struct.mount*, %struct.mount** %77, align 4 + %tobool1.not.i.i.i.i.i = icmp eq %struct.mount* %78, null + %or3.i.i.i.i.i = or i64 %76, 524288 + %propagation.1.i.i.i.i.i = select i1 %tobool1.not.i.i.i.i.i, i64 %76, i64 %or3.i.i.i.i.i + %and7.i.i.i.i.i = shl i32 %74, 4 + %79 = and i32 %and7.i.i.i.i.i, 131072 + %80 = zext i32 %79 to i64 + %81 = or i64 %propagation.1.i.i.i.i.i, %80 + %tobool12.not.i.i.i.i.i = icmp eq i64 %81, 0 + %propagation.3.i.i.i.i.i = select i1 %tobool12.not.i.i.i.i.i, i64 262144, i64 %81 store i64 %propagation.3.i.i.i.i.i, i64* %mnt_propagation.i.i.i.i, align 4 - %83 = load i32, i32* %mnt_flags1.i.i.i.i.i, align 4 - %and.i73.i.i.i = and i32 %83, 4096 + %82 = load i32, i32* %mnt_flags1.i.i.i.i.i, align 4 + %and.i73.i.i.i = and i32 %82, 4096 %tobool.not.i.i54.i.i = icmp eq i32 %and.i73.i.i.i, 0 br i1 %tobool.not.i.i54.i.i, label %cond.end.i.i.i.i, label %cond.true.i.i.i.i cond.true.i.i.i.i: ; preds = %if.then15.i.i.i - %mnt_group_id.i.i.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %48, i32 9, i32 1 - %84 = bitcast %struct.super_block** %mnt_group_id.i.i.i.i to i32* - %85 = load i32, i32* %84, align 4 + %mnt_group_id.i.i.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %47, i32 9, i32 1 + %83 = bitcast %struct.super_block** %mnt_group_id.i.i.i.i to i32* + %84 = load i32, i32* %83, align 4 br label %cond.end.i.i.i.i cond.end.i.i.i.i: ; preds = %cond.true.i.i.i.i, %if.then15.i.i.i - %cond.i.i.i.i = phi i32 [ %85, %cond.true.i.i.i.i ], [ 0, %if.then15.i.i.i ] + %cond.i.i.i.i = phi i32 [ %84, %cond.true.i.i.i.i ], [ 0, %if.then15.i.i.i ] %conv.i74.i.i.i = sext i32 %cond.i.i.i.i to i64 store i64 %conv.i74.i.i.i, i64* %mnt_peer_group.i.i.i.i, align 4 - %86 = load %struct.mount*, %struct.mount** %78, align 4 - %tobool16.not.i.i.i.i = icmp eq %struct.mount* %86, null + %85 = load %struct.mount*, %struct.mount** %77, align 4 + %tobool16.not.i.i.i.i = icmp eq %struct.mount* %85, null br i1 %tobool16.not.i.i.i.i, label %statmount_mnt_basic.exit.i.i.i, label %cond.true17.i.i.i.i cond.true17.i.i.i.i: ; preds = %cond.end.i.i.i.i - %mnt_group_id19.i.i.i.i = getelementptr inbounds %struct.mount, %struct.mount* %86, i32 0, i32 24 - %87 = load i32, i32* %mnt_group_id19.i.i.i.i, align 4 + %mnt_group_id19.i.i.i.i = getelementptr inbounds %struct.mount, %struct.mount* %85, i32 0, i32 24 + %86 = load i32, i32* %mnt_group_id19.i.i.i.i, align 4 br label %statmount_mnt_basic.exit.i.i.i statmount_mnt_basic.exit.i.i.i: ; preds = %cond.true17.i.i.i.i, %cond.end.i.i.i.i - %cond22.i.i.i.i = phi i32 [ %87, %cond.true17.i.i.i.i ], [ 0, %cond.end.i.i.i.i ] + %cond22.i.i.i.i = phi i32 [ %86, %cond.true17.i.i.i.i ], [ 0, %cond.end.i.i.i.i ] %conv23.i.i.i.i = sext i32 %cond22.i.i.i.i to i64 store i64 %conv23.i.i.i.i, i64* %mnt_master25.i.i.i.i, align 4 %.pre.i.i.i = load i64, i64* %.compoundliteral.sroa.414.0..sroa_idx15.i.i.i, align 4 br label %if.end16.i.i.i if.end16.i.i.i: ; preds = %statmount_mnt_basic.exit.i.i.i, %if.end11.i.i.i - %88 = phi i64 [ %.pre.i.i.i, %statmount_mnt_basic.exit.i.i.i ], [ %40, %if.end11.i.i.i ] - %and18.i.i.i = and i64 %88, 4 + %87 = phi i64 [ %.pre.i.i.i, %statmount_mnt_basic.exit.i.i.i ], [ %39, %if.end11.i.i.i ] + %and18.i.i.i = and i64 %87, 4 %tobool19.not.i.i.i = icmp eq i64 %and18.i.i.i, 0 br i1 %tobool19.not.i.i.i, label %if.end21.i.i.i, label %if.then20.i.i.i if.then20.i.i.i: ; preds = %if.end16.i.i.i - %89 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 - %90 = load i64, i64* %mask.i.i.i.i, align 4 - %or.i77.i.i.i = or i64 %90, 4 + %88 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 + %89 = load i64, i64* %mask.i.i.i.i, align 4 + %or.i77.i.i.i = or i64 %89, 4 store i64 %or.i77.i.i.i, i64* %mask.i.i.i.i, align 4 - %mnt_master.i.i.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %89, i32 6, i32 1 - %91 = bitcast %struct.super_block** %mnt_master.i.i.i.i to %struct.mount** - %92 = load %struct.mount*, %struct.mount** %91, align 4 - %tobool.not.i78.i.i.i = icmp eq %struct.mount* %92, null + %mnt_master.i.i.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %88, i32 6, i32 1 + %90 = bitcast %struct.super_block** %mnt_master.i.i.i.i to %struct.mount** + %91 = load %struct.mount*, %struct.mount** %90, align 4 + %tobool.not.i78.i.i.i = icmp eq %struct.mount* %91, null br i1 %tobool.not.i78.i.i.i, label %if.end21.i.i.i, label %if.then.i.i55.i.i if.then.i.i55.i.i: ; preds = %if.then20.i.i.i - %add.ptr2.i.i.i.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %89, i32 -1 - %93 = bitcast %struct.vfsmount* %add.ptr2.i.i.i.i.i to %struct.mount* - %94 = load %struct.fs_struct*, %struct.fs_struct** %fs.i.i, align 4 - %root.i.i.i.i = getelementptr inbounds %struct.fs_struct, %struct.fs_struct* %94, i32 0, i32 5 - %call2.i.i.i.i = call i32 @get_dominating_id(%struct.mount* inreg %93, %struct.path* inreg %root.i.i.i.i) #21 + %add.ptr2.i.i.i.i.i = getelementptr %struct.vfsmount, %struct.vfsmount* %88, i32 -1 + %92 = bitcast %struct.vfsmount* %add.ptr2.i.i.i.i.i to %struct.mount* + %93 = load %struct.fs_struct*, %struct.fs_struct** %fs.i.i, align 4 + %root.i.i.i.i = getelementptr inbounds %struct.fs_struct, %struct.fs_struct* %93, i32 0, i32 5 + %call2.i.i.i.i = call i32 @get_dominating_id(%struct.mount* inreg %92, %struct.path* inreg %root.i.i.i.i) #20 %conv.i79.i.i.i = sext i32 %call2.i.i.i.i to i64 store i64 %conv.i79.i.i.i, i64* %propagate_from.i.i.i.i, align 4 %.pre108.i.i.i = load i64, i64* %.compoundliteral.sroa.414.0..sroa_idx15.i.i.i, align 4 br label %if.end21.i.i.i if.end21.i.i.i: ; preds = %if.then.i.i55.i.i, %if.then20.i.i.i, %if.end16.i.i.i - %95 = phi i64 [ %.pre108.i.i.i, %if.then.i.i55.i.i ], [ %88, %if.then20.i.i.i ], [ %88, %if.end16.i.i.i ] - %and23.i.i.i = and i64 %95, 32 + %94 = phi i64 [ %.pre108.i.i.i, %if.then.i.i55.i.i ], [ %87, %if.then20.i.i.i ], [ %87, %if.end16.i.i.i ] + %and23.i.i.i = and i64 %94, 32 %tobool24.not.i.i.i = icmp eq i64 %and23.i.i.i, 0 br i1 %tobool24.not.i.i.i, label %land.lhs.true29.i.i.i, label %if.then25.i.i.i if.then25.i.i.i: ; preds = %if.end21.i.i.i - %96 = load i32, i32* %count.i.i.i.i, align 4 - store i32 %96, i32* %fs_type.i.i.i.i, align 4 - %97 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 - %mnt_sb.i.i.i.i.i = getelementptr inbounds %struct.vfsmount, %struct.vfsmount* %97, i32 0, i32 1 - %98 = load %struct.super_block*, %struct.super_block** %mnt_sb.i.i.i.i.i, align 4 - %s_type.i.i.i.i.i = getelementptr inbounds %struct.super_block, %struct.super_block* %98, i32 0, i32 5 - %99 = load %struct.file_system_type*, %struct.file_system_type** %s_type.i.i.i.i.i, align 4 - %name.i.i.i.i.i = getelementptr inbounds %struct.file_system_type, %struct.file_system_type* %99, i32 0, i32 0 - %100 = load i8*, i8** %name.i.i.i.i.i, align 4 - call void @seq_puts(%struct.seq_file* inreg %seq1.i.i.i.i, i8* inreg %100) #21 - %101 = load i32, i32* %count.i.i.i.i, align 4 - %102 = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %101, i32 512) #7 - %103 = extractvalue { i32, i1 } %102, 1 - br i1 %103, label %do_statmount.exit.i.i, label %if.end35.i.i.i.i, !prof !7 + %95 = load i32, i32* %count.i.i.i.i, align 4 + store i32 %95, i32* %fs_type.i.i.i.i, align 4 + %96 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 + %mnt_sb.i.i.i.i.i = getelementptr inbounds %struct.vfsmount, %struct.vfsmount* %96, i32 0, i32 1 + %97 = load %struct.super_block*, %struct.super_block** %mnt_sb.i.i.i.i.i, align 4 + %s_type.i.i.i.i.i = getelementptr inbounds %struct.super_block, %struct.super_block* %97, i32 0, i32 5 + %98 = load %struct.file_system_type*, %struct.file_system_type** %s_type.i.i.i.i.i, align 4 + %name.i.i.i.i.i = getelementptr inbounds %struct.file_system_type, %struct.file_system_type* %98, i32 0, i32 0 + %99 = load i8*, i8** %name.i.i.i.i.i, align 4 + call void @seq_puts(%struct.seq_file* inreg %seq1.i.i.i.i, i8* inreg %99) #20 + %100 = load i32, i32* %count.i.i.i.i, align 4 + %101 = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %100, i32 512) #7 + %102 = extractvalue { i32, i1 } %101, 1 + br i1 %102, label %do_statmount.exit.i.i, label %if.end35.i.i.i.i, !prof !7 if.end35.i.i.i.i: ; preds = %if.then25.i.i.i - %104 = extractvalue { i32, i1 } %102, 0 - %105 = load i32, i32* %.compoundliteral.sroa.3.0..sroa_idx12.i.i.i, align 4 - %cmp.not.i80.i.i.i = icmp ult i32 %104, %105 + %103 = extractvalue { i32, i1 } %101, 0 + %104 = load i32, i32* %.compoundliteral.sroa.3.0..sroa_idx12.i.i.i, align 4 + %cmp.not.i80.i.i.i = icmp ult i32 %103, %104 br i1 %cmp.not.i80.i.i.i, label %if.end37.i.i.i.i, label %do_statmount.exit.i.i if.end37.i.i.i.i: ; preds = %if.end35.i.i.i.i - %106 = load i32, i32* %.compoundliteral.sroa.6.0..sroa_idx20.i.i.i, align 4 - %cmp.i83.i.i.i.i = icmp eq i32 %101, %106 + %105 = load i32, i32* %.compoundliteral.sroa.6.0..sroa_idx20.i.i.i, align 4 + %cmp.i83.i.i.i.i = icmp eq i32 %100, %105 br i1 %cmp.i83.i.i.i.i, label %do_statmount.exit.i.i, label %if.end46.i.i.i.i, !prof !7 if.end46.i.i.i.i: ; preds = %if.end37.i.i.i.i - %107 = load i8*, i8** %buf.i.i.i.i, align 4 - %inc.i.i.i.i = add nuw i32 %101, 1 + %106 = load i8*, i8** %buf.i.i.i.i, align 4 + %inc.i.i.i.i = add nuw i32 %100, 1 store i32 %inc.i.i.i.i, i32* %count.i.i.i.i, align 4 - %arrayidx.i.i.i.i = getelementptr i8, i8* %107, i32 %101 + %arrayidx.i.i.i.i = getelementptr i8, i8* %106, i32 %100 store i8 0, i8* %arrayidx.i.i.i.i, align 1 - %108 = load i64, i64* %mask.i.i.i.i, align 4 - %or.i82.i.i.i = or i64 %108, 32 + %107 = load i64, i64* %mask.i.i.i.i, align 4 + %or.i82.i.i.i = or i64 %107, 32 store i64 %or.i82.i.i.i, i64* %mask.i.i.i.i, align 4 %.pre109.i.i.i = load i64, i64* %.compoundliteral.sroa.414.0..sroa_idx15.i.i.i, align 4 br label %land.lhs.true29.i.i.i land.lhs.true29.i.i.i: ; preds = %if.end46.i.i.i.i, %if.end21.i.i.i - %109 = phi i64 [ %95, %if.end21.i.i.i ], [ %.pre109.i.i.i, %if.end46.i.i.i.i ] - %and31.i.i.i = and i64 %109, 8 + %108 = phi i64 [ %94, %if.end21.i.i.i ], [ %.pre109.i.i.i, %if.end46.i.i.i.i ] + %and31.i.i.i = and i64 %108, 8 %tobool32.not.i.i.i = icmp eq i64 %and31.i.i.i, 0 br i1 %tobool32.not.i.i.i, label %land.lhs.true37.i.i.i, label %if.end35.i.i.i if.end35.i.i.i: ; preds = %land.lhs.true29.i.i.i - %110 = load i32, i32* %count.i.i.i.i, align 4 - store i32 %110, i32* %mnt_root.i.i.i, align 4 - %111 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 - %mnt_root.i.i.i.i = getelementptr inbounds %struct.vfsmount, %struct.vfsmount* %111, i32 0, i32 0 - %112 = load %struct.dentry*, %struct.dentry** %mnt_root.i.i.i.i, align 4 - %d_sb.i.i.i.i.i = getelementptr inbounds %struct.dentry, %struct.dentry* %112, i32 0, i32 9 - %113 = load %struct.super_block*, %struct.super_block** %d_sb.i.i.i.i.i, align 4 - %s_op.i.i.i.i.i = getelementptr inbounds %struct.super_block, %struct.super_block* %113, i32 0, i32 6 - %114 = load %struct.super_operations*, %struct.super_operations** %s_op.i.i.i.i.i, align 32 - %show_path.i.i.i.i.i = getelementptr inbounds %struct.super_operations, %struct.super_operations* %114, i32 0, i32 18 - %115 = load i32 (%struct.seq_file*, %struct.dentry*)*, i32 (%struct.seq_file*, %struct.dentry*)** %show_path.i.i.i.i.i, align 4 - %tobool.not.i.i.i.i.i = icmp eq i32 (%struct.seq_file*, %struct.dentry*)* %115, null + %109 = load i32, i32* %count.i.i.i.i, align 4 + store i32 %109, i32* %mnt_root.i.i.i, align 4 + %110 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 + %mnt_root.i.i.i.i = getelementptr inbounds %struct.vfsmount, %struct.vfsmount* %110, i32 0, i32 0 + %111 = load %struct.dentry*, %struct.dentry** %mnt_root.i.i.i.i, align 4 + %d_sb.i.i.i.i.i = getelementptr inbounds %struct.dentry, %struct.dentry* %111, i32 0, i32 9 + %112 = load %struct.super_block*, %struct.super_block** %d_sb.i.i.i.i.i, align 4 + %s_op.i.i.i.i.i = getelementptr inbounds %struct.super_block, %struct.super_block* %112, i32 0, i32 6 + %113 = load %struct.super_operations*, %struct.super_operations** %s_op.i.i.i.i.i, align 32 + %show_path.i.i.i.i.i = getelementptr inbounds %struct.super_operations, %struct.super_operations* %113, i32 0, i32 18 + %114 = load i32 (%struct.seq_file*, %struct.dentry*)*, i32 (%struct.seq_file*, %struct.dentry*)** %show_path.i.i.i.i.i, align 4 + %tobool.not.i.i.i.i.i = icmp eq i32 (%struct.seq_file*, %struct.dentry*)* %114, null br i1 %tobool.not.i.i.i.i.i, label %show_path.exit.thread.i.i.i.i, label %show_path.exit.i.i.i.i show_path.exit.thread.i.i.i.i: ; preds = %if.end35.i.i.i - %call4.i.i.i.i.i = call i32 @seq_dentry(%struct.seq_file* inreg %seq1.i.i.i.i, %struct.dentry* inreg %112, i8* inreg getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0)) #21 + %call4.i.i.i.i.i = call i32 @seq_dentry(%struct.seq_file* inreg %seq1.i.i.i.i, %struct.dentry* inreg %111, i8* inreg getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0)) #20 br label %if.end.i.i73.i.i show_path.exit.i.i.i.i: ; preds = %if.end35.i.i.i - %call.i.i.i69.i.i = call i32 %115(%struct.seq_file* inreg %seq1.i.i.i.i, %struct.dentry* inreg %112) #21 + %call.i.i.i69.i.i = call i32 %114(%struct.seq_file* inreg %seq1.i.i.i.i, %struct.dentry* inreg %111) #20 %tobool.not.i.i70.i.i = icmp eq i32 %call.i.i.i69.i.i, 0 br i1 %tobool.not.i.i70.i.i, label %if.end.i.i73.i.i, label %show_path.exit.i.i.sw.epilog.i_crit_edge.i.i @@ -518,31 +497,31 @@ show_path.exit.i.i.sw.epilog.i_crit_edge.i.i: ; preds = %show_path.exit.i.i. br label %sw.epilog.i.i.i if.end.i.i73.i.i: ; preds = %show_path.exit.i.i.i.i, %show_path.exit.thread.i.i.i.i - %116 = load i32, i32* %count.i.i.i.i, align 4 - %117 = load i32, i32* %.compoundliteral.sroa.6.0..sroa_idx20.i.i.i, align 4 - %cmp.i.i.i72.i.i = icmp eq i32 %116, %117 + %115 = load i32, i32* %count.i.i.i.i, align 4 + %116 = load i32, i32* %.compoundliteral.sroa.6.0..sroa_idx20.i.i.i, align 4 + %cmp.i.i.i72.i.i = icmp eq i32 %115, %116 br i1 %cmp.i.i.i72.i.i, label %sw.epilog.i.i.i, label %if.end5.i.i.i.i, !prof !7 if.end5.i.i.i.i: ; preds = %if.end.i.i73.i.i - %118 = load i8*, i8** %buf.i.i.i.i, align 4 - %arrayidx.i.i75.i.i = getelementptr i8, i8* %118, i32 %116 + %117 = load i8*, i8** %buf.i.i.i.i, align 4 + %arrayidx.i.i75.i.i = getelementptr i8, i8* %117, i32 %115 store i8 0, i8* %arrayidx.i.i75.i.i, align 1 - store i32 %110, i32* %count.i.i.i.i, align 4 - %119 = load i8*, i8** %buf.i.i.i.i, align 4 - %add.ptr.i.i.i.i = getelementptr i8, i8* %119, i32 %110 - %call.i22.i.i.i.i = call i32 @string_unescape(i8* inreg %add.ptr.i.i.i.i, i8* inreg %add.ptr.i.i.i.i, i32 inreg 0, i32 2) #21 + store i32 %109, i32* %count.i.i.i.i, align 4 + %118 = load i8*, i8** %buf.i.i.i.i, align 4 + %add.ptr.i.i.i.i = getelementptr i8, i8* %118, i32 %109 + %call.i22.i.i.i.i = call i32 @string_unescape(i8* inreg %add.ptr.i.i.i.i, i8* inreg %add.ptr.i.i.i.i, i32 inreg 0, i32 2) #20 %cmp.i23.i.i.i.i = icmp slt i32 %call.i22.i.i.i.i, 0 br i1 %cmp.i23.i.i.i.i, label %if.then.i26.i.i.i.i, label %do.body.i.i.i76.i.i if.then.i26.i.i.i.i: ; preds = %if.end5.i.i.i.i - %120 = load i32, i32* %.compoundliteral.sroa.6.0..sroa_idx20.i.i.i, align 4 + %119 = load i32, i32* %.compoundliteral.sroa.6.0..sroa_idx20.i.i.i, align 4 br label %cleanup.sink.split.i.i.i.i do.body.i.i.i76.i.i: ; preds = %if.end5.i.i.i.i - %121 = load i32, i32* %count.i.i.i.i, align 4 - %add.i.i.i.i.i = add i32 %121, %call.i22.i.i.i.i - %122 = load i32, i32* %.compoundliteral.sroa.6.0..sroa_idx20.i.i.i, align 4 - %cmp3.i.i.i.i.i = icmp ugt i32 %add.i.i.i.i.i, %122 + %120 = load i32, i32* %count.i.i.i.i, align 4 + %add.i.i.i.i.i = add i32 %120, %call.i22.i.i.i.i + %121 = load i32, i32* %.compoundliteral.sroa.6.0..sroa_idx20.i.i.i, align 4 + %cmp3.i.i.i.i.i = icmp ugt i32 %add.i.i.i.i.i, %121 br i1 %cmp3.i.i.i.i.i, label %do.body8.i.i.i.i.i, label %cleanup.sink.split.i.i.i.i, !prof !7 do.body8.i.i.i.i.i: ; preds = %do.body.i.i.i76.i.i @@ -550,26 +529,26 @@ do.body8.i.i.i.i.i: ; preds = %do.body.i.i.i76.i.i unreachable cleanup.sink.split.i.i.i.i: ; preds = %do.body.i.i.i76.i.i, %if.then.i26.i.i.i.i - %add.i.sink.i.i.i.i = phi i32 [ %120, %if.then.i26.i.i.i.i ], [ %add.i.i.i.i.i, %do.body.i.i.i76.i.i ] + %add.i.sink.i.i.i.i = phi i32 [ %119, %if.then.i26.i.i.i.i ], [ %add.i.i.i.i.i, %do.body.i.i.i76.i.i ] store i32 %add.i.sink.i.i.i.i, i32* %count.i.i.i.i, align 4 br label %sw.epilog.i.i.i sw.epilog.i.i.i: ; preds = %cleanup.sink.split.i.i.i.i, %if.end.i.i73.i.i, %show_path.exit.i.i.sw.epilog.i_crit_edge.i.i - %123 = phi i32 [ %.pre.i.i, %show_path.exit.i.i.sw.epilog.i_crit_edge.i.i ], [ %116, %if.end.i.i73.i.i ], [ %add.i.sink.i.i.i.i, %cleanup.sink.split.i.i.i.i ] + %122 = phi i32 [ %.pre.i.i, %show_path.exit.i.i.sw.epilog.i_crit_edge.i.i ], [ %115, %if.end.i.i73.i.i ], [ %add.i.sink.i.i.i.i, %cleanup.sink.split.i.i.i.i ] %ret.0.i.i.i = phi i32 [ %call.i.i.i69.i.i, %show_path.exit.i.i.sw.epilog.i_crit_edge.i.i ], [ -11, %if.end.i.i73.i.i ], [ 0, %cleanup.sink.split.i.i.i.i ] - %124 = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %123, i32 512) #7 - %125 = extractvalue { i32, i1 } %124, 1 - br i1 %125, label %do_statmount.exit.i.i, label %if.end35.i79.i.i, !prof !7 + %123 = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %122, i32 512) #7 + %124 = extractvalue { i32, i1 } %123, 1 + br i1 %124, label %do_statmount.exit.i.i, label %if.end35.i79.i.i, !prof !7 if.end35.i79.i.i: ; preds = %sw.epilog.i.i.i - %126 = extractvalue { i32, i1 } %124, 0 - %127 = load i32, i32* %.compoundliteral.sroa.3.0..sroa_idx12.i.i.i, align 4 - %cmp.not.i78.i.i = icmp ult i32 %126, %127 + %125 = extractvalue { i32, i1 } %123, 0 + %126 = load i32, i32* %.compoundliteral.sroa.3.0..sroa_idx12.i.i.i, align 4 + %cmp.not.i78.i.i = icmp ult i32 %125, %126 br i1 %cmp.not.i78.i.i, label %if.end37.i.i.i, label %do_statmount.exit.i.i if.end37.i.i.i: ; preds = %if.end35.i79.i.i - %128 = load i32, i32* %.compoundliteral.sroa.6.0..sroa_idx20.i.i.i, align 4 - %cmp.i83.i.i.i = icmp eq i32 %123, %128 + %127 = load i32, i32* %.compoundliteral.sroa.6.0..sroa_idx20.i.i.i, align 4 + %cmp.i83.i.i.i = icmp eq i32 %122, %127 br i1 %cmp.i83.i.i.i, label %do_statmount.exit.i.i, label %if.end46.i.i.i, !prof !7 if.end46.i.i.i: ; preds = %if.end37.i.i.i @@ -577,51 +556,51 @@ if.end46.i.i.i: ; preds = %if.end37.i.i.i br i1 %tobool47.not.i.i.i, label %if.end35.land.lhs.true37_crit_edge.i.i.i, label %do_statmount.exit.i.i if.end35.land.lhs.true37_crit_edge.i.i.i: ; preds = %if.end46.i.i.i - %129 = load i8*, i8** %buf.i.i.i.i, align 4 - %inc.i.i.i = add nuw i32 %123, 1 + %128 = load i8*, i8** %buf.i.i.i.i, align 4 + %inc.i.i.i = add nuw i32 %122, 1 store i32 %inc.i.i.i, i32* %count.i.i.i.i, align 4 - %arrayidx.i.i.i = getelementptr i8, i8* %129, i32 %123 + %arrayidx.i.i.i = getelementptr i8, i8* %128, i32 %122 store i8 0, i8* %arrayidx.i.i.i, align 1 - %130 = load i64, i64* %mask.i.i.i.i, align 4 - %or.i.i.i = or i64 %130, 8 + %129 = load i64, i64* %mask.i.i.i.i, align 4 + %or.i.i.i = or i64 %129, 8 store i64 %or.i.i.i, i64* %mask.i.i.i.i, align 4 %.pre110.i.i.i = load i64, i64* %.compoundliteral.sroa.414.0..sroa_idx15.i.i.i, align 4 br label %land.lhs.true37.i.i.i land.lhs.true37.i.i.i: ; preds = %if.end35.land.lhs.true37_crit_edge.i.i.i, %land.lhs.true29.i.i.i - %131 = phi i64 [ %.pre110.i.i.i, %if.end35.land.lhs.true37_crit_edge.i.i.i ], [ %109, %land.lhs.true29.i.i.i ] - %and39.i.i.i = and i64 %131, 16 + %130 = phi i64 [ %.pre110.i.i.i, %if.end35.land.lhs.true37_crit_edge.i.i.i ], [ %108, %land.lhs.true29.i.i.i ] + %and39.i.i.i = and i64 %130, 16 %tobool40.not.i.i.i = icmp eq i64 %and39.i.i.i, 0 br i1 %tobool40.not.i.i.i, label %do_statmount.exit.i.i, label %if.then41.i.i.i if.then41.i.i.i: ; preds = %land.lhs.true37.i.i.i - %132 = load i32, i32* %count.i.i.i.i, align 4 - store i32 %132, i32* %mnt_point.i.i.i.i, align 4 - %133 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 + %131 = load i32, i32* %count.i.i.i.i, align 4 + store i32 %131, i32* %mnt_point.i.i.i.i, align 4 + %132 = load %struct.vfsmount*, %struct.vfsmount** %.compoundliteral.sroa.4.0..sroa_idx13.i.i.i, align 4 call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %12) #7 store i64 0, i64* %13, align 8, !annotation !73 - store %struct.vfsmount* %133, %struct.vfsmount** %mnt2.i.i.i.i.i, align 8 - %mnt_root.i81.i.i.i.i = getelementptr inbounds %struct.vfsmount, %struct.vfsmount* %133, i32 0, i32 0 - %134 = load %struct.dentry*, %struct.dentry** %mnt_root.i81.i.i.i.i, align 4 - store %struct.dentry* %134, %struct.dentry** %dentry.i.i.i.i.i, align 4 - %call.i.i.i.i.i = call i32 @seq_path_root(%struct.seq_file* inreg %seq1.i.i.i.i, %struct.path* inreg nonnull %mnt_path.i.i.i.i.i, %struct.path* inreg %.compoundliteral.sroa.5.0..sroa_idx.i.i.i, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.25, i32 0, i32 0)) #21 + store %struct.vfsmount* %132, %struct.vfsmount** %mnt2.i.i.i.i.i, align 8 + %mnt_root.i81.i.i.i.i = getelementptr inbounds %struct.vfsmount, %struct.vfsmount* %132, i32 0, i32 0 + %133 = load %struct.dentry*, %struct.dentry** %mnt_root.i81.i.i.i.i, align 4 + store %struct.dentry* %133, %struct.dentry** %dentry.i.i.i.i.i, align 4 + %call.i.i.i.i.i = call i32 @seq_path_root(%struct.seq_file* inreg %seq1.i.i.i.i, %struct.path* inreg nonnull %mnt_path.i.i.i.i.i, %struct.path* inreg %.compoundliteral.sroa.5.0..sroa_idx.i.i.i, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.25, i32 0, i32 0)) #20 %cmp.i.i.i.i.i = icmp eq i32 %call.i.i.i.i.i, 1 %cond.i.i.i.i.i = select i1 %cmp.i.i.i.i.i, i32 0, i32 %call.i.i.i.i.i call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %12) #7 - %135 = load i32, i32* %count.i.i.i.i, align 4 - %136 = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %135, i32 512) #7 - %137 = extractvalue { i32, i1 } %136, 1 - br i1 %137, label %do_statmount.exit.i.i, label %if.end35.i87.i.i.i, !prof !7 + %134 = load i32, i32* %count.i.i.i.i, align 4 + %135 = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %134, i32 512) #7 + %136 = extractvalue { i32, i1 } %135, 1 + br i1 %136, label %do_statmount.exit.i.i, label %if.end35.i87.i.i.i, !prof !7 if.end35.i87.i.i.i: ; preds = %if.then41.i.i.i - %138 = extractvalue { i32, i1 } %136, 0 - %139 = load i32, i32* %.compoundliteral.sroa.3.0..sroa_idx12.i.i.i, align 4 - %cmp.not.i86.i.i.i = icmp ult i32 %138, %139 + %137 = extractvalue { i32, i1 } %135, 0 + %138 = load i32, i32* %.compoundliteral.sroa.3.0..sroa_idx12.i.i.i, align 4 + %cmp.not.i86.i.i.i = icmp ult i32 %137, %138 br i1 %cmp.not.i86.i.i.i, label %if.end37.i90.i.i.i, label %do_statmount.exit.i.i if.end37.i90.i.i.i: ; preds = %if.end35.i87.i.i.i - %140 = load i32, i32* %.compoundliteral.sroa.6.0..sroa_idx20.i.i.i, align 4 - %cmp.i83.i89.i.i.i = icmp eq i32 %135, %140 + %139 = load i32, i32* %.compoundliteral.sroa.6.0..sroa_idx20.i.i.i, align 4 + %cmp.i83.i89.i.i.i = icmp eq i32 %134, %139 br i1 %cmp.i83.i89.i.i.i, label %do_statmount.exit.i.i, label %if.end46.i91.i.i.i, !prof !7 if.end46.i91.i.i.i: ; preds = %if.end37.i90.i.i.i @@ -629,83 +608,83 @@ if.end46.i91.i.i.i: ; preds = %if.end37.i90.i.i.i br i1 %tobool47.not.i.i.i.i, label %if.end49.i.i.i.i, label %do_statmount.exit.i.i if.end49.i.i.i.i: ; preds = %if.end46.i91.i.i.i - %141 = load i8*, i8** %buf.i.i.i.i, align 4 - %inc.i93.i.i.i = add nuw i32 %135, 1 + %140 = load i8*, i8** %buf.i.i.i.i, align 4 + %inc.i93.i.i.i = add nuw i32 %134, 1 store i32 %inc.i93.i.i.i, i32* %count.i.i.i.i, align 4 - %arrayidx.i94.i.i.i = getelementptr i8, i8* %141, i32 %135 + %arrayidx.i94.i.i.i = getelementptr i8, i8* %140, i32 %134 store i8 0, i8* %arrayidx.i94.i.i.i, align 1 - %142 = load i64, i64* %mask.i.i.i.i, align 4 - %or.i96.i.i.i = or i64 %142, 16 + %141 = load i64, i64* %mask.i.i.i.i, align 4 + %or.i96.i.i.i = or i64 %141, 16 store i64 %or.i96.i.i.i, i64* %mask.i.i.i.i, align 4 br label %do_statmount.exit.i.i do_statmount.exit.i.i: ; preds = %land.rhs.i.i.i.i, %if.end49.i.i.i.i, %if.end46.i91.i.i.i, %if.end37.i90.i.i.i, %if.end35.i87.i.i.i, %if.then41.i.i.i, %land.lhs.true37.i.i.i, %if.end46.i.i.i, %if.end37.i.i.i, %if.end35.i79.i.i, %sw.epilog.i.i.i, %if.end37.i.i.i.i, %if.end35.i.i.i.i, %if.then25.i.i.i, %if.end.i51.i.i, %is_path_reachable.exit.i.i.i %retval.0.i56.i.i = phi i32 [ -1, %is_path_reachable.exit.i.i.i ], [ %call6.i.i.i, %if.end.i51.i.i ], [ 0, %land.lhs.true37.i.i.i ], [ 0, %if.end49.i.i.i.i ], [ -75, %if.then41.i.i.i ], [ -75, %if.end35.i87.i.i.i ], [ -11, %if.end37.i90.i.i.i ], [ %cond.i.i.i.i.i, %if.end46.i91.i.i.i ], [ -11, %if.end37.i.i.i.i ], [ -75, %if.end35.i.i.i.i ], [ -75, %if.then25.i.i.i ], [ %ret.0.i.i.i, %if.end46.i.i.i ], [ -11, %if.end37.i.i.i ], [ -75, %if.end35.i79.i.i ], [ -75, %sw.epilog.i.i.i ], [ -1, %land.rhs.i.i.i.i ] - call void @path_put(%struct.path* inreg %.compoundliteral.sroa.5.0..sroa_idx.i.i.i) #21 - call void @up_read(%struct.rw_semaphore* inreg nonnull @namespace_sem) #21 + call void @path_put(%struct.path* inreg %.compoundliteral.sroa.5.0..sroa_idx.i.i.i) #20 + call void @up_read(%struct.rw_semaphore* inreg nonnull @namespace_sem) #20 %tobool18.not.i.i = icmp eq i32 %retval.0.i56.i.i, 0 br i1 %tobool18.not.i.i, label %if.then19.i.i, label %if.end21.i.i if.then19.i.i: ; preds = %do_statmount.exit.i.i - %143 = load i32, i32* %.compoundliteral.sroa.3.0..sroa_idx12.i.i.i, align 4 - %cmp.i57.i.i = icmp ult i32 %143, 512 - %cond.i.i.i = select i1 %cmp.i57.i.i, i32 %143, i32 512 - %144 = load i32, i32* %count.i.i.i.i, align 4 - %tobool.not.i58.i.i = icmp eq i32 %144, 0 + %142 = load i32, i32* %.compoundliteral.sroa.3.0..sroa_idx12.i.i.i, align 4 + %cmp.i57.i.i = icmp ult i32 %142, 512 + %cond.i.i.i = select i1 %cmp.i57.i.i, i32 %142, i32 512 + %143 = load i32, i32* %count.i.i.i.i, align 4 + %tobool.not.i58.i.i = icmp eq i32 %143, 0 br i1 %tobool.not.i58.i.i, label %if.end.i63.i.i, label %land.lhs.true.i60.i.i land.lhs.true.i60.i.i: ; preds = %if.then19.i.i - %cmp9.i.i.i.i.i = icmp slt i32 %144, 0 + %cmp9.i.i.i.i.i = icmp slt i32 %143, 0 br i1 %cmp9.i.i.i.i.i, label %do.body.i.i.i.i.i, label %copy_to_user.exit.i.i.i, !prof !7 do.body.i.i.i.i.i: ; preds = %land.lhs.true.i60.i.i call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b\09# bug_entry::bug_addr\0A\09.long ${0:c}\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.21, i32 0, i32 0), i32 249, i32 2307, i32 12) #7, !srcloc !111 - br label %if.end21.thread.i.i + br label %cleanup.sink.split.i.i copy_to_user.exit.i.i.i: ; preds = %land.lhs.true.i60.i.i - %145 = load i8*, i8** %.compoundliteral.sroa.518.0..sroa_idx19.i.i.i, align 4 - %146 = load i8*, i8** %14, align 4 - %add.ptr.i.i.i = getelementptr i8, i8* %146, i32 512 - %call1.i.i.i.i = call i32 @_copy_to_user(i8* inreg %add.ptr.i.i.i, i8* inreg %145, i32 inreg %144) #21 + %144 = load i8*, i8** %.compoundliteral.sroa.518.0..sroa_idx19.i.i.i, align 4 + %145 = load i8*, i8** %14, align 4 + %add.ptr.i.i.i = getelementptr i8, i8* %145, i32 512 + %call1.i.i.i.i = call i32 @_copy_to_user(i8* inreg %add.ptr.i.i.i, i8* inreg %144, i32 inreg %143) #20 %tobool5.not.i.i.i = icmp eq i32 %call1.i.i.i.i, 0 - br i1 %tobool5.not.i.i.i, label %copy_to_user.exit.if.end_crit_edge.i.i.i, label %if.end21.thread.i.i + br i1 %tobool5.not.i.i.i, label %copy_to_user.exit.if.end_crit_edge.i.i.i, label %cleanup.sink.split.i.i copy_to_user.exit.if.end_crit_edge.i.i.i: ; preds = %copy_to_user.exit.i.i.i %.pre.i61.i.i = load i32, i32* %count.i.i.i.i, align 4 br label %if.end.i63.i.i if.end.i63.i.i: ; preds = %copy_to_user.exit.if.end_crit_edge.i.i.i, %if.then19.i.i - %147 = phi i32 [ %.pre.i61.i.i, %copy_to_user.exit.if.end_crit_edge.i.i.i ], [ 0, %if.then19.i.i ] - %add.i.i.i = add i32 %147, %cond.i.i.i + %146 = phi i32 [ %.pre.i61.i.i, %copy_to_user.exit.if.end_crit_edge.i.i.i ], [ 0, %if.then19.i.i ] + %add.i.i.i = add i32 %146, %cond.i.i.i store i32 %add.i.i.i, i32* %size.i62.i.i, align 4 - %148 = load i8*, i8** %14, align 4 - %call1.i38.i.i.i = call i32 @_copy_to_user(i8* inreg %148, i8* inreg %15, i32 inreg %cond.i.i.i) #21 + %147 = load i8*, i8** %14, align 4 + %call1.i38.i.i.i = call i32 @_copy_to_user(i8* inreg %147, i8* inreg %15, i32 inreg %cond.i.i.i) #20 %phi.cmp.i.i.i = icmp eq i32 %call1.i38.i.i.i, 0 %phi.sel.i.i.i = select i1 %phi.cmp.i.i.i, i32 0, i32 -14 - br label %if.end21.thread.i.i - -if.end21.thread.i.i: ; preds = %if.end.i63.i.i, %copy_to_user.exit.i.i.i, %do.body.i.i.i.i.i - %ret.0.ph.i.i = phi i32 [ %phi.sel.i.i.i, %if.end.i63.i.i ], [ -14, %do.body.i.i.i.i.i ], [ -14, %copy_to_user.exit.i.i.i ] - %149 = load i8*, i8** %.compoundliteral.sroa.518.0..sroa_idx19.i.i.i, align 4 - call void @kvfree(i8* inreg %149) #21 - br label %__se_sys_statmount.exit + br label %cleanup.sink.split.i.i if.end21.i.i: ; preds = %do_statmount.exit.i.i - %150 = load i8*, i8** %.compoundliteral.sroa.518.0..sroa_idx19.i.i.i, align 4 - call void @kvfree(i8* inreg %150) #21 + %148 = load i8*, i8** %.compoundliteral.sroa.518.0..sroa_idx19.i.i.i, align 4 + call void @kvfree(i8* inreg %148) #20 %cmp.not.i65.i.i = icmp eq i32 %retval.0.i56.i.i, -11 br i1 %cmp.not.i65.i.i, label %retry_statmount.exit.i.i, label %__se_sys_statmount.exit, !prof !7 retry_statmount.exit.i.i: ; preds = %if.end21.i.i - %151 = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %seq_size.0.i.i, i32 2) #7 - %152 = extractvalue { i32, i1 } %151, 1 - %153 = extractvalue { i32, i1 } %151, 0 - %cmp10.i.i.i = icmp ugt i32 %153, 2147479552 - %154 = or i1 %152, %cmp10.i.i.i - br i1 %154, label %__se_sys_statmount.exit, label %retry.i.i - -__se_sys_statmount.exit: ; preds = %if.end21.i.i, %retry_statmount.exit.i.i, %entry, %if.end.i.i, %if.end.i.i.i, %if.end14.i.i.i, %if.then36.i.i.i.i, %if.end8.i.i.i.i.i.i, %prepare_kstatmount.exit.thread.i.i, %if.then11.i.i, %if.end21.thread.i.i - %retval.0.i.i = phi i32 [ -2, %if.then11.i.i ], [ -22, %entry ], [ %retval.0.i43.ph.i.i, %prepare_kstatmount.exit.thread.i.i ], [ -14, %if.end8.i.i.i.i.i.i ], [ %..i.i.i.i, %if.then36.i.i.i.i ], [ -22, %if.end14.i.i.i ], [ -7, %if.end.i.i.i ], [ -14, %if.end.i.i ], [ %ret.0.ph.i.i, %if.end21.thread.i.i ], [ %retval.0.i56.i.i, %if.end21.i.i ], [ -11, %retry_statmount.exit.i.i ] + %149 = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %seq_size.0.i.i, i32 2) #7 + %150 = extractvalue { i32, i1 } %149, 1 + %151 = extractvalue { i32, i1 } %149, 0 + %cmp10.i.i.i = icmp ugt i32 %151, 2147479552 + %152 = or i1 %150, %cmp10.i.i.i + br i1 %152, label %__se_sys_statmount.exit, label %retry.i.i + +cleanup.sink.split.i.i: ; preds = %if.end.i63.i.i, %copy_to_user.exit.i.i.i, %do.body.i.i.i.i.i, %if.then11.i.i + %retval.0.ph.i.i = phi i32 [ -2, %if.then11.i.i ], [ %phi.sel.i.i.i, %if.end.i63.i.i ], [ -14, %do.body.i.i.i.i.i ], [ -14, %copy_to_user.exit.i.i.i ] + %153 = load i8*, i8** %.compoundliteral.sroa.518.0..sroa_idx19.i.i.i, align 4 + call void @kvfree(i8* inreg %153) #20 + br label %__se_sys_statmount.exit + +__se_sys_statmount.exit: ; preds = %retry.i.i, %if.end21.i.i, %retry_statmount.exit.i.i, %entry, %if.end.i.i, %if.end.i.i.i, %if.end14.i.i.i, %if.then36.i.i.i.i, %if.end8.i.i.i.i.i.i, %retry.preheader.i.i, %cleanup.sink.split.i.i + %retval.0.i.i = phi i32 [ -22, %entry ], [ -14, %if.end8.i.i.i.i.i.i ], [ %..i.i.i.i, %if.then36.i.i.i.i ], [ -22, %if.end14.i.i.i ], [ -7, %if.end.i.i.i ], [ -14, %if.end.i.i ], [ -14, %retry.preheader.i.i ], [ %retval.0.ph.i.i, %cleanup.sink.split.i.i ], [ %retval.0.i56.i.i, %if.end21.i.i ], [ -12, %retry.i.i ], [ -11, %retry_statmount.exit.i.i ] call void @llvm.lifetime.end.p0i8(i64 612, i8* nonnull %7) #7 call void @llvm.lifetime.end.p0i8(i64 24, i8* nonnull %6) #7 ret i32 %retval.0.i.i ```

I am able to avoid this warning with the following diff (which just cause the allocations of the compound literal to be in prepare_kstatmount()) but I am not sure if that would be acceptable upstream.

diff --git a/fs/namespace.c b/fs/namespace.c
index 0771072dabed..7800adc1dafe 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -4950,6 +4950,9 @@ static inline bool retry_statmount(const long ret, size_t *seq_size)
    return true;
 }

+#if defined(CONFIG_CC_IS_CLANG) && CONFIG_CLANG_VERSION < 140000
+noinline_for_stack
+#endif
 static int prepare_kstatmount(struct kstatmount *ks, struct mnt_id_req *kreq,
                  struct statmount __user *buf, size_t bufsize,
                  size_t seq_size)
nickdesaulniers commented 9 months ago

upstream issue for compound literals: https://github.com/llvm/llvm-project/issues/68746

nathanchance commented 9 months ago

I see Arnd sent a patch for this tangentially: https://lore.kernel.org/20231212214819.247611-1-arnd@kernel.org/

nathanchance commented 8 months ago

Arnd's v2 got squashed into the original change. As there is an open issue around this already, I will close this up with a workaround applied label.