Commit
4d0c5ba (vfs: do get_write_access() on upper layer of overlayfs)
that was merged for kernel v4.8 changes the behavior of execve+truncate
in a subtle way.
When file is executed from lower and then truncated, the truncation is
allowed, becasue it only affects the size of the copied up file and does
not affect the VM mapping of the executed lower file.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
$SCRATCH_MNT/test_upper
# success, all done
-echo "Silence is golden"
status=0
exit
QA output created by 013
-Silence is golden
+truncate(test_lower) should have failed