From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x92f.google.com (mail-ua1-x92f.google.com [IPv6:2607:f8b0:4864:20::92f]) by sourceware.org (Postfix) with ESMTPS id 082BB3858025 for ; Fri, 10 Dec 2021 14:11:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 082BB3858025 Received: by mail-ua1-x92f.google.com with SMTP id n6so17096588uak.1 for ; Fri, 10 Dec 2021 06:11:22 -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:from:to:cc:references:in-reply-to :content-transfer-encoding; bh=YTTtOVYrBXbug+QVVVN4W1yR+8gHVSk1/DjXzrTBIgE=; b=7ZS2LVjsqb9mZJwaS+320JNg1alra8+iytObpeKxv3Z0D2E4I2ztawoSjv2t8UpQ2i qhriqYAS3l+vWhC8f3QLxzxAescnG8EqzqJG9ZUESoM/DQSzff7TVTFugzOL5g1rEask bZsZE/98L2W5YScIKUMCS9t7gvf1ONQqzxnKQyU6/5lI+ZkESDdJma7avAPMjY0DECsR eTl12tHhzjaEY1O8PUgygHSRywFixcarrLoLduf7Bsep3aWRFF/R3N74wa0o5aJR8kv5 XoeXkTl5Aa+QN4X0BG4gHlDWY+ecis4bfOA5zmmRonaMbwf34Rwl6Rahbbqc8vkj1tp7 B2VA== X-Gm-Message-State: AOAM5304hDyM5wlCGmCxytcf+moosOBqlV9QqvpEcagp+ng2RGvugZsq fJXRUd+TqQl55ejVUjjIVOW66Q== X-Google-Smtp-Source: ABdhPJwedLbH4wA+f34PqT4wVNGzx0xTvwsOIKIQH9sviV58v+hcxezydm+1dT4f1lGhyFCvsckF0g== X-Received: by 2002:a67:edd7:: with SMTP id e23mr15896678vsp.52.1639145481561; Fri, 10 Dec 2021 06:11:21 -0800 (PST) Received: from ?IPV6:2804:431:c7ca:a776:ce11:d591:8bd5:613f? ([2804:431:c7ca:a776:ce11:d591:8bd5:613f]) by smtp.gmail.com with ESMTPSA id b8sm1879671vsl.19.2021.12.10.06.11.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Dec 2021 06:11:21 -0800 (PST) Message-ID: <285481b2-2621-1c61-07e8-1964e6be7a8f@linaro.org> Date: Fri, 10 Dec 2021 11:11:18 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH v6 02/20] elf: Add _dl_audit_objopen Content-Language: en-US From: Adhemerval Zanella To: Florian Weimer Cc: libc-alpha@sourceware.org, John Mellor-Crummey , Ben Woodard References: <20211115183734.531155-1-adhemerval.zanella@linaro.org> <20211115183734.531155-3-adhemerval.zanella@linaro.org> <87ee6kaazs.fsf@oldenburg.str.redhat.com> <87a6h8aamt.fsf@oldenburg.str.redhat.com> <9bc38147-433c-a915-1ba9-e8d730a1d728@linaro.org> In-Reply-To: <9bc38147-433c-a915-1ba9-e8d730a1d728@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.6 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: Fri, 10 Dec 2021 14:11:23 -0000 On 10/12/2021 10:45, Adhemerval Zanella wrote: > > > On 10/12/2021 09:48, Florian Weimer wrote: >> * Florian Weimer: >> >>> * Adhemerval Zanella: >>> >>>> diff --git a/elf/Makefile b/elf/Makefile >>>> index 8f3e3a3602..80ed31edbe 100644 >>>> --- a/elf/Makefile >>>> +++ b/elf/Makefile >>>> @@ -36,7 +36,7 @@ dl-routines = $(addprefix dl-,load lookup object reloc deps \ >>>> exception sort-maps lookup-direct \ >>>> call-libc-early-init write \ >>>> thread_gscope_wait tls_init_tp \ >>>> - debug-symbols minimal-malloc) >>>> + debug-symbols minimal-malloc audit) >>> >>> You can drop the #ifdef SHARED if you add this to rtld-routines. > > Ack, I will change it. I recalled why I addon dl-routines: _dl_audit_pltexit is currently required for static build as well. I can refactor it, but I think it simpler to added the SHARED instead. > >>> >>>> +/* Call the la_objopen() from the audit modules for the link_map L on the >>>> + namespace identification NSID. If CHECK_AUDIT is set it will also check >>>> + if main mapping of the namespace is a audit modules. */ >>>> +void _dl_audit_objopen (struct link_map *l, Lmid_t nsid, bool check_audit); >>> >>> No () after function name (not sure?) > > Ok, I will remove all the () on function descriptions. > >>> >>> Should check_audit be named require_auditing? That would align better >>> with the l_auditing check, I think. >> >> Hmm. require_auditing is also not quite right. What about >> skip_auditing? >> >> And the comment should say which namespace (there's nsid and l->l_ns). >> >> Maybe the check should be moved into the caller because >> notify_audit_modules_of_loaded_object does not need it? > > Yeah, this make more sense. >