From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7107529588469661696 X-Received: by 2002:a05:6e02:1c26:b0:2d3:bbe3:9223 with SMTP id m6-20020a056e021c2600b002d3bbe39223mr23824011ilh.176.1654850688855; Fri, 10 Jun 2022 01:44:48 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6e02:1d8e:b0:2d1:978f:1f39 with SMTP id h14-20020a056e021d8e00b002d1978f1f39ls2420048ila.9.gmail; Fri, 10 Jun 2022 01:44:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy01PKnOWM3BwHtjP3mhtMYOVeRRVy0Xo5M2vR+43Ic02INspL8zE/pl6kqpoAaLvy9txQC X-Received: by 2002:a05:6e02:50f:b0:2d7:7bd5:3a38 with SMTP id d15-20020a056e02050f00b002d77bd53a38mr1650868ils.116.1654850688223; Fri, 10 Jun 2022 01:44:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654850688; cv=none; d=google.com; s=arc-20160816; b=mLpdsDWHUMYJfXSa0Z6+f7SW3+DGBIB+G70+FfcmfTddY6t+H70DldM6C+wH2g9nQq /aTgGTGRk71qxwOWxEz4KXaVLoGICzkcSS07T4mvRaMYDdvdbLXxe1dbnBRsn+n4MvJ5 EHanvi6hJhAoN5au4/7YMpvxzix79FL+opb7vvXD0PXQ1jVWjgSm8ObTNFsUlteEAxRM O6jvy7pmFfWah9TwHC/pQi62KCMvhU+6aD+yakbTPhrj1ZBn1WY+ZHnQ7Zyv45Kp6Gm/ mCvAkQvgP0iyQyntAxWUTFK446gj/Fsn6UAIy4d/vqj78Ftn4rUrAyKUxy5GWUas1IpW JxqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from; bh=XPYXw4VT2XOdbEjGPLkjXD4c6dmAs8QpXdb5dYgQZ/I=; b=M8uBh3igk4x3tp2rf17KHxAGXa0ITBlW6fAOO6GXioTtGj/N6SKd805dmz0WdrmOrM 2B7kKZ3IlgoR/afKmJfYI3kD7Q6nFiSBPzSmJc+nnnJBZ+2jGXHcHA4uJ2a7fWeKARlC SrirWNbSfIeN347UEgqPKnDCe0UskIKi5h2SfSo6yCLIVTLsoquwWdD5LXK0jWsDLXqZ JH0R7JhgBrza5cb8nEVLtlsMGDjeelhPnwGrzn5z2GwnaPCNqiBCjcFqQsAxLn8v/KDT wBjeJNRvnOPDavO6cFFIqaiVRUoF/c/3jhuKf3m/mrglIh0laiY3Sslt70qFp5u7pwnq nFbg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 65-20020a021d44000000b00331ed76f344si339717jaj.4.2022.06.10.01.44.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Jun 2022 01:44:48 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from localhost.localdomain (mm-1-61-214-37.mgts.dynamic.pppoe.byfly.by [37.214.61.1] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 25A8ijFX013277 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jun 2022 10:44:46 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH] meta: do not share dev mounts Date: Fri, 10 Jun 2022 11:44:37 +0300 Message-Id: <20220610084437.7490-1-amikan@ilbers.de> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: gXX0FAAKl76k As /dev was mounted into bootstrap/rootfs/buildchroot in shared mode it made the first ended task unmount /dev/shm or /dev/pts for all other tasks executed at the moment. To prevent mounts corruption make /dev to be mounted as private. This will protect mountpoints from all the propagations during the task execution. Signed-off-by: Anton Mikanovich --- meta/classes/buildchroot.bbclass | 2 +- meta/classes/rootfs.bbclass | 2 +- meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/classes/buildchroot.bbclass b/meta/classes/buildchroot.bbclass index af391df..1148966 100644 --- a/meta/classes/buildchroot.bbclass +++ b/meta/classes/buildchroot.bbclass @@ -42,7 +42,7 @@ buildchroot_do_mounts() { mount --bind '${CCACHE_DIR}' '${BUILDCHROOT_DIR}/ccache' fi mountpoint -q '${BUILDCHROOT_DIR}/dev' || - ( mount --bind /dev '${BUILDCHROOT_DIR}/dev' && + ( mount -o bind,private /dev '${BUILDCHROOT_DIR}/dev' && mount -t tmpfs none '${BUILDCHROOT_DIR}/dev/shm' && mount --bind /dev/pts '${BUILDCHROOT_DIR}/dev/pts' ) mountpoint -q '${BUILDCHROOT_DIR}/proc' || diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index 2f4ea00..bf8b6db 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -34,7 +34,7 @@ rootfs_do_mounts() { sudo -s <<'EOSUDO' set -e mountpoint -q '${ROOTFSDIR}/dev' || \ - ( mount --bind /dev '${ROOTFSDIR}/dev' && + ( mount -o bind,private /dev '${ROOTFSDIR}/dev' && mount -t tmpfs none '${ROOTFSDIR}/dev/shm' && mount --bind /dev/pts '${ROOTFSDIR}/dev/pts' ) mountpoint -q '${ROOTFSDIR}/proc' || \ diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index 7b4def1..a453b36 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -369,7 +369,7 @@ do_bootstrap() { "${ROOTFSDIR}/chroot-setup.sh" "setup" "${ROOTFSDIR}" # update APT - mount --bind /dev ${ROOTFSDIR}/dev + mount -o bind,private /dev ${ROOTFSDIR}/dev mount --bind /dev/pts ${ROOTFSDIR}/dev/pts mount -t tmpfs none "${ROOTFSDIR}/dev/shm" mount -t proc none ${ROOTFSDIR}/proc -- 2.30.2