From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by sourceware.org (Postfix) with ESMTPS id 36A043858C2C for ; Tue, 21 Dec 2021 14:48:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 36A043858C2C Received: by mail-qt1-x829.google.com with SMTP id f9so1024251qtk.4 for ; Tue, 21 Dec 2021 06:48:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=BjaVuRAIyS7Ia3Embj2L3tFU8ic7qkgDdpsRBz6qNXI=; b=nk+Oj1B8q562z6Tt7cihS9CeijHlqo/pCUQ+5CCXhlHpBJnFRyPDOjY/z+GgM2WdBP rzFEhWvBLFYSf0E2WpJAS9Kka0KGS8R5VnGqEjRVNlPqsMQ3g6lSodn3bb+WgWv575WN q+pjeZvxd/GhcF/txVj/JVjFfCofDUfUxK3V3lV5BxuyDz35+FwTIiyP+u7467wilkKx t0T8ffyfOOJqLg5gDl4qP5zlzib7npjeS7r1AQvK5SySGaNZzAntkk0aC1ahG/SGQJqF AjmC9LHPdrrdfSHuGfynvFX0rT0dgZ55Tp56bPx1ctKZcs6H/iV3cAno/ZaoNp3IIQsz xJFQ== X-Gm-Message-State: AOAM53107surN3OggKqzRqtvTHtfix+hc+qIQPx5lhg6P0uOpguNVChc OmrwhliKIsub/qRUIsAHAIqf+g== X-Google-Smtp-Source: ABdhPJw9dVOGX4gDVs8Thg1Mx0kH+msYwlLhoVF0npv9htmiAKVBGAlHiY5IiA/oLSrVetjU8iljIA== X-Received: by 2002:ac8:4ccd:: with SMTP id l13mr243864qtv.154.1640098114510; Tue, 21 Dec 2021 06:48:34 -0800 (PST) Received: from ?IPV6:2804:431:c7cb:3b1e:8bd2:32a9:e2a3:1842? ([2804:431:c7cb:3b1e:8bd2:32a9:e2a3:1842]) by smtp.gmail.com with ESMTPSA id o21sm17819269qta.89.2021.12.21.06.48.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Dec 2021 06:48:34 -0800 (PST) Message-ID: Date: Tue, 21 Dec 2021 11:48:31 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH v6 19/20] elf: Fix runtime linker auditing on aarch64 (BZ #26643) Content-Language: en-US To: Florian Weimer Cc: libc-alpha@sourceware.org, John Mellor-Crummey , Ben Woodard References: <20211115183734.531155-1-adhemerval.zanella@linaro.org> <20211115183734.531155-20-adhemerval.zanella@linaro.org> <87zgovc68b.fsf@oldenburg.str.redhat.com> <87mtku9fvd.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella In-Reply-To: <87mtku9fvd.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Dec 2021 14:48:36 -0000 On 21/12/2021 11:44, Florian Weimer wrote: > * Adhemerval Zanella: > >> On 20/12/2021 18:32, Florian Weimer wrote: >>> * Adhemerval Zanella: >>> >>>> diff --git a/elf/rtld.c b/elf/rtld.c >>>> index 29a37f51d3..1a13ae6314 100644 >>>> --- a/elf/rtld.c >>>> +++ b/elf/rtld.c >>>> @@ -990,10 +990,10 @@ file=%s [%lu]; audit interface function la_version returned zero; ignored.\n", >>>> return; >>>> } >>>> >>>> - if (lav > LAV_CURRENT) >>>> + if (lav != LAV_CURRENT) >>>> { >>>> _dl_debug_printf ("\ >>>> -ERROR: audit interface '%s' requires version %d (maximum supported version %d); ignored.\n", >>>> +ERROR: audit interface '%s' requires version %d (current supported version %d); ignored.\n", >>>> name, lav, LAV_CURRENT); >>>> unload_audit_module (dlmargs.map, original_tls_idx); >>>> return; >>> >>> Sorry, this is not what I had in mind. I'd like to increase LAV_CURRENT >>> and pretend that the old and new versions have the same behavior, at >>> least as far as aarch64 is concerned. We need not write the >>> compatibility code for the old at this time, only if there >>> actual users out there that demand it. >> >> Do you mean to only check if lav >= LAV_CURRENT and allow old audit modules >> as well? > > Yes. > >> At least for aarch64 old audit modules are error-prone and potentially adds >> more subtle issues since they do not save/restore some return register that >> I don't see any real gain to keep supporting them. > > I disagree. la_objsearch alone is a significant use case, and I don't > see why it wouldn't work today. It does not need any > architecture-specific code whatsoever. My main problem is provide a API which undocumented and missing support where if users tries to replicate what other architecture does it will shoot in the foot. I think this is just a broken API and we should avoid it.