Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2758980rwl; Thu, 13 Apr 2023 10:25:09 -0700 (PDT) X-Google-Smtp-Source: AKy350aq/umam/rdQ48gU0X6klDSw7UXyis6YYKmJJhRJTRhYAmnlc8sj6kRfdRJFRiXeuqaG9cw X-Received: by 2002:a17:903:11c7:b0:1a1:cef2:accf with SMTP id q7-20020a17090311c700b001a1cef2accfmr3478889plh.30.1681406709517; Thu, 13 Apr 2023 10:25:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681406709; cv=none; d=google.com; s=arc-20160816; b=hszYEziqLgtNQnK5hILGKiXzLW7ujEjSHSnahsEFcrBGecCEt34r5I03sQPgRzGogx f9sUJv+wOHGD2Qu9bvS23JuSRKo9TfcPB7abWeW+uMRYjI+9fAqU5S/HJD2vPhX6gvqh 5ewP8cdFwslQ5/1GegF2G3SgkuW4M2rjqCnFIFrDCKS+l7hnPIRU6xHGj9w4doXI89D2 WIF97KIF7CucLAhwi/JoliMg6NlDvPXdeFuwPqSDwmBRxxCkIN9I8jmw1JFl37mY19OH 92C/doJVulX3NHIrzzRrZE8fOHPC8a31wzU1a1e4FhtECLbJWk/8PBQ6Bt2yAS9sH1c4 0PFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=MtdHblHL0dRtEAb/ZgyYrCdFyTXsfm/IBpdoXkGNRMw=; b=ub/Oioq8oTzPHT20jB2qGprZWNK/Cm+HQe7qhlXrXaECzCDZ0guFs25CZIQIHMMpTO 0X7VWar9KxUw6VKCcLL2Ga2P1H1XGllEgOlnKJSNIiJwdXjogQ7tWKO2RAP4TUSibJ65 e7lFieUW21m/ESh6sMEw8LmPKCkWosRyyg0i3i96YV/KYzd2NTr91YVpkCp6DeSJ438m vIGL5etu2hctcylhyXSuUBGUQjRZ/hnSG0k+MqoqvY5mV9isR5SvQPe4VQalX0T39rK5 PzUug1dKpUhDivqM8wC9A9EiYVA18ca9pD7ziQQfGHHQyCcN7ZZeP51/1l0yKu7bQ8Z4 ANIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Z2kaNPMG; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g6-20020a170902868600b001a1f5ee911dsi2327120plo.321.2023.04.13.10.24.58; Thu, 13 Apr 2023 10:25:09 -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=@quicinc.com header.s=qcppdkim1 header.b=Z2kaNPMG; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230115AbjDMRQK (ORCPT + 99 others); Thu, 13 Apr 2023 13:16:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229819AbjDMRQE (ORCPT ); Thu, 13 Apr 2023 13:16:04 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FD357D85; Thu, 13 Apr 2023 10:16:03 -0700 (PDT) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33DGiaTe013665; Thu, 13 Apr 2023 17:15:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=MtdHblHL0dRtEAb/ZgyYrCdFyTXsfm/IBpdoXkGNRMw=; b=Z2kaNPMGF/E/2vHrFAEUUt7zTcKgIy1Jrc+W0OnMTWDFPZ6R8FAvUz1TDTiC5CJ3sxf5 joE6GgL22KjQuUkusFlkdXvTv4F4Gv1wSDu/mwk/TRIO2tp8ExR2I2UBj6MotYVsMWFa 0MVyMw9p0KfQtE0mBU/ToMm6V30pjqTPcTX41hDMbWZeE6b/mJuQh6pNq6wOTeBTfkX5 gWcDFFlkshEGuyJ8nhcYGyJFOQWWO3ny85L8vQ9PM/hCiGe/IpitHmrPb43S+Nl2aMld u/TnMqm+19zz+OlwDBF8OXa/be6VaCOUyQww84LyzcdlTnUna2KXFoIAvYYfoDVnU23l Pw== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pxked0c3f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Apr 2023 17:15:28 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 33DHFR8U029863 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Apr 2023 17:15:27 GMT Received: from [10.110.32.64] (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Thu, 13 Apr 2023 10:15:25 -0700 Message-ID: Date: Thu, 13 Apr 2023 10:15:24 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v5 1/2] check-uapi: Introduce check-uapi.sh Content-Language: en-US To: Mark Wielaard , Greg Kroah-Hartman CC: Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , "Nicolas Schier" , , , , , Randy Dunlap , "Arnd Bergmann" , Bjorn Andersson , Todd Kjos , Matthias Maennich , Giuliano Procida , , , Jordan Crouse , Trilok Soni , Satya Durga Srinivasu Prabhala , Elliot Berman , "Guru Das Srinagesh" References: <20230407203456.27141-1-quic_johmoo@quicinc.com> <20230407203456.27141-2-quic_johmoo@quicinc.com> <2023041015-lunar-dandelion-1b4e@gregkh> <2023041136-donator-faceplate-5f91@gregkh> <2023041209-armed-overlaid-3d3d@gregkh> <718c102205750a00b86e8d33748e9bfb3c485ee1.camel@klomp.org> From: John Moon In-Reply-To: <718c102205750a00b86e8d33748e9bfb3c485ee1.camel@klomp.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: hSrVce4FG3DcLfPp4vEbqkODtZT23yTG X-Proofpoint-ORIG-GUID: hSrVce4FG3DcLfPp4vEbqkODtZT23yTG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-13_12,2023-04-13_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 impostorscore=0 phishscore=0 bulkscore=0 spamscore=0 malwarescore=0 suspectscore=0 adultscore=0 priorityscore=1501 clxscore=1011 mlxlogscore=999 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304130152 X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham 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 4/13/2023 7:37 AM, Mark Wielaard wrote: > Hi, > > On Wed, 2023-04-12 at 09:37 -0700, John Moon via Libabigail wrote: >> On 4/11/2023 11:14 PM, Greg Kroah-Hartman wrote: >>>> Would you find the tool more useful if it simply filtered out all instances >>>> where the size of the type did not change? This would filter out the >>>> following which the tool currently flags: >>>> >>>> - enum expansions >>>> - reserved field expansions >>>> - expansions of a struct with a flex array at the end >>>> - type changes >>>> - re-ordering of existing members >>>> - ...others? >>> >>> Obviously not, as some of those are real breakages, and some are not at >>> all. >>> >>> Please understand what is an abi breakage. Adding new enums is not. >>> Using a reserved field is not. Reording existing members IS. >>> >> >> Yes, understood that method would miss certain classes of breakages. I >> was suggesting it as a way to improve the signal-to-noise ratio of the >> tool since we don't currently have an algorithm for determining >> breakages with 100% accuracy. > > Note that you can check the exit code of libabigail's abidiff to see > whether something is an incompatible abi change or not, see: > https://sourceware.org/libabigail/manual/abidiff.html#return-values > > You can also of course use suppressions to instruct abidiff to avoid > reporting changes involving certain ABI artifacts: > https://sourceware.org/libabigail/manual/libabigail-concepts.html#suppr-spec-label > > Cheers, > > Mark Checking the ABIDIFF_ABI_INCOMPATIBLE_CHANGE flag in the return code is a good idea, but checking it doesn't change what the tool is currently outputting (i.e. the flag is set for all the changes currently reported). I think this is because of some filtering we're doing based on grepping stdout, but checking the return code would be more stable. The suppressions may work for some cases, but I fear they would be too eager in other cases. Looking at the docs, I'm not sure how we could express something like: "suppress changed enumerators if they end in 'MAX' or 'LAST' and appear at the end of the enumeration" or "suppress data member insertions into a struct if the last member in the struct has its size reduced by sizeof(new_member) and is named 'pad' or 'reserved'" They're complicated cases to detect in a general way. Thanks, John