From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FB16C43462 for ; Wed, 7 Apr 2021 10:40:02 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0C5FB61359 for ; Wed, 7 Apr 2021 10:40:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C5FB61359 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.106606.203848 (Exim 4.92) (envelope-from ) id 1lU5b4-0002wy-Hg; Wed, 07 Apr 2021 10:39:42 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 106606.203848; Wed, 07 Apr 2021 10:39:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lU5b4-0002wr-Ea; Wed, 07 Apr 2021 10:39:42 +0000 Received: by outflank-mailman (input) for mailman id 106606; Wed, 07 Apr 2021 10:39:41 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lU5b3-0002wm-JT for xen-devel@lists.xenproject.org; Wed, 07 Apr 2021 10:39:41 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id aef715d6-6f27-4666-968b-5216d1c66c36; Wed, 07 Apr 2021 10:39:40 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 975B8B121; Wed, 7 Apr 2021 10:39:39 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: aef715d6-6f27-4666-968b-5216d1c66c36 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1617791979; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MmzeUKaM7jluEFAU+2gUICT9L6pW6MmGEPiXK3fkEsI=; b=oAYX+gNzZYjNLOmUvUnemAJjDEHvaBtkFGZ9hCwD4mnr7HyvM35aDzd5IcySLMy32DMvj5 L+rpalq2mr2+HB6oVGBomI92q7vFAX7V+5/+X6ryfZ7191z0tg48Efw+S2pXe2R0aSq3Kh BedostC3r4yaxm+NerNUsJWKObv+1FI= Subject: Re: [PATCH 2/2] xen/gunzip: Allow perform_gunzip() to be called multiple times To: Julien Grall Cc: bertrand.marquis@arm.com, Julien Grall , Andrew Cooper , George Dunlap , Ian Jackson , Stefano Stabellini , Wei Liu , xen-devel@lists.xenproject.org References: <20210402152105.29387-1-julien@xen.org> <20210402152105.29387-3-julien@xen.org> From: Jan Beulich Message-ID: <2caf0bed-9a31-64a8-e764-2ed222f2e828@suse.com> Date: Wed, 7 Apr 2021 12:39:39 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20210402152105.29387-3-julien@xen.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 02.04.2021 17:21, Julien Grall wrote: > --- a/xen/common/inflate.c > +++ b/xen/common/inflate.c > @@ -238,6 +238,12 @@ STATIC const ush mask_bits[] = { > static unsigned long INITDATA malloc_ptr; > static int INITDATA malloc_count; > > +static void init_allocator(void) > +{ > + malloc_ptr = free_mem_ptr; > + malloc_count = 0; > +} > + > static void *INIT malloc(int size) > { > void *p; I'm sorry for noticing this only now, but I'm afraid this may break the build in certain environments / configurations. Iirc clang is relatively likely to not inline functions in debug builds even when they're used just once. Yet when the new function doesn't end up getting inlined, it needs INIT added or else the cmd_obj_init_o checking would find a non-empty .text section. (If there's no actual build breakage anywhere, I can also address this in my to-be-re-based "gunzip: drop INIT{,DATA} and STATIC", which is intended to go in as soon as the tree is fully open again.) Jan