page_fault_process_memory_range: Remove ihk_mc_map_virtual for CoW of device map

Device map with MAP_PRIVATE is copied when forking using copy_user_pte.
So the map isn't copied by those statements.

Futjitsu: POSTK_TEMP_FIX_14
Refs: #1039
Change-Id: I1a697ed2e003055d66a8eebd3e8d5e9e49d094ad
This commit is contained in:
Tomoki Shirasawa
2018-08-19 15:59:35 +09:00
committed by Masamichi Takagi
parent 9a20cfaefb
commit 5fcbfa2eb5
5 changed files with 141 additions and 21 deletions

68
test/issues/1039/C1039.sh Executable file
View File

@ -0,0 +1,68 @@
#!/bin/sh
BIN=
SBIN=
LTP=
BOOTPARAM="-c 1-7,17-23,9-15,25-31 -m 10G@0,10G@1"
if [ -f ../../../config.h ]; then
str=`grep "^#define BINDIR " ../../../config.h | head -1 | sed 's/^#define BINDIR /BINDIR=/'`
eval $str
fi
if [ "x$BINDIR" = x ];then
BINDIR="$BIN"
fi
if [ -f ../../../Makefile ]; then
str=`grep ^SBINDIR ../../../Makefile | head -1 | sed 's/ //g'`
eval $str
fi
if [ "x$SBINDIR" = x ];then
SBINDIR="$SBIN"
fi
if [ -f $HOME/ltp/testcases/bin/fork01 ]; then
LTPDIR=$HOME/ltp/testcases
fi
if [ "x$LTPDIR" = x ]; then
LTPDIR="$LTP"
fi
if [ ! -x $SBINDIR/mcstop+release.sh ]; then
echo mcstop+release: not found >&2
exit 1
fi
echo -n "mcstop+release.sh ... "
sudo $SBINDIR/mcstop+release.sh
echo "done"
if [ ! -x $SBINDIR/mcreboot.sh ]; then
echo mcreboot: not found >&2
exit 1
fi
echo -n "mcreboot.sh $BOOTPARAM ... "
sudo $SBINDIR/mcreboot.sh $BOOTPARAM
echo "done"
if [ ! -x $BINDIR/mcexec ]; then
echo no mcexec found >&2
exit 1
fi
################################################################################
if [ x$LTPDIR = x ]; then
echo no LTP found >&2
exit 1
fi
for i in fork02:01 fork03:02 execve01:03 execve02:04 execve03:05 mmap12:06; do
tp=`echo $i|sed 's/:.*//'`
id=`echo $i|sed 's/.*://'`
sudo sh -c "PATH=$LTPDIR/bin:$PATH $BINDIR/mcexec $LTPDIR/bin/$tp" 2>&1 | tee $tp.txt
ok=`grep TPASS $tp.txt | wc -l`
ng=`grep TFAIL $tp.txt | wc -l`
if [ $ng = 0 ]; then
echo "*** C1039T$id: $tp OK ($ok)"
else
echo "*** C1039T$id: $tp NG (ok=$ok ng=%ng)"
fi
done