From patchwork Fri Mar 17 06:31:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: stsp X-Patchwork-Id: 55591 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4D9363850209 for ; Fri, 17 Mar 2023 06:32:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4D9363850209 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679034776; bh=vtk7ks4IpyfiZE5zlpONbK5hVcbGzn6TJuWzfoHAhJs=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=KQyQLGYCIPOt6EwNWRg+W+xmxIDMr4713z/5AVSSiF2HmWNbPjPiRENk5Wma+UKOc CetHuD6c//lqHVehhTY5UVgblowNGKGEpUJFyyheqlyReTVCW1H7RdyNNScIJB1nbl 0ePgwq8cGxPS+hzeKPSLsr+TZQaek/5c147O1/pI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from forward102c.mail.yandex.net (forward102c.mail.yandex.net [IPv6:2a02:6b8:c03:500:1:45:d181:d102]) by sourceware.org (Postfix) with ESMTPS id 9B1603858423 for ; Fri, 17 Mar 2023 06:32:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9B1603858423 Received: from sas9-2d24a7e69f58.qloud-c.yandex.net (sas9-2d24a7e69f58.qloud-c.yandex.net [IPv6:2a02:6b8:c11:2298:0:640:2d24:a7e6]) by forward102c.mail.yandex.net (Yandex) with ESMTP id 31C8D600D7 for ; Fri, 17 Mar 2023 09:32:28 +0300 (MSK) Received: by sas9-2d24a7e69f58.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id QWeJF9abi0U1-BbAs5LqV; Fri, 17 Mar 2023 09:32:27 +0300 X-Yandex-Fwd: 1 To: libc-alpha@sourceware.org Cc: Stas Sergeev Subject: [PATCH v8 0/11] implement dlmem() function Date: Fri, 17 Mar 2023 11:31:59 +0500 Message-Id: <20230317063210.4118076-1-stsp2@yandex.ru> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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-Patchwork-Original-From: Stas Sergeev via Libc-alpha From: stsp Reply-To: Stas Sergeev Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Changes in v8: - drop audit machinery and instead add an extra arg (optional pointer to a struct) to dlmem() itself that allows to install a custom premap callback or to specify nsid. Audit machinery was meant to allow controling over the pre-existing APIs like dlopen(), but if someone ever needs such extensions to dlopen(), he can trivially implement dlopen() on top of dlmem(). Changes in v7: - add _dl_audit_premap audit extension and its usage example Changes in v6: - use __strdup("") for l_name as suggested by Andreas Schwab Changes in v5: - added _dl_audit_premap_dlmem audit extension for dlmem - added tst-auditmod-dlmem.c test-case that feeds shm fd to dlmem() Changes in v4: - re-target to GLIBC_2.38 - add tst-auditdlmem.c test-case to test auditing - drop length page-aligning in tst-dlmem: mmap() aligns length on its own - bugfix: in do_mmapcpy() allow mmaps past end of buffer Changes in v3: - Changed prototype of dlmem() (and all the internal machinery) to use "const unsigned char *buffer" instead of "const char *buffer". Changes in v2: - use instead of "../test-skeleton.c" - re-target to GLIBC_2.37 - update all libc.abilist files