Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2926352pxb; Fri, 12 Feb 2021 05:13:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDN524i4ek0pai9CHcPnDaWvgKcw4A5w1tS5hxDnfH8ZCvEjUmAuRXCqz27seP7UDzgpWs X-Received: by 2002:a05:6402:104e:: with SMTP id e14mr3351263edu.316.1613135634282; Fri, 12 Feb 2021 05:13:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613135634; cv=none; d=google.com; s=arc-20160816; b=0f/CKsy9z9mxPUPiIJWreG+kNYMGovO7ElcuexsrbmLCDQxSumaAD4gee6Qvc7I/n1 t0IpS1BdPo24VTZlL9CYj565rc2lCSZcQAYdlsdKnXctbHlaG1YZH5koTr9dM2Ou/86r plX9/FZnpWZkB6Z3bUAS+C9coPSYzpN/aJq7G29GORl6pz1IKXffsBB/OjNZtVm+jjTC YFRUXTVY/L6+mn4UFf07x9U+g/VpMOkXJfpeR4aFJi4pbKPesyCqub09bxcAJirDeneM mSNx0olMiupJDX0oQET6WSIvoCPwof1DfwSf1KY0Wka4bHsUbntCjuOshh7PvvEIdjIS eAPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=z12PhhCoyKbGlotTE60lQTToSx/Gs5QgkUPZavQ8JyM=; b=A6BvMRTePE6XwE4u6x4bDymh5UGePq/gGSpT7sq0dSf0y0N9v3H6F36IM3jMhXjyzy sk+5VbW9sXkmPEyRq8lbz3DI+IEOYxrZEwsWafTzcF7SWhFIYBjn/CZQ7MBoPMLY9dCp R6xhaFCp1DKp0/FdyG4fl1JkkDOTDMFDxlkZyFpJ7rn6fypvD7ywDnE2vafyoftyQq+Y QmJIWm2mvREik1SERMxFwboj+75o0y3CAb8oNLR1Zuu7yT2OBlEwI3y1FHjCJn5cqFoP sBAf2zqpvzRHfeu67ZTNvlmfPouQ9pXFJdUzyH1Bao2xAfJApCWy/XEGMk2KnifRmp+T VetQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WakuNUrL; 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 v21si5809839edx.549.2021.02.12.05.13.31; Fri, 12 Feb 2021 05:13:54 -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=WakuNUrL; 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 S232168AbhBLNMx (ORCPT + 99 others); Fri, 12 Feb 2021 08:12:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230336AbhBLM6w (ORCPT ); Fri, 12 Feb 2021 07:58:52 -0500 Received: from mail-vs1-xe2c.google.com (mail-vs1-xe2c.google.com [IPv6:2607:f8b0:4864:20::e2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59BC7C061574; Fri, 12 Feb 2021 04:58:11 -0800 (PST) Received: by mail-vs1-xe2c.google.com with SMTP id a11so4007045vsm.7; Fri, 12 Feb 2021 04:58:11 -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; bh=z12PhhCoyKbGlotTE60lQTToSx/Gs5QgkUPZavQ8JyM=; b=WakuNUrLlqX3/pBx8Z5QWInFd2yPiItuIQv0HfK2RuT6FZ9GV1Q9EesYKehz/9zq1u 0i0yYGb1RCCwH546iOAiodn/t4q/0NkGapIQt7gnyZh02Ne55TgDkxsWlqq8CTP7s3wH Y1jKc3TFbigc+4YZ9EuPwZDO+NA9XsJ7bGDB+lz/vBkm0pXIPcY5J7i4FOEyC/4aSRmX tYDbM+tQZ42kmiykaxMwTzg/KXgn7XJJ/gCtC/pIJNDopm9nxhKRUNxIdar8a595ou4B MCpj3dHuI7QKp0t2WwOnEJOhQQKGIatIobHB8tUp4ZBC2f4x43D+9V/LSZOVcB1b51Qn Y6Kw== 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; bh=z12PhhCoyKbGlotTE60lQTToSx/Gs5QgkUPZavQ8JyM=; b=EA55BL0ahihrfWwwxdoUSQfvjoIFjf3K5haMD6F3OKQjawyguqV7TuGmK/89WfM4JX bgFPI4dKavm0JSY9z30TrcfII7151ZpQpadfWF3O9NkfWlTW5vOuHwS+Awzw7jh0yBxy Ob4B9WHIgdbcMVWjHG8z5ZXPWRL6ctShflPPQ5I7MaGpC9SN4PA2DFXA/cnle5Rx7ybj 13Pn/NVv3RAxJRgTxPOvbNfGZZhATenylpf6ywe2phGJxDGqGLCBmxlEijqZhSRyN9RE k6zGFcczyEV3UJTA0ujIB9G2TGi959Aeg+2rseCCAKA0DXWdM5h9Li0vmMIbKcxoEN+g X4lw== X-Gm-Message-State: AOAM533NBZUzLjvBfdYWzZUKchtA9TDhdK1dam2VDxXVNfTndZdooyX3 VHW0uY8sBbllhv73d2ikN6cI/BUuHg9o8hruhaM= X-Received: by 2002:a67:882:: with SMTP id 124mr998667vsi.33.1613134690545; Fri, 12 Feb 2021 04:58:10 -0800 (PST) MIME-Version: 1.0 References: <20210205163752.11932-1-chris@chris-wilson.co.uk> <20210205220012.1983-1-chris@chris-wilson.co.uk> In-Reply-To: <20210205220012.1983-1-chris@chris-wilson.co.uk> From: Emil Velikov Date: Fri, 12 Feb 2021 12:57:59 +0000 Message-ID: Subject: Re: [PATCH v3] kcmp: Support selection of SYS_kcmp without CHECKPOINT_RESTORE To: Chris Wilson Cc: "Linux-Kernel@Vger. Kernel. Org" , Will Drewry , Kees Cook , Daniel Vetter , Intel Graphics Development , Rasmus Villemoes , ML dri-devel , Andy Lutomirski , Cyrill Gorcunov , "# 3.13+" , Andrew Morton Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -Emil