From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 8589E3858D28 for ; Mon, 7 Feb 2022 16:49:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8589E3858D28 Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-147-9WGsK9L4MsOJ7n6tYcMmqA-1; Mon, 07 Feb 2022 11:49:03 -0500 X-MC-Unique: 9WGsK9L4MsOJ7n6tYcMmqA-1 Received: by mail-qt1-f200.google.com with SMTP id c20-20020ac84e14000000b002d198444921so11442736qtw.23 for ; Mon, 07 Feb 2022 08:49:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:organization:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=/ln19/K6IP4wIdd0gGXbctcs8N/uYIPnyyzRvBl1bns=; b=Sepg838BCNspjOgS0OyUaPfELRbPNV3dmDX+Fa+sN+zecyetu+xFEpSL9cRFHrnCs5 /EgqWLp4AOvSdybGYJSakMxnzrnjidNrn9uRRqaEijv1PWCy5Yz+VS3MLfXDNOKKOJb5 je329JMScNMH+H+BPUYbftXBVGE7L457lLK3p9hj+E9tpe9DX9qKydwiNq0Psfn5EShP Kk0hNaU/CkUQpm7OIBU11SrKlkbtm6Dw9sK/9U9rsCOjATI2xJjXULMVi4AD3fmnkHW5 c51vwhVu7jUpMKbxYdcT6Mmiic4DbvdCP/hUmdEp/Y+FMsJCXu59EE3k6rVtjLYtJmDn M7yA== X-Gm-Message-State: AOAM531AOPJFCf8x3Rj5GTgPDMyRIfHXoKq55UNqN0hgmT2WUF7CXpv6 dDdeWcnMkHTIHC9wMV2EQO/gllHvCZbIDci+LlikRNMZEn0LNXA/zkhc9mGjqf5KB7wY30FDsXE IdUFYJ9Q5oOGjthfAFfIy X-Received: by 2002:a05:622a:5ce:: with SMTP id d14mr264456qtb.642.1644252543283; Mon, 07 Feb 2022 08:49:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcvOzVJO8JLK6d64KpIWq4kpO/Gea5UyyzJel6uSbzdveP/RpfCNz9ZyjDl9FEo1/AandL7g== X-Received: by 2002:a05:622a:5ce:: with SMTP id d14mr264445qtb.642.1644252543051; Mon, 07 Feb 2022 08:49:03 -0800 (PST) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id z6sm333844qkj.36.2022.02.07.08.49.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 08:49:02 -0800 (PST) Received: by localhost (Postfix, from userid 1000) id 828C1581C3A; Mon, 7 Feb 2022 17:49:00 +0100 (CET) From: Dodji Seketeli To: Giuliano Procida via Libabigail Cc: Dodji Seketeli , Giuliano Procida , maennich@google.com Subject: Re: [PATCH 1/2] symtab-reader: Remove an over-agressive assertion Organization: Me, myself and I References: <87v8xrlyyd.fsf@redhat.com> <87r18flypy.fsf@seketeli.org> X-Operating-System: Fedora 36 X-URL: http://www.seketeli.net/~dodji Date: Mon, 07 Feb 2022 17:49:00 +0100 In-Reply-To: (Giuliano Procida via Libabigail's message of "Mon, 7 Feb 2022 15:33:33 +0000") Message-ID: <875ypqmxkz.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Mon, 07 Feb 2022 16:49:09 -0000 Giuliano Procida via Libabigail a =C3=A9crit: > Hi. > > On Mon, 7 Feb 2022 at 11:10, Dodji Seketeli wrote: >> >> >> In symtab::load, the symtab reader walks the symbol table and records >> each relation "symbol <-> address". >> So, the relation "foo <-> address-of-foo" is going to be recorded. >> The relation "foo.cfi <-> address-of-foo.cfi" is going to be recorded >> as well. >> >> But then, because the symbol foo.cfi has a special meaning, in the >> realm of "control flow integrity", the relation "foo.cfi <-> >> address-of-foo.cfi" (as well as all the *.cfi <-> address-of*.cfi >> relations) is going to be recorded (again but) in a particular way by >> calling symtab::add_alternative_address_lookups. >> >> The problem is that in, symtab::add_alternative_address_lookups there >> is an assert that (wrongly) assumes that the relation foo.cfi <-> >> address-of-foo.cfi is being seen for the first time. This is wrong >> because the loop in symtab::load that records all the "symbol <-> >> address" relations has seen and recorded this foo.cfi <-> >> address-of-foo.cfi relation once already. >> >> This patch removes that assert so that the kernel referred to in the bug >> report of PR26646, as mentioned in >> https://sourceware.org/bugzilla/show_bug.cgi?id=3D26646#c5, can be >> processed by abidw without crashing. >> >> * src/abg-symtab-reader.cc >> (symtab::add_alternative_address_lookups): Remove over-aggressiv= e >> assert. >> >> Signed-off-by: Dodji Seketeli > > Reviewed-by: Giuliano Procida > > I didn't see a better solution and you've written up a proper analysis > in the commit message. Thanks! Thanks! Applied to master. [...] Cheers, --=20 =09=09Dodji