mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 10:13:57 +08:00
selftest for default_file_splice_read() infoleak
bug fixed in commit b9dc6f65bc
("fix a fencepost error in pipe_advance()")
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
7880b43bdf
commit
b8826e506e
@ -24,6 +24,7 @@ TARGETS += ptrace
|
||||
TARGETS += seccomp
|
||||
TARGETS += sigaltstack
|
||||
TARGETS += size
|
||||
TARGETS += splice
|
||||
TARGETS += static_keys
|
||||
TARGETS += sync
|
||||
TARGETS += sysctl
|
||||
|
8
tools/testing/selftests/splice/Makefile
Normal file
8
tools/testing/selftests/splice/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
TEST_PROGS := default_file_splice_read.sh
|
||||
EXTRA := default_file_splice_read
|
||||
all: $(TEST_PROGS) $(EXTRA)
|
||||
|
||||
include ../lib.mk
|
||||
|
||||
clean:
|
||||
rm -fr $(TEST_PROGS) $(EXTRA)
|
@ -0,0 +1,8 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <fcntl.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
splice(0, 0, 1, 0, 1<<30, 0);
|
||||
return 0;
|
||||
}
|
7
tools/testing/selftests/splice/default_file_splice_read.sh
Executable file
7
tools/testing/selftests/splice/default_file_splice_read.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
n=`./default_file_splice_read </dev/null | wc -c`
|
||||
|
||||
test "$n" = 0 && exit 0
|
||||
|
||||
echo "default_file_splice_read broken: leaked $n"
|
||||
exit 1
|
Loading…
Reference in New Issue
Block a user