Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3910771rwl; Mon, 10 Apr 2023 03:10:47 -0700 (PDT) X-Google-Smtp-Source: AKy350a0QJbwXG4XHBT4x6nHfwl7RP6AnDw9RGu3JjfenD2akDi//TdJDbDGEwJSnVsU9sTlZsCz X-Received: by 2002:a05:6a20:bca4:b0:de:4f40:e226 with SMTP id fx36-20020a056a20bca400b000de4f40e226mr10794003pzb.52.1681121447162; Mon, 10 Apr 2023 03:10:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681121447; cv=none; d=google.com; s=arc-20160816; b=x59BAwHfxwNEggFtCs7sx2V0qNBESERYv/01kagEZU7ThM+h5BMiPjAX+nsBQttsS8 UFSDI/cwfqwk1JZTBsbAbsSe+2z6w/VBJIDxMl0pR3tW1gn7leKYtfq2rC5iX6pBqYcE WPdrgSortiTBciDVJjWANbguZ51KoiZq5MVU8vjXc1ZCNk/U7DlHITN7Z11lQ6h0qXyg AsF72qHm/cQP0+5scE2WqaduKSmXTXgV5fkFyxN/TsrPU5bJtsDK4kyYuG84KLZGNrln gDrhK6uKj1X2v+FRwymcct7izIhvM0knOVnWG/ehxGI9ZL02cu7EsAXewMs15vntVtZz JejA== 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=8nBOSeW51PsFuuPmlmdNAKwz5M9/oBcX1o+Y5ag9IyA=; b=CVReujAKSEiJ2MWU71M8212kN8Eu9LRX5b8k9j99O2XNyExPBRrQWmrSLg1w3hV+sd ulRnoHNlIPZqnNaVVIbz5qMt6ZZJF5Za2GsrxPbgqeEX1wtcjKTgAezd+Cxewk6YiKGA /G5WKUQRI06r2peQ6CTMk/Fi4yZWOuwtXR3dXu8R6doc+TEdkQexglejpVbfzTQ6130g RDzdVkFybszuodqGY58gF3cU/h6NG1AvUZg4DK8R4rsGXzVJQHNhJ9QDDYj6b3Uf46/o XlrzRrSZuzzaVSzWa5tnogDveFXhYiPxU311lwEhkRBrqVBdDnEurmLa+/htS62TYlBh i17w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BXKaFHIa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g184-20020a636bc1000000b004fbb1ffaf6dsi10507559pgc.448.2023.04.10.03.10.35; Mon, 10 Apr 2023 03:10:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BXKaFHIa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229836AbjDJKDr (ORCPT + 99 others); Mon, 10 Apr 2023 06:03:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229828AbjDJKDq (ORCPT ); Mon, 10 Apr 2023 06:03:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9344D3580; Mon, 10 Apr 2023 03:03:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2E94C61198; Mon, 10 Apr 2023 10:03:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DE77C4339B; Mon, 10 Apr 2023 10:03:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681121022; bh=X6mFdrcKBloByjl+W+HqhTL0wxXMHJsugPyYCIhiCuQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=BXKaFHIauq0W0rEqTd0dU4B313rWlL/ab5aUxj23oPqxYYDxfeD8UdorVlEHCgN52 kY+L6h0Of+F/fSfFeCPKA5o23nc0M0RScNtORjnXoU4hw2Q3pmujZzviQI1yhWdEdJ UvYxTe9oZTIwQiQGFIeDiYl05ptRMeHeEo158Y/aHy62emMgLNxD/hd1cgB2dDKLCn HtHLZM019uiDOliPMHCrzctOyC69cc+Z3yMqCUhpbgY1W83YkY/0vopNeoPVt7urqO D4qW+N5iXcExVXt48enOYupVy8QYw7FRkIEM1rMl4ng2UIVANDqska3oAPKISMLp2h 6QiWs+HApLPag== Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-1842e8a8825so5317354fac.13; Mon, 10 Apr 2023 03:03:42 -0700 (PDT) X-Gm-Message-State: AAQBX9dk+LdZK4izVP217e8q+qo2HYfpxyLYLYRoGDu3ow2BDbGFtWA7 vqw14hqGW/0w5EAXESQyDYefIQweaSAcg8Ncotw= X-Received: by 2002:a05:6870:5594:b0:17f:f1f4:b006 with SMTP id n20-20020a056870559400b0017ff1f4b006mr4967756oao.11.1681121021823; Mon, 10 Apr 2023 03:03:41 -0700 (PDT) MIME-Version: 1.0 References: <20230407203456.27141-1-quic_johmoo@quicinc.com> <20230407203456.27141-2-quic_johmoo@quicinc.com> In-Reply-To: <20230407203456.27141-2-quic_johmoo@quicinc.com> From: Masahiro Yamada Date: Mon, 10 Apr 2023 19:03:05 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 1/2] check-uapi: Introduce check-uapi.sh To: John Moon Cc: Nathan Chancellor , Nick Desaulniers , Nicolas Schier , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Greg Kroah-Hartman , Randy Dunlap , Arnd Bergmann , Bjorn Andersson , Todd Kjos , Matthias Maennich , Giuliano Procida , kernel-team@android.com, libabigail@sourceware.org, Jordan Crouse , Trilok Soni , Satya Durga Srinivasu Prabhala , Elliot Berman , Guru Das Srinagesh Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 8, 2023 at 5:35=E2=80=AFAM John Moon = wrote: > > While the kernel community has been good at maintaining backwards > compatibility with kernel UAPIs, it would be helpful to have a tool > to check if a commit introduces changes that break backwards > compatibility. > > To that end, introduce check-uapi.sh: a simple shell script that > checks for changes to UAPI headers using libabigail. > > libabigail is "a framework which aims at helping developers and > software distributors to spot some ABI-related issues like interface > incompatibility in ELF shared libraries by performing a static > analysis of the ELF binaries at hand." > > The script uses one of libabigail's tools, "abidiff", to compile the > changed header before and after the commit to detect any changes. > > abidiff "compares the ABI of two shared libraries in ELF format. It > emits a meaningful report describing the differences between the two > ABIs." > > The script also includes the ability to check the compatibility of > all UAPI headers across commits. This allows developers to inspect > the stability of the UAPIs over time. > > Signed-off-by: John Moon BTW, is there anybody (except the submitters) who loves this tool? (or anybody who has ever evaluated this?) I am the only person who pointed out something. I put some more comments from users' point of view. [1] The number of lines of the error log. According to this tool, it looks like we broke a lot of UAPI headers in the previous MW (between v6.2 and v6.3-rc1). Not only in the previous MW, we always broke so many UAPI headers, this script says. The following command outputs 2380 lines. $ ./scripts/check-uapi.sh -q -b v6.3-rc1 -p v6.2 2>&1 | wc 2380 9438 104953 I do not know how many are real breakages, and how many are false positives. Anyway, I will not check the 2380 lines of the error log. And, please note that the help message explains '-q' is the *quiet* mode. It is the opposite. This is super noisy. [2] Be careful! While testing the patch submissions of this, I messed up my repository multiple times. The script takes some time because it builds many objects internally. However, once this script starts running, you must not hit Ctrl-C. If you do it, your repository will be sprinkled with a ton of untracked files. Apply this patch, and run "./scripts/check-uapi.sh -p v6.0" and hit Ctrl-C. Repeat it a couple of times, and "git status" will show you something horrible. You will never know when git is checking out a commit because this script hides it by 'git checkout --quiet'. So, this tool should show a caveat at least. 'git checkout' should not be hidden, or maybe a caveat message should be shown. CAVEAT This tool runs 'git checkout' a couple of times internally. If you interrupt it, your worktree might be messed up. -- Best Regards Masahiro Yamada