From patchwork Thu May 31 22:49:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 137447 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp209426lji; Thu, 31 May 2018 15:51:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLXvYLsoTsR/0C4Lhf2VTvAKrRx9wTgd3mRV6MHZHzv4HpYWE04+O/q8lS2KEUoesKeFePO X-Received: by 2002:a37:d4d1:: with SMTP id s78-v6mr7723207qks.244.1527807119657; Thu, 31 May 2018 15:51:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527807119; cv=none; d=google.com; s=arc-20160816; b=lST9wPJJbvXCnESD6Vu7u7QDX8EeHhqcjOSVXzYpTMrIb9q6QHBZ1rA1IAAht8EgeZ kzlgtvm/lPgwYrriUBVMj0bQK/R+1VPtgrDb+lMi3EZoLfXi0woO0Dc4VTyXplOD7KCD AU4tZh7SLp55wXNblHsJgmlu+VgG4kMG8FudS8QTvXoIvo5l5Cv5csrm3lwoXxTuhw2D iv4O8mP09/9yQE2kKh6S4YKqazgSEZHZ4kd2ebE+8TzhhZFp8DMP/BuLAz8EAkhf4yfr HK9jkrVzfg9F4xogudpCbArSAuiYhoeKc0ahlYiQfTPm26a/JgiMju2xpe6995uWCRQ6 bHqQ== 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:arc-authentication-results; bh=EN99SEWaAEsntJnr0Z04z4mMKr+q1uPyp/nnjA+I798=; b=QYeXMccrCmW01aLIcCx/WEuZ8HEVzZBnK1yT2BGidHM8m1wFKA+b+Myb4F/XIJCCmJ fD52myp9YCG2tJZcIBAnc2BbZ1Wwn9fQzqMOZyZAua7+H4rghR1aydjafn7B+3f9dqXM JAwdW0J3BXqBh1StEFFeSSbwfrOYyLu2j0V1mLrbv9T9zGqDf1+m4JRapQwaQF5lMyNO TkkYbgt9B+j4MMi5b5gJNKs0vrm8TXM7+koZv/xxMEO10JHYm3lXSfXhscLzcsrKdgad jJxviNBMEc7282Eliq7lbvm6cnQ8HIp9m4Oz1SORFoGG0sx1lgI3NQzIcyQyRwlfyfGs PnZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eBm9ZhKp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 46-v6si6373500qvx.127.2018.05.31.15.51.59 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 31 May 2018 15:51:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eBm9ZhKp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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 ([::1]:46504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOWQJ-0006Od-5I for patch@linaro.org; Thu, 31 May 2018 18:51:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOWNi-00056I-E6 for qemu-devel@nongnu.org; Thu, 31 May 2018 18:49:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOWNf-0000jP-A1 for qemu-devel@nongnu.org; Thu, 31 May 2018 18:49:18 -0400 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:32867) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOWNf-0000iX-3h for qemu-devel@nongnu.org; Thu, 31 May 2018 18:49:15 -0400 Received: by mail-pf0-x241.google.com with SMTP id a20-v6so11499441pfo.0 for ; Thu, 31 May 2018 15:49:14 -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=EN99SEWaAEsntJnr0Z04z4mMKr+q1uPyp/nnjA+I798=; b=eBm9ZhKp4AUb+NO13KnXhBPh5rpZaTBNVLgpXcSebSoVKBZr1/Hrl9G32H/nTvdfIh nTBRAb/jQpbZvApzKf3EfmFNv67zJASCzQhwSoPDNpYR5Igvpz5sQ37owbu/UmUT/NUj BkL/pwAqVvG5wsnN8q7rtXZB3X+Z4Mt5UHuc4= 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=EN99SEWaAEsntJnr0Z04z4mMKr+q1uPyp/nnjA+I798=; b=CXkl+rsvNNXn9sSGXenbzFVkOdgvWtSyWGmrh66fNceKP3EryfHWhh2g48dmEWsS1b X8yxzsTwWmhu2FeqIu9JMUbvjAO+Hg8YG4h0su2AqK9epVi/9uGNQEazo3N1NTRucY0E 51RtAgsKbmYQAzL0p6Hwuxf2yl7ENQ94r/IoZtb9bUoXrB0IM+aEiGQE5NtQLD2qoDWv RAV/n7nhTnu1sUsvim5Z0SDeveAyUYV+jqA1GPAqiGzudxd+GGiCHPeHyXw9p03oZpxm LXp6LmGsZB4YeoM9kt+5mPJEWIpklkL6Jvp6o2wML0EfH+g7lBkhiMZfmgZadx2E4txg 1sag== X-Gm-Message-State: ALKqPwewhTJJtVdiJ2fp6q9DrLREYCGIJwcgFc1JrTjYtV0k7pDZv3oh wIw9SFDhfvEOZVDIsgTjAmX9NWe2Zno= X-Received: by 2002:a63:42c6:: with SMTP id p189-v6mr7043130pga.48.1527806953385; Thu, 31 May 2018 15:49:13 -0700 (PDT) Received: from cloudburst.twiddle.net (97-126-112-211.tukw.qwest.net. [97.126.112.211]) by smtp.gmail.com with ESMTPSA id t3-v6sm33385584pgs.91.2018.05.31.15.49.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 May 2018 15:49:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 31 May 2018 15:49:05 -0700 Message-Id: <20180531224911.23725-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::241 Subject: [Qemu-devel] [PATCH v5 0/6] linux-user: Reorg interp_prefix handling 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" Changes since v4 (2018-01-28) * Protect host fds from guest manipulation. * Rename the interp_dirfd macro to TRY_INTERP_FD * Add TRY_INTERP_PATH for acct, statfs, inotify_add_watch Changes since v3 (2017-12-29) * Use DO/WHILE as the control construct; wrap it in a macro. * Introduce linux_user_path to handle the cases *at syscalls do not cover. Changes since v2 (2017-12-04) * Use IF as the control construct instead of SWITCH. Changes since v1 (2016-11-??) * Require interp_dirfd set before trying the *at path. r~ Richard Henderson (6): gdbstub: Return the fd from gdbserver_start linux-user: Add host_fds and manipulators linux-user: Check is_hostfd in do_syscall linux-user: Check contains_hostfd in select syscalls linux-user: Check is_hostfd in mmap syscalls linux-user: Use *at functions to implement interp_prefix linux-user/qemu.h | 67 ++++++ gdbstub.c | 5 +- linux-user/elfload.c | 5 +- linux-user/main.c | 53 ++++- linux-user/syscall.c | 485 ++++++++++++++++++++++++++++++++++++------- 5 files changed, 532 insertions(+), 83 deletions(-) -- 2.17.0