From patchwork Wed Apr 17 05:32:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 162393 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5081851jan; Tue, 16 Apr 2019 22:34:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9U+wVt9Or3UxhZnMjAT/OlMvSE2aJoX4uYTWS19YA7YA0KgTdjsTEFC6RE06m+Dr96SIJ X-Received: by 2002:a5d:604e:: with SMTP id j14mr1222387wrt.233.1555479267340; Tue, 16 Apr 2019 22:34:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555479267; cv=none; d=google.com; s=arc-20160816; b=uD05AUHx2tnsI6C3UUSVShBrzHPRBxjnzs1Omp09CyTnPrYDvnT6wTXxan2tBDC0u5 AoUwggIeBQfZnaGwM0YiROmxRZmBfP/h2ZToKUS5VboBRt+CusIUr2Ww4tBJNfc/Fwo/ ddbIcTCqV2pqhfXv32TJcLqty5au4f3fAjjcJFW4Hc/l0yeF16sGj3d6Twfwm8lhuAnX 8ahfiG2iBrsp7UtBjZkx22XFYpg0kAYGuSUVtOJajXwb08DhAsn/w+o9oYbPkWkqN230 2caNUdVHhXU7HucCyKYaG7lx+OOX+lt3w/HDL0i+zSQCKVRB+3k00SfaNrcKOQfMSyMU 9x2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:to:from :dkim-signature; bh=8DKfZxjPpW90tslKeQhaX6xpSd5ENiccbyes80uD3MI=; b=yuPOIRmfpphV90r/FDe1oYU0+tmfrJZ5r6Fkyloqx22w/4YkuGhdnlp/J6E9xDX9Lr C1oVVSBVXiqbVfN0s7rlsdkzZHAEssKN6dyzGCbBKig9NCaJo0qB+rGftqqjRlbtVUU2 j3NUhzMnSY8SdDHS8PN4Z9cLiy/9Gy6JbIoRfKNHyRiJJZK0Tb0K8RhtFG4hu/VgulVW ThsdqGUpU1wAtbINzAMUNfsj66E/8cXG6sqFj9PvXyJibDePPDuOEnOindt+jPV8AZYw uzk7IAbfjBEQmN5PwBvEaUBqoQbHvPqtJu2r8vRPMttegcnK0w/voIsvb4peOwU5lQZ6 3pKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="JIkR4/HM"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x11si989540wmc.144.2019.04.16.22.34.26 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 16 Apr 2019 22:34:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="JIkR4/HM"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:47240 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hGdDG-0000d9-28 for patch@linaro.org; Wed, 17 Apr 2019 01:34:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hGdBT-0007vs-Oq for qemu-devel@nongnu.org; Wed, 17 Apr 2019 01:32:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hGdBR-0002fI-V8 for qemu-devel@nongnu.org; Wed, 17 Apr 2019 01:32:35 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:46122) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hGdBQ-0002cq-3o for qemu-devel@nongnu.org; Wed, 17 Apr 2019 01:32:33 -0400 Received: by mail-pg1-x541.google.com with SMTP id q1so11432420pgv.13 for ; Tue, 16 Apr 2019 22:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=8DKfZxjPpW90tslKeQhaX6xpSd5ENiccbyes80uD3MI=; b=JIkR4/HMC0fzWasOAhzM23Xy1Wx8mq9EVrcBNzv82iyt8u6lOhDsgDM9xkP3phykVG g3ZzKwozAVSy5rDF+TpeUi1vfqgCl4EYa5BWS9PPrzOSma8rSHuRWf6LWhJJycrd4k+H GO7/1GPU3GX3Kcpvc4UbThjJPjXedKckKlLLSsOHphsW64wtE6LMB2T54yb2D2vDjxZD VSSdVMv0LsEUUv0bxfPGlCzVo+Se4YMChpd0KUV+mRp1MUUD4k1nL3Unn639s0jLLiJK fJalj6K3eSsZZFRWGQXxOEeAL+EQgPuTzMV6b1Q97fzWsfS41v0YpPiJ2zc352nArWk5 74Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8DKfZxjPpW90tslKeQhaX6xpSd5ENiccbyes80uD3MI=; b=VjIcwfAihVxi56ocSxxn/ICdcsBYNe3zI2No2KAWFVm+MQqheMiqiBdirWe/cuhEO/ E6h83cw+tM0r+aCTVafYR2Iuxj7Vt3kXO6uJDj5LgbwY+7wlvlBCw9vYX1NrJt7hBj64 zH40/VR7xjuIR1reMoH3iC4Dx77Mp9i58sYGGnS0636F/WLnzfujB4QnaagHtxc/MZCm kZstgmo9KJHpH3P7/KkX/Ow2bn4osGIj58Kzohb6rLT2gN5RYHWokvTGSnUAulCq8zwe t0zDBaNmath0VVVPC4k0fFjTRqTMM66+AiwYh8/HKVZW4i34gOXRQY61vcZIL6gGvZGx zNew== X-Gm-Message-State: APjAAAW/CmCDE+KNlDhIV+M9EQPbyIUUuWuWMK02j8F0L4GMXd10rGnR ggvEf61TVMz13np3290Cq26gQaCBVl4= X-Received: by 2002:a62:1193:: with SMTP id 19mr85443594pfr.82.1555479148646; Tue, 16 Apr 2019 22:32:28 -0700 (PDT) Received: from localhost.localdomain (rrcs-66-91-136-155.west.biz.rr.com. [66.91.136.155]) by smtp.gmail.com with ESMTPSA id d129sm84513383pfa.142.2019.04.16.22.32.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 22:32:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 16 Apr 2019 19:32:24 -1000 Message-Id: <20190417053225.27505-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::541 Subject: [Qemu-devel] [PATCH 0/1] util/path: Do not cache all filenames at startup X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, laurent@vivier.eu, evgreen@chromium.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is a third variant attempting to fix the problem of the -L interp_prefix handling not coping well pointing to a full chroot. Previous versions include: https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg06592.html https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg07304.html Both of the other versions keep an open file descriptor to the directory that is interp_prefix. While this seems to be efficient, they also leak a file descriptor into the guest. This has follow-on effects on the emulation, causing failures e.g. within the LTP testsuite. This version uses only string manipulation and access(2). A plausible criticism of this is the mutex and the cache. Are they really needed? I have no idea. I can imagine removing that is actually more efficient, not needing a lock around a shared data structure. Comments? r~ Richard Henderson (1): util/path: Do not cache all filenames at startup util/path.c | 211 ++++++++++++++-------------------------------------- 1 file changed, 57 insertions(+), 154 deletions(-) -- 2.17.1