Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp170612ybe; Sun, 1 Sep 2019 22:54:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwko+tOT6zWodwielPrYOe0f1h7atuz4ZD6Ak7VMPtDj4JmprA6CxG6w4I0hzs4bsRzADDt X-Received: by 2002:a63:211c:: with SMTP id h28mr23608520pgh.438.1567403642808; Sun, 01 Sep 2019 22:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567403642; cv=none; d=google.com; s=arc-20160816; b=HtbV2kcgD8p8IyjHUujzqghOy6lB7khMVxGfuBet54ZirMoRNqWCL50FL9+TSN6QgX YpkffKTuAiXm6Ix8n0ECzlbed2puJMMzAzlsvNUjGzdCn90WQcClDpMO2Od2dj2Ecuqs +j9J5Pf1qdvMiyNSnseZI620pV14U8lNedHzkIltpK7quZvLFDR8HyiG0bBb5YQ4LXAm vKoDbWGtSX289Hvr5ENeAtEJWYGEgSzHPRMUWtRMgGHUSaJimBTpRHe4zI8XurIo4mF/ b4fQ1dQ6GjQQ9obJry5FgVaDJqBylJjTzYxS9V2Ueq1P/MZxtZ4/AZ4MrTzjj8SjJaWB ahWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Z58eVuEhvJ82QOAWafCqI+/R649dkqBlqRhUtubvkNc=; b=HIJOqnHqiiSNCsw4HbKr+XmMh03LDE9Bqk2q5uK1dwmO2X2vV6z1A9/Yhc2xvNOR1t lkP0/hrE6TxRrmY9TUH87SOcZoiET2CyX0XgNuV1xyFuQgAKmoeDgABMpRXtZKjPDpGi eNRns/KALwDYLpfVYB3l2kZlDWIX6NgDVagY0yBO7a94xgduKv++DfR+khDBOibdsjGq ULNj7FjR65XnSlaGENTPff/giD/XADV483nm7QXzzd1f4skCbQdq01EKZYyWa38Crj/F qMKvcscXvwGVng3CFqxcUf04vwUKoCpKGsBZINslQone5y/YqROlkj8bgByvBOElS86l bkBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g13si11289998plq.359.2019.09.01.22.53.48; Sun, 01 Sep 2019 22:54:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729371AbfIBFTX (ORCPT + 99 others); Mon, 2 Sep 2019 01:19:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52120 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725839AbfIBFTX (ORCPT ); Mon, 2 Sep 2019 01:19:23 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ECA72C058CA4; Mon, 2 Sep 2019 05:19:22 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-95.ams2.redhat.com [10.36.116.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D46660127; Mon, 2 Sep 2019 05:19:22 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C51B316E08; Mon, 2 Sep 2019 07:19:21 +0200 (CEST) Date: Mon, 2 Sep 2019 07:19:21 +0200 From: Gerd Hoffmann To: Chia-I Wu Cc: David Riley , David Airlie , open list , ML dri-devel , Gurchetan Singh , =?utf-8?B?U3TDqXBoYW5l?= Marchesin , "open list:VIRTIO CORE, NET AND BLOCK DRIVERS" Subject: Re: [PATCH] drm/virtio: Use vmalloc for command buffer allocations. Message-ID: <20190902051921.nczclnaqcmxlh7bz@sirius.home.kraxel.org> References: <20190829212417.257397-1-davidriley@chromium.org> <20190830060857.tzrzgoi2hrmchdi5@sirius.home.kraxel.org> <20190830111605.twzssycagmjhfa45@sirius.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 02 Sep 2019 05:19:23 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Completely different approach: use get_user_pages() and don't copy the > > execbuffer at all. > It would be really nice if execbuffer does not copy. > > The user space owns the buffer and may overwrite the contents > immediately after the ioctl. Oh, right. The exec ioctl doesn't block. So this doesn't work (breaks userspace abi). Scratch the idea then. > We also need a flag to indicate that the > ownership of the buffer is transferred to the kernel. Yes, with an additional flag for the changed behavior it could work. cheers, Gerd