Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1880892lqe; Tue, 9 Apr 2024 03:21:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVtuqThN51jtSpmPsIQrwgqxJ3fheydl04qLXlZ4NRi+Ac1WQw2Yo3iLI7svRb5vVLBMmPDet1+DpY5YOmfNwgIKhIeCRNHTuf4GztlbQ== X-Google-Smtp-Source: AGHT+IFNa5w7vygVbn2ksT6u6O1Spg6AXvdInU+m7GPj8jbUiuRTm1lBJCuX7yRSnAjKg39C/Yyk X-Received: by 2002:a19:690a:0:b0:516:d232:2516 with SMTP id e10-20020a19690a000000b00516d2322516mr9824748lfc.6.1712658065818; Tue, 09 Apr 2024 03:21:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712658065; cv=pass; d=google.com; s=arc-20160816; b=fBY08BcO9zKCV/Tl+HXFrGmfkdMfVdoGnsuc19MF577LDqufPGapuvi5MkwjCDKt3V C7B/nnePnZQNmFNV/xnVcH7ORCGpaI0X6GdofmchlIsz5nnzjgLG89be/ppcqx3Ul5Eg VDilSqpPngP+aPLOIXx0UenxvNfuBSSBA50IALu9e7GfeYBNPfgP6m1LvnB9CNKX4Yby KUA8uNWZMCjZcFkbLpilasnrWBKTaZ+FyHT8Dej3gtwPaOiSrzt9S4JP15NHhsntqhoV wYVsEUYiaqUmB88tNQ9GPHi80kD1TxacPjXzgU13UCDRi+ZaRvCYb6n1SnJVwCEjySwC 11Tw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:organization:in-reply-to:subject:cc:to :from:dkim-signature; bh=LBg414OVGMyuVXVMxP6UzHuR/yCDQuAaE2S/KFF6+og=; fh=lw7UGu09eaYOzR8EGKhBbtdO6K9gLRANQbM/RT8IQHw=; b=BQbvLX5W3W2CO10Q8JIRzc/Kpn4af6DBqbWsVE1fB8eWI8QQpFDuOsCt1Ljm6SSKjK 2ZXKavgjEI5cBmL7zTDXD5Htfza/xuBIss1GyN6hN4y+WnV2/8OGKvI+gYdgijrUXBfQ chjDta7oRNGxD+LabxUwSwYtqYsdYXl81EzForJqLq+IMd2RPZ7jIHstfoyamAvtF3ef bpr5SaQZpKKElVF8TA5Gcz/krXXbIn6llptQydBg32EuHTuFtj/B2eR/ywCztY9m/z6u qnNGpCcJ0q0KxGieB/EvknqJ9htoTeqOQUXOK68azpTlYlHOjF0HYEYcCOOFHlA+0www 7Y8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=I5AQpQ5k; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-136660-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136660-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id kx17-20020a170907775100b00a45ab47d3fasi4499201ejc.75.2024.04.09.03.21.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 03:21:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136660-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=I5AQpQ5k; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-136660-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136660-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 85E901F217A5 for ; Tue, 9 Apr 2024 10:21:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A7A8131180; Tue, 9 Apr 2024 10:14:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="I5AQpQ5k" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E82B4134416; Tue, 9 Apr 2024 10:14:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712657660; cv=none; b=hgLe6868jtVlJDbTnXqntMIdURIdwbdoxc0QgMBYpOgkgqLLXXX/H/ghFf09+3y0wo7A38hW9Fo6H4No0KNvTaA82uHKmYrUQbNUBi06drWjAk1HQ8Nxj4rx15T2JF1VnG/ZTQljBc32UMvtPLaG4Mxt1ljQRycGxIcszKyF8Cc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712657660; c=relaxed/simple; bh=/HdsMnAppID2c/T4mP9olHUzTPjv3yVarzfCvUZ29fg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=u6BRQYGhJbj7Em1aSfQhp6+v5469lFahbP3kTHv38W37EnhdcohqwGzVePb1wSBIKydygWkSAYNyiURbZKy8plk5qJcfIArQrMgTn2qcUBYQIXyVq7Ge09Ll6bqTPZeQx3rqC9JZdklLi8B70HwzWZJPZumUNEvCEZRatonE8f0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=I5AQpQ5k; arc=none smtp.client-ip=192.198.163.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712657658; x=1744193658; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=/HdsMnAppID2c/T4mP9olHUzTPjv3yVarzfCvUZ29fg=; b=I5AQpQ5koz4IMx09Emdru1FfHW6sOe9OgDS7XKmjFyJPH6zDZOunrLbc ezbmtxeyyPJp3I28YSfbMD9GPcf3Q/VCmbEwWle773LHHb9RhzUsg6TVN 0lCke7lzMf55Khq9oiKeMhsTMUgStLOawQ4X423LbaTNybqUFOgA5zKTv pXsx//Zc0NUE9OAq6qOjchalJv2SvXALyCRllIW7aLZA3cO4dRCzodqTG +0rbz3DBtujYbkqIJITmsNbg2/EoGdo96wFezmQNaBKak2H1SZ5Zq91Nv wX6sL0pHLg1sVawt5kbX7ehJYck7/zW2mkTfGtQgtMvcp9Czt9spQDGXX Q==; X-CSE-ConnectionGUID: Z3Drv98YT6iP1WvZtHyPFw== X-CSE-MsgGUID: CAp3ioGRRKW+Is6znYeMBQ== X-IronPort-AV: E=McAfee;i="6600,9927,11038"; a="8193955" X-IronPort-AV: E=Sophos;i="6.07,189,1708416000"; d="scan'208";a="8193955" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2024 03:14:17 -0700 X-CSE-ConnectionGUID: h6vK66UbSkiXc+RIBnnazw== X-CSE-MsgGUID: NfhpuIMUS02Pkod9R4umgA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,189,1708416000"; d="scan'208";a="51180842" Received: from mserban-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.59.228]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2024 03:14:11 -0700 From: Jani Nikula To: Ingo Molnar Cc: Namhyung Kim , Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang , Jiri Olsa , Adrian Hunter , Peter Zijlstra , LKML , linux-perf-users@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org Subject: Re: [PATCH 1/9] tools/include: Sync uapi/drm/i915_drm.h with the kernel sources In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20240408185520.1550865-1-namhyung@kernel.org> <20240408185520.1550865-2-namhyung@kernel.org> <874jcb9etk.fsf@intel.com> Date: Tue, 09 Apr 2024 13:14:09 +0300 Message-ID: <87pluy972m.fsf@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Tue, 09 Apr 2024, Ingo Molnar wrote: > * Jani Nikula wrote: > >> On Mon, 08 Apr 2024, Namhyung Kim wrote: >> > To pick up changes from: >> > >> > b112364867499 ("drm/i915: Add GuC submission interface version query") >> > 5cf0fbf763741 ("drm/i915: Add some boring kerneldoc") >> > >> > This should be used to beautify DRM syscall arguments and it addresses >> > these tools/perf build warnings: >> > >> > Warning: Kernel ABI header differences: >> > diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h >> >> All these years and I never realized there are header copies >> there. But... why copies? > > It's better than all the alternatives we tried so far: > > - Symbolic links and direct #includes: this was the original approach but > was pushed back on from the kernel side, when tooling modified the > headers and broke them accidentally for kernel builds. > > - Duplicate self-defined ABI headers like glibc: double the maintenance > burden, double the chance for mistakes, plus there's no tech-driven > notification mechanism to look at new kernel side changes. > > What we are doing now is a third option: > > - A software-enforced copy-on-write mechanism of kernel headers to > tooling, driven by non-fatal warnings on the tooling side build when > kernel headers get modified: > > Warning: Kernel ABI header differences: > diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h > diff -u tools/include/uapi/linux/fs.h include/uapi/linux/fs.h > diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h > ... > > The tooling policy is to always pick up the kernel side headers as-is, > and integate them into the tooling build. The warnings above serve as a > notification to tooling maintainers that there's changes on the kernel > side. > > We've been using this for many years now, and it might seem hacky, but > works surprisingly well. > > Does this make sense to you? Yes, although there are probably pieces of the puzzle I'm missing. Thanks for the explanation! (That might work almost as-is copied to tools/include/uapi/README. ;) It's also kind of funny to find this kind of back alleys of the kernel repo I've never wandered to before. BR, Jani. -- Jani Nikula, Intel