Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2968623pxb; Fri, 12 Feb 2021 06:13:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiWRmbA5Jj/Hq6PTpn1KTJxIhOhREkxhyqmRyQznj6u/ZGxcVf+GwzyoX4h3Jz61qPE3RP X-Received: by 2002:a05:6512:104e:: with SMTP id c14mr1697991lfb.481.1613139201705; Fri, 12 Feb 2021 06:13:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613139201; cv=none; d=google.com; s=arc-20160816; b=jIJ/cajoxph/2mTCVklvaJECrUvi9ZDhv4FokyzlwzYO2CiUA1lK5t1FcfP3SYtM7O dtn5eryN7SZeUheR5IJoLGLLEaw9xIKfevTpCGoV1xTZdBT4tSu0HyB63Nd1dsys0eew 2uPH0EMgtoD961y4fPVHe2xKcdFS4qavHLXWTMgLjdfKEu8Xdb28ISLZZ7yKACi/Hp7x 0P+mSG+8pwhuGt3uUIADkOuiao/hvecaYPKkcz7lfx+8CvGEzau1/ut5Tgt4ESUxJOUe LSINQkauUPK9RMAWGULaBGwOChGoSdwlE84w73qtOhQZQyZ/b5UR9oJARUx0suSlemaA EqOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=mGUEM8BkIgjUi3SKnHZuM7SaerLEeBlJ+h2BpANQXuQ=; b=AxT3hlCMqMuU85OUQIQwuEB/pWYUZRbbt7uUuLeLMYBwESNe0jKt3kmtmJnAkhPCTs 6C7Im2XKwCxacGXFgl5nCgNfCUshFFiMFR4azrViJ26XyZ2FrROEP/JMvmsUWHHdApyL PXOKtSnykYZ/DISMDGA65VmU6h2wMAau3cQR4y1sAdht2P90KZIjE9NDelU3Nq23AVww GsHHIHRPDUg6k4TrLdtKDJbeCshruOZI9osHy6usD7EvITZDvSnmuByv8yEHqSkT6X9A P16avqzJxzgbSouuFf78ifnniiS3WGRALW3xYyxiED37Jt5YpkyXbmURzCmxL5nUk4xI 6KgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tT++vyIC; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cc10si6788299edb.153.2021.02.12.06.12.58; Fri, 12 Feb 2021 06:13:21 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tT++vyIC; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231667AbhBLOKN (ORCPT + 99 others); Fri, 12 Feb 2021 09:10:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229940AbhBLOKD (ORCPT ); Fri, 12 Feb 2021 09:10:03 -0500 Received: from mail-vs1-xe33.google.com (mail-vs1-xe33.google.com [IPv6:2607:f8b0:4864:20::e33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5B8AC061574; Fri, 12 Feb 2021 06:09:23 -0800 (PST) Received: by mail-vs1-xe33.google.com with SMTP id 68so3347774vsk.11; Fri, 12 Feb 2021 06:09:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=mGUEM8BkIgjUi3SKnHZuM7SaerLEeBlJ+h2BpANQXuQ=; b=tT++vyICTpA35K1XTNsUAg+swzDOMB9wHNUBqMN0s40RY7O6i+dGqR757jXFkttcG8 Nh3EsNsBSyRUMLlsbSECySlXLkNgYWSlvl0P0i3hCBGnO8OP5H6ICL8QNHYB0Y08liJX stuXqWRcrGM5zfJ0jig3Aw3fyKY0MFmNs7Rg8V05ezn0VpRVpdm0scb9ZH0vwi7TkZ0e 4eXJKfHz/a86PfrgJKI2GcpIGd0NhKzw2GuyGcsvJIOVY1iH7tO7srgw7mlXCstFyoJi 1KDntNsVs3l2Ven6KMZSBbLmzR0e2YAwYszVUZE4qZT5g/qBrB9KhfCnX1OOxQQFC0ac 4T3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=mGUEM8BkIgjUi3SKnHZuM7SaerLEeBlJ+h2BpANQXuQ=; b=qTK5MdKnzo38qFA740Ym4MvQxxsg88A4M59eSLaXElIMljPVITOTWrlxX6sixmhOWH 4wHaJSEHVLJd7ZwuLkBeAZDsQKrYetP9izfYmS46TYzXPFMmrYVjkWpfR4FbKn73YM4W K2eMibT8ZeTA13xpBRp3bVSgBjpPxLnhzrC9FZco/0wMlNWdQbFgPRAATHSldIb9cavs D7OJdiBG7XZ0SJrlN++fmnxCCJhbAImh2z8rCNihjR0R2luxH3TVP77G9/CO2Vb4mjM0 SVIr+/Gya3sohsWuF/0rrpv6Etc8CgU/DnsnKd6lzUmpghePhO3QZLIjUawXknVhemeq ZREw== X-Gm-Message-State: AOAM53219V72TKMegK08Y8USFYQ43twuxsJcA8TD1XOYpANSi8JGtJVg xoXlDE64zGZVB648ecAD9bwIZuOPIpQPYEm6uD0= X-Received: by 2002:a67:cd18:: with SMTP id u24mr1342241vsl.19.1613138962980; Fri, 12 Feb 2021 06:09:22 -0800 (PST) MIME-Version: 1.0 References: <20210205163752.11932-1-chris@chris-wilson.co.uk> <20210205220012.1983-1-chris@chris-wilson.co.uk> <3a2316b6-27a9-d56a-b488-ac15a402a0d2@daenzer.net> In-Reply-To: <3a2316b6-27a9-d56a-b488-ac15a402a0d2@daenzer.net> From: Emil Velikov Date: Fri, 12 Feb 2021 14:09:11 +0000 Message-ID: Subject: Re: [PATCH v3] kcmp: Support selection of SYS_kcmp without CHECKPOINT_RESTORE To: =?UTF-8?Q?Michel_D=C3=A4nzer?= Cc: Chris Wilson , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 12 Feb 2021 at 14:01, Michel D=C3=A4nzer wrote= : > > On 2021-02-12 1:57 p.m., Emil Velikov wrote: > > On Fri, 5 Feb 2021 at 22:01, Chris Wilson wr= ote: > >> > >> 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. devi= ce > >> 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. :) > Much appreciated. I might have been "slightly" off - pardon for the noise o= / -Emil