From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08040C433DB for ; Fri, 12 Feb 2021 14:02:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D238560C41 for ; Fri, 12 Feb 2021 14:02:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231571AbhBLOCY (ORCPT ); Fri, 12 Feb 2021 09:02:24 -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