From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by sourceware.org (Postfix) with ESMTPS id 8977E3858423 for ; Tue, 14 Dec 2021 13:49:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8977E3858423 Received: by mail-pj1-x102e.google.com with SMTP id n15-20020a17090a394f00b001b0f6d6468eso729918pjf.3 for ; Tue, 14 Dec 2021 05:49:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cl2S7g3AqL3dtcfEfuYzCWPtc4EJloBM4iz/3Q1Wt+o=; b=OK3caryLk4kBe0Gxdk/0PfUMNzMKGo9ODSpLe/QJBn5Qx37r8Kx3Xvd9ElPJup3v7I pV7QwC4DNxCPdf9hJQsGiGH8oHE8sZGare1AnJx3hjf+MjCaIbJ564pAjmZekTs59gkU sv2MAyfduvmxsJuc//N/rXEvqAC+oaBhyrV6CVbi+20AFBd04HLT1IMh0tL8LdfEKrvR wnt62IS+2YiMN9JKmtx+k/uDGQ3KufX/R5FVxpY9NDm93LhPeFEf97ostIUB43QdJB8R sZTnSxF+SnqibFbg/UvWDpsasYV+sWiBrb1opcBLhJ6w1Z2sIaRziho5eMJF3SlzDhwg M4fA== X-Gm-Message-State: AOAM533npHHugHVwqfHzOT0S7XK6WBgtBmJ9eplqRcAak/p+xTCE+paD hiK4v+ZnrRsg2Tpxll/3wPGpY4AKOth8QENJ+CQ= X-Google-Smtp-Source: ABdhPJx+FSzf/XMihVuspLXUs3JdE1KsUzOK/ZUfBMY6IB0bR8VCo20YAQ4IKBUcKuJYa4Q+1DxJHEoK70nOCGtzryY= X-Received: by 2002:a17:902:904b:b0:143:73ff:eb7d with SMTP id w11-20020a170902904b00b0014373ffeb7dmr5798490plz.85.1639489752568; Tue, 14 Dec 2021 05:49:12 -0800 (PST) MIME-Version: 1.0 References: <20211213152057.151438-1-hjl.tools@gmail.com> <3e6b30a4-cf8a-49c9-7382-3f3255c8201a@linux.alibaba.com> <87y24nskgi.fsf@oldenburg.str.redhat.com> In-Reply-To: <87y24nskgi.fsf@oldenburg.str.redhat.com> From: "H.J. Lu" Date: Tue, 14 Dec 2021 05:48:36 -0800 Message-ID: Subject: Re: [PATCH] elf: Align argument of __munmap to page size [BZ #28676] To: Florian Weimer Cc: "H.J. Lu via Libc-alpha" , Rongwei Wang Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3022.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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, 14 Dec 2021 13:49:15 -0000 On Mon, Dec 13, 2021 at 11:40 PM Florian Weimer wrote: > > * H. J. Lu via Libc-alpha: > > > On Mon, Dec 13, 2021 at 6:49 PM Rongwei Wang > > wrote: > >> > >> Hi, HJ > >> > >> Thanks for your help to fix this bug. And I just found out that the > >> patch "elf: Properly align PT_LOAD segments" had been merged into > >> glibc/master. > >> > >> And I saw Florian's email: > >> > >> > We should check munmap failure though and rollback everything if > >> > necessary. It's possible we can undo the initial PROT_NONE mapping even > >> > if future munmap calls fail because unmapping the first mapping does not > >> > need to split a mapping. > >> > >> It seems rollback initial PROT_NONE mapping when munmap fails is good > >> idea. Nice to have. Of course, IMO, this your patch is also can fix this > >> munmap failure well. what do you think? > >> > >> When this fix is stable in glibc upstream, I will backport it into our > >> internal glibc repo. So, if you have any improve this fix suggestions, I > >> will respond immediately. Sorry for my speed is much slower than your. > >> > >> > > > > Let's wait for a few days. > > Can we please fix the regression in some way? It impacts development, > particularly at this late stage during the 2.34 cycle. > > Either revert the change, or at least add the unchecked __munmap, and > fix that later. What is the unchecked __munmap? -- H.J.