From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by sourceware.org (Postfix) with ESMTPS id B8F7438618CC for ; Fri, 5 Mar 2021 15:01:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B8F7438618CC Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Fri, 05 Mar 2021 07:01:07 -0800 Received: from HKMAIL101.nvidia.com (10.18.16.10) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 5 Mar 2021 15:01:05 +0000 Received: from HKMAIL102.nvidia.com (10.18.16.11) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 5 Mar 2021 15:01:03 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.176) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Fri, 5 Mar 2021 15:01:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QYQE3LA4SbTvU2ey5UytzuyJnnwaHlzzhFHPFvV7V2PM6PfEu3nEo98P0avMfaY/akJtiL2yOwbrWFjaZ1tDhWdv44QUwFqaMCW/hDbWZT887JdNdFuvfIYtRErQDXLFKYLQpQ7KkJQ8mtjc0+0sDy8kwuVh1RjygGGoR/2guYfco1sTAmRksbR8Ng24TelkSBbiV2WTtjdGfOchH5ioaVQtqBoRdFfBVs7I31kzQ4WB1kt3aI4hMBvV5OHmm59bbXxZ2z7f9whnczY+plTjyuSU0iMUXrzEcLcdsWiJoUnJLSRdfHdwveHFi3YD60uQyPGyPG1cbEcZA26OsLZyaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n/EUO+YADM0c327jTvJXMRAxDdHGSTGlVedKGe6jH+o=; b=g+/7z2ZNgsDtgZLk831RwxyKTzqQbR/KQxSmLIroBHUbr5fvF9TVJXgEq7hneSMMAH1E6XnUFBeaU6SwlUK9TncdgJ5wFCNfca0QYCrFuhOclCbocaePgD1yiyTYGLBl41qyUOjL1UBVmNdPG0yoOb6VHvE524HQmj+JbAID6hsQ6w+bIN8bnNOAY9BVSSIjwLJ7yW3qsdIM+SPnWFsN9vFm8MHyYoREyq5MhqWJoONsEVmX6Ul6dI4A3s8VBjXuX97wAQ/EZTpN8R2F3LMbb3pC3VHz7N+2DM5EvSfhuTnTBkk3iXWg7nFkoWHDWRdla6SAIR6GX7DFKq5agxksbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from MN2PR12MB3278.namprd12.prod.outlook.com (2603:10b6:208:ac::19) by MN2PR12MB3213.namprd12.prod.outlook.com (2603:10b6:208:af::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Fri, 5 Mar 2021 15:00:53 +0000 Received: from MN2PR12MB3278.namprd12.prod.outlook.com ([fe80::bc9f:2909:934c:3584]) by MN2PR12MB3278.namprd12.prod.outlook.com ([fe80::bc9f:2909:934c:3584%3]) with mapi id 15.20.3890.032; Fri, 5 Mar 2021 15:00:53 +0000 From: Sachin Nikam To: Ketan Patil , Matthias Maennich CC: "libabigail@sourceware.org" , Nicolin Chen , Bharat Nihalani , Bryan Huntsman Subject: RE: abidw for non-exported structures Thread-Topic: abidw for non-exported structures Thread-Index: AdcLZ9oZE+/4xuNRQlGbPWSyKFwLzAAFAmcAAR/878AAdPODcA== Date: Fri, 5 Mar 2021 15:00:53 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Enabled=True; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SiteId=43083d15-7273-40c1-b7db-39efd9ccc17a; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Owner=ketanp@nvidia.com; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SetDate=2021-03-03T07:15:18.9083060Z; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Name=Unrestricted; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Application=Microsoft Azure Information Protection; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_ActionId=ceb42871-7e01-4df6-91e5-e72b45b114a2; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Extended_MSFT_Method=Automatic x-originating-ip: [115.114.90.35] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 586f1f34-adff-4027-85c2-08d8dfe77942 x-ms-traffictypediagnostic: MN2PR12MB3213: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-header: ProcessedBy-CMR-outbound x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: U18aOjUhsa6fHISZFio73RUPMXkQAm5uluhLkR3TIekYN+hNcRz178MkRhDEQlpzyrakEkFaX25chCk/aAkoArEt2TW2sRqxqVaIgsDrkcj/radDX/IXi0A0z7EcGW/gZQLIN5pt2eiAPlUllSn9z3qoavnR1GRB02cUg2zncTKL0wgW5EUopVeKG0BZNLr18u+MAW7Jhs7HTrxWmo8jIgFGzeU/xa0EgJnN9XXNgmh2LAYlzdX9k3Pd3FcyBSnMECkWS+fnULyS2ez/MPyRuiDXgJNoAJzmbwrK3sDqCSZtUe4E0Uzv6PvfRhoFVToG04ACFOVXTBTvXnYnhfbNQQLMsWH+x3Gz05/4bALBQBqIkJBHYPXpnLcHCrqlK7DIrLxetldqiSULjSuyCgGvWtU6o/y8ejL1G814/y9sRxO8JfsS/Ss0LC2NFYPhg8ZwkBjHO9N3u/8VDlHuTXG51YNY/GfLpquNSk7GnNjYjsNUArh3b1XIx78Ju3apNs38/cbA0atmb3gn55/0cAXifvJgi8ms/T0l1rlwj3GWYuAortnVguisimZEpUuTT6hY44MUsoQkLCe/porg+vpIAQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR12MB3278.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(396003)(376002)(366004)(346002)(39860400002)(53546011)(33656002)(6506007)(26005)(186003)(478600001)(5660300002)(54906003)(71200400001)(316002)(966005)(2906002)(66446008)(55016002)(52536014)(110136005)(64756008)(83380400001)(4326008)(66556008)(66476007)(86362001)(107886003)(66946007)(7696005)(8936002)(8676002)(55236004)(9686003)(76116006)(3480700007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?/MUcZBxo+KNLNS3lXQPFmEzdDmEAfJZfxo5traOxakC76hQiggqOGpchVDfh?= =?us-ascii?Q?LtDFmZ2rI39nRWOeS6P+6DgLgEIs61MqTO4cwas9K7WSPLYjI5Op1D7QMNR6?= =?us-ascii?Q?4qqRMTDu3CTduffahuL2Zjp9a3mapkEWiWdxTwGKAZ2EpG5puL3lR9BCk/kI?= =?us-ascii?Q?pUUyqniQomcAtgyY4qZynUCGDonVzjylZv5dMK6WRQI81TQjaD5l30L47mBu?= =?us-ascii?Q?d+J2PZ++EMCC+uRj0t+wve8ToG0TgGt7h93H97balEF7txD418DZFnMXh5aC?= =?us-ascii?Q?hK895eupG/WhLNZ9eNGu80q9mLfBwWc39d2Bfv8pvp3B/07kB/7y1wuD/9Rj?= =?us-ascii?Q?GbHrHPPBeGB4upgv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=?us-ascii?Q?lbvGcL/VQCGSZ1Sdscl3iSLnDnOdKpKN+1oMA+69PUkpi7T/EQncgD7lZFQO?= =?us-ascii?Q?g7mvEoZtFVqdwgFAv+pFtVmV?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3278.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 586f1f34-adff-4027-85c2-08d8dfe77942 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Mar 2021 15:00:53.6208 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: HnnyhPxu6YlHrC9UTElE1zzqLsjmeEMZQ3d1kvBI66MX4Qq4dWarKO4fRKrI7YBrvsK0dQ0SYo/6ejYqXHKbnw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3213 X-OriginatorOrg: Nvidia.com X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 15:01:10 -0000 Hi, I have another query. Android libabigail tool =3D> https://android.googlesource.com/kernel/build= /+/refs/heads/master/abi/README.md I want to know how much android libabigail tool is diverged from https://ww= w.sourceware.org/libabigail/wiki=20 What are the enhancements or bug fixes done in android libabigail tool from= sourceware tool? Looping in some folks. Best Regards, Sachin Nikam. -----Original Message----- From: Ketan Patil =20 Sent: Wednesday, March 3, 2021 12:45 PM To: Matthias Maennich Cc: libabigail@sourceware.org; Sachin Nikam ; Nicolin Ch= en Subject: RE: abidw for non-exported structures Thanks a lot Matthias for the detailed answer. -----Original Message----- From: Matthias Maennich =20 Sent: Thursday, February 25, 2021 7:11 PM To: Ketan Patil Cc: libabigail@sourceware.org; Sachin Nikam ; Nicolin Ch= en Subject: Re: abidw for non-exported structures External email: Use caution opening links or attachments Hi! On Thu, Feb 25, 2021 at 11:25:53AM +0000, Ketan Patil via Libabigail wrote: >Hi, > >I was experimenting with abidw and abidiff tools to check ABI changes in l= inux kernel. >I had performed few experiments: > > 1. Changing exported structures: > * I changed few structures (added some dummy members in between) wh= ich were exported and build the kernel and created abi xml file using abidw= tool. > * Then I compared this xml with the baseline xml (kernel without an= y changes) using abidiff tool and I found that it catches this ABI change. > 2. Changing non-exported structures: > * I changed few non-exported structures e.g. struct dm_ioctl In htt= ps://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/= uapi/linux/dm-ioctl.h?h=3Dv5.10.18 > * This struct is being used by a number of ioctls. So I think, chan= ging this struct should be flagged as an ABI change. > * Then I build the kernel and created the new abi xml file using ab= idw tool and compared with baseline xml using abidiff tool. > * abidiff tool is not able to catch this. Also, I don't see any ent= ry for dm_ioctl in the xml generated using abidw. > > >Does it mean that, abidw tool does not work for the non exported symbols? = If yes, are you planning to add this feature? >Can you please let me know or redirect? libabigail works roughly like this (in its default mode): It reads symbol i= nformation from the ELF symbol table and matches symbols with corresponding= DWARF information to gather type information associated with it. The type = information is recursively resolved to capture nested types. So, fundamenta= lly, to capture and eventually report a structure in the ABI, it needs to b= e contributing to the definition of an exported symbol. E.g. consider this = snippet. | enum my_enum { | VALUE, ANOTHER_VALUE | }; | | struct my_struct { | // some interesting bits | }; | | struct another_struct; | | // consider publicly exported function | int my_function(int my_enum, struct my_struct s1, struct another_struc= t* s2) { | if (my_enum =3D=3D VALUE) { | // something | } | } The enum technically participates in the ABI, but this is invisible for lib= abigail as the type information is not connected. As opposed to my_struct. = This is part of the type information of my_function and changes therefore w= ould be discoverable. For the forward declared another_struct, we have agai= n the case that changes to this data structure can't be captured as the typ= e is passed by reference and the details are hidden from the ABI. Not even = we know anything further about this struct. If my_function is not exported = at all (i.e. not part of the observable ABI), any analysis will ignore it, = entirely and rightfully. For the Linux kernel there is an additional fact to consider. In the defaul= t way (without using whitelists), symbols are considered part of the ABI (o= r in this case Kernel Module Interface (KMI)), if they are exported via EXP= ORT_SYMBOL* macros and therefore part of the ksymtab. If a data structure is not participating in the type information of an expo= rted symbol, changes to it will not be discoverable. In order to discover c= hanges to those, you need to make them discoverable, e.g. by exporting a fu= nction that takes 'struct dm_ioctl' as an argument type. Cheers, Matthias > >Thanks, >Ketan Patil >