Remove mcoverlayfs code

mcoverlayfs code is now unused (technically should work on top of the
soft emulation but not well tested, and untested unused code is bad).
Remove it.

Left the unshare/bind_mount_recursive code in mcexec in a new
MCEXEC_BIND_MOUNT ifdef (only in config.h.in directly to discourage use.
it disables the ioctl as well, but the main code is still compiled to
keep up to date with linux api changes... although it's using kallsyms
lookup so it does not validate much more than "the symbol still exists")

I honestly think this should go as well (people who would want to use it
are root and could do it manually), but will give up for now.

Change-Id: I832b6a8ab19e24ed67a1a5044b1c6c32381ae0aa
This commit is contained in:
Dominique Martinet
2019-02-15 09:32:12 +09:00
committed by Masamichi Takagi
parent 0bb612caea
commit 791e8c2114
38 changed files with 12 additions and 20839 deletions

View File

@@ -20,7 +20,6 @@ SBINDIR="${prefix}/sbin"
ETCDIR=@ETCDIR@
KMODDIR="@KMODDIR@"
KERNDIR="@MCKERNELDIR@"
ENABLE_MCOVERLAYFS="@ENABLE_MCOVERLAYFS@"
MCK_BUILDID=@BUILDID@
mem="512M@0"
@@ -137,36 +136,6 @@ error_exit() {
fi
fi
;&
mcos_sys_mounted)
if [ "$ENABLE_MCOVERLAYFS" == "ON" ]; then
umount /tmp/mcos/mcos0_sys
fi
;&
mcos_proc_mounted)
if [ "$ENABLE_MCOVERLAYFS" == "ON" ]; then
umount /tmp/mcos/mcos0_proc
fi
;&
mcoverlayfs_loaded)
if [ "$ENABLE_MCOVERLAYFS" == "ON" ]; then
rmmod mcoverlay 2>/dev/null
fi
;&
linux_proc_bind_mounted)
if [ "$ENABLE_MCOVERLAYFS" == "ON" ]; then
umount /tmp/mcos/linux_proc
fi
;&
tmp_mcos_mounted)
if [ "$ENABLE_MCOVERLAYFS" == "ON" ]; then
umount /tmp/mcos
fi
;&
tmp_mcos_created)
if [ "$ENABLE_MCOVERLAYFS" == "ON" ]; then
rm -rf /tmp/mcos
fi
;&
os_created)
# Destroy all LWK instances
if ls /dev/mcos* 1>/dev/null 2>&1; then
@@ -254,15 +223,6 @@ if [ "$cpus" == "" ]; then
fi
fi
# Remove mcoverlay if loaded
if [ "$ENABLE_MCOVERLAYFS" == "ON" ]; then
${SBINDIR}/mcoverlay-destroy.sh
ret=$?
if [ $ret -ne 0 ]; then
error_exit "initial"
fi
fi
# Stop irqbalance
if [ "${irqbalance_used}" == "yes" ]; then
systemctl stop irqbalance_mck.service 2>/dev/null
@@ -461,15 +421,6 @@ if ! chown ${chown_option} /dev/mcd* /dev/mcos*; then
echo "warning: failed to chown device files" >&2
fi
# Overlay /proc, /sys with McKernel specific contents
if [ "$ENABLE_MCOVERLAYFS" == "ON" ]; then
${SBINDIR}/mcoverlay-create.sh
ret=$?
if [ $ret -ne 0 ]; then
error_exit "os_created"
fi
fi
# Start irqbalance with CPUs and IRQ for McKernel banned
if [ "${irqbalance_used}" == "yes" ]; then
banirq=`cat /proc/interrupts| perl -e 'while(<>) { if(/^\s*(\d+).*IHK\-SMP\s*$/) {print $1;}}'`
@@ -480,12 +431,12 @@ if [ "${irqbalance_used}" == "yes" ]; then
if ! systemctl link $ETCDIR/irqbalance_mck.service >/dev/null 2>/dev/null; then
echo "error: linking irqbalance_mck" >&2
error_exit "mcos_sys_mounted"
error_exit "os_created"
fi
if ! systemctl start irqbalance_mck.service 2>/dev/null ; then
echo "error: starting irqbalance_mck" >&2
error_exit "mcos_sys_mounted"
error_exit "os_created"
fi
# echo cpus=$cpus ncpus=$ncpus banirq=$banirq
fi