From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x92a.google.com (mail-ua1-x92a.google.com [IPv6:2607:f8b0:4864:20::92a]) by sourceware.org (Postfix) with ESMTPS id 1F6C23858D35 for ; Fri, 10 Dec 2021 13:45:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1F6C23858D35 Received: by mail-ua1-x92a.google.com with SMTP id y5so16886046ual.7 for ; Fri, 10 Dec 2021 05:45:56 -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=tFr+R/jwW05YrwfZYV5rM0mYsxNdwzqQMdQbfw3tGlo=; b=wSP7uwlpmaWJxqHDjKwCFNZyRt/P0k71vcVm9ElXPSvSRfD0w3CUQQ78dN/GCHsGzl u3xLinXZiPXrHWG+QB75fncx/+FsTILfqYsWrjlzOd0MnG081sKClSiwoGdGXFNDIVYt fGCXkI9rvI+F39pP1IQ6uKyS0ESLVaTjKufhgfUmZejFhI2O+INbm6PvEsBpWLnWW9QQ OEgXnu1wv1Lw432bQMeOYkx8iSaxdwLOG4Yue1qY2+pq90Q+Fp68esH0tY4pNdcOaisi 9MxdIxuErcF83BoAWHhPaalL6FyJHsnRkGZ607LfO7WPeS9e6rKvt+KTmBjOsHCbKz7r ZxzA== X-Gm-Message-State: AOAM533yQJjvhqK0rrkSZLkMeXt0IAJDuQAnMB7iKV9XbNZ3CyV6xmdS 3Q3YCymzX0w9aYoNcyEWhuI5pJkMHHA8hg== X-Google-Smtp-Source: ABdhPJyqEVyN6zID2NbjQzq4qCo1iVTN1ejrjO69ca2Tluh4H5hO2007psq8uWCo4C/LKej2NqtxCQ== X-Received: by 2002:a67:6741:: with SMTP id b62mr16320685vsc.59.1639143955722; Fri, 10 Dec 2021 05:45:55 -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 j19sm2029229vka.4.2021.12.10.05.45.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Dec 2021 05:45:55 -0800 (PST) Message-ID: <9bc38147-433c-a915-1ba9-e8d730a1d728@linaro.org> Date: Fri, 10 Dec 2021 10:45:53 -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 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> From: Adhemerval Zanella In-Reply-To: <87a6h8aamt.fsf@oldenburg.str.redhat.com> 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 13:45:57 -0000 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. >> >>> +/* 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.