Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2961084pxb; Fri, 12 Feb 2021 06:05:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJyCIMptFzw5CHi4fqRL30it1W3w4fm3j5AJHX4UMEzKf25zk4o3J2GhD5GRXs2RQp8pBPt8 X-Received: by 2002:a17:906:364e:: with SMTP id r14mr3272498ejb.266.1613138701983; Fri, 12 Feb 2021 06:05:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613138701; cv=none; d=google.com; s=arc-20160816; b=xnw3Xkl5R4A05F9MUI/Z5thlqQkYlvmC5ytDnBIICHoZWLWjZWTAUajF4Hfrhvyj0W j0O0u1VuFlHrKMnlh2iXUiaoEId/3By8DMqCJ3PCwg5YWV3V5Aj3E8tQ6fvhYokKnIF7 Da0siSs9C4c0W8AtVh/VOBF3QdeyUR4NKu17WLVNIDL1Pl8PkSPmRc2JrNnBNAZ0zGZ+ s4DQ6l7xjB45SAWU8Zk/Z/SJBqsyaGDi278JeBpWTwvgsE79DF7lydNSHNJEVtFqJen1 sLjpDdqVkRlISGdw85AOOf4CNTtVLDk+wBTBt/HzRgAXoFF6e2jV/lG3DfhA5Api/o6m piSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:cc:to; bh=tAaIfB/PTS2hf0O3hJYnD8t9zEklEtpAHatNW6ergQg=; b=FiMXNs1s0wtx8s2y05Go1CI5km/8ZecWE1mJxXF37f0HFj3WqKPaYwWzUpnt33UmWE pm+yT6hFP5ZfqPJj28k/wfXaueD6674W+QuhnI3Ec4CRIQS6VsSaCY5mGZIR2Dsznm8u vumGrsNXb+FOW+tF4mVLq3me8H8WoComgNsIqevlavQspvTy+3NPvwFCSG1/3CeluJ1s kXEYMBa1vTQZIKQjDAQJcUpdmHqJ9KUx7bJ4VJy7aB+yEEgRQg7ys7D/bgXM1UUUXTiv YClVjtl5rkgeVz7xAXrhll9+U3a+3YMJBduPdxiPGxyJa8UJS/omUDOcPZGNX1Q+apaU SigA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb8si7613403edb.535.2021.02.12.06.04.38; Fri, 12 Feb 2021 06:05:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230356AbhBLOCU (ORCPT + 99 others); Fri, 12 Feb 2021 09:02:20 -0500 Received: from mail.netline.ch ([148.251.143.178]:35277 "EHLO netline-mail3.netline.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230493AbhBLOCF (ORCPT ); Fri, 12 Feb 2021 09:02:05 -0500 Received: from localhost (localhost [127.0.0.1]) by netline-mail3.netline.ch (Postfix) with ESMTP id 4FFAD2A6045; Fri, 12 Feb 2021 15:01:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at netline-mail3.netline.ch Received: from netline-mail3.netline.ch ([127.0.0.1]) by localhost (netline-mail3.netline.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vkV0bfZJWGJB; Fri, 12 Feb 2021 15:01:23 +0100 (CET) Received: from thor (24.99.2.85.dynamic.wline.res.cust.swisscom.ch [85.2.99.24]) by netline-mail3.netline.ch (Postfix) with ESMTPSA id 622122A6042; Fri, 12 Feb 2021 15:01:21 +0100 (CET) Received: from [::1] by thor with esmtp (Exim 4.94) (envelope-from ) id 1lAZ0b-000BpT-Bs; Fri, 12 Feb 2021 15:01:21 +0100 To: Emil Velikov , Chris Wilson Cc: Will Drewry , Kees Cook , Daniel Vetter , Intel Graphics Development , Rasmus Villemoes , "Linux-Kernel@Vger. Kernel. Org" , ML dri-devel , Andy Lutomirski , Cyrill Gorcunov , "# 3.13+" , Andrew Morton References: <20210205163752.11932-1-chris@chris-wilson.co.uk> <20210205220012.1983-1-chris@chris-wilson.co.uk> From: =?UTF-8?Q?Michel_D=c3=a4nzer?= Subject: Re: [PATCH v3] kcmp: Support selection of SYS_kcmp without CHECKPOINT_RESTORE Message-ID: <3a2316b6-27a9-d56a-b488-ac15a402a0d2@daenzer.net> Date: Fri, 12 Feb 2021 15:01:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-CA Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-02-12 1:57 p.m., Emil Velikov wrote: > On Fri, 5 Feb 2021 at 22:01, Chris Wilson wrote: >> >> Userspace has discovered the functionality offered by SYS_kcmp and has >> started to depend upon it. In particular, Mesa uses SYS_kcmp for >> os_same_file_description() in order to identify when two fd (e.g. device >> or dmabuf) > > As you rightfully point out, SYS_kcmp is a bit of a two edged sword. > While you mention the CONFIG issue, there is also a portability aspect > (mesa runs on more than just linux) and as well as sandbox filtering > of the extra syscall. > > Last time I looked, the latter was still an issue and mesa was using > SYS_kcmp to compare device node fds. > A far shorter and more portable solution is possible, so let me > prepare a Mesa patch. Make sure to read my comments on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6881 first. :) -- Earthling Michel Dänzer | https://redhat.com Libre software enthusiast | Mesa and X developer