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: 923660 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="eBm9ZhKp"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40xjMt20bMz9s1B for ; Fri, 1 Jun 2018 08:50:02 +1000 (AEST) Received: from localhost ([::1]:46495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOWON-00059n-UH for incoming@patchwork.ozlabs.org; Thu, 31 May 2018 18:50:00 -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-Google-Smtp-Source: ADUXVKLaqdt5sj5pQRNyzbzJYO10ywNCwhgWoAlyTXDf1KftVmaDQfiHIGNpkBxvrQEWyZ+Htjos1g== 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+incoming=patchwork.ozlabs.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(-)