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=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 75E5AC433DF for ; Wed, 12 Aug 2020 19:06:56 +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 41E7720838 for ; Wed, 12 Aug 2020 19:06:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=trmm.net header.i=@trmm.net header.b="C5phErcG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41E7720838 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=trmm.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k5w4n-0006gd-Ki; Wed, 12 Aug 2020 19:06:17 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k5w4n-0006gY-1Z for xen-devel@lists.xenproject.org; Wed, 12 Aug 2020 19:06:17 +0000 X-Inumbo-ID: ac6aa626-3b2f-49d1-ad00-0296771c3136 Received: from mail-40131.protonmail.ch (unknown [185.70.40.131]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ac6aa626-3b2f-49d1-ad00-0296771c3136; Wed, 12 Aug 2020 19:06:15 +0000 (UTC) Date: Wed, 12 Aug 2020 19:06:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trmm.net; s=protonmail; t=1597259174; bh=PMownsmUwbuFOlyPi5dhIVFzFQCkS0K9oxg7k6T8eO0=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=C5phErcGsqb+3G+J9KwBuEePspvsgK8/h/mIwOJHG/WDRr/XXlBKZNo9fQIjAwFCT 0jXyOM7S9iON/mXnLVXsBjeEaVHW604PyPh0ANp49jFTdL0nMLPe8V+cOeCruQUs5J RhJVCU9iCicBjK1jLqGhiAOVzacyHRG8gKIkT6bM= To: Andrew Cooper From: Trammell Hudson Cc: Xen-devel Subject: Re: [PATCH] arch/x86/setup.c: Ignore early boot parameters like no-real-mode Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Reply-To: Trammell Hudson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Wednesday, August 12, 2020 8:16 PM, Andrew Cooper wrote: > However, the use of LINE creates problems for livepatch builds, as > it causes the binary diffing tools to believe these changed, based on a > change earlier in the file. Ah, I hadn't considered that. Makes sense that the deterministic __COUNTER__ would be better for many uses. However... One concern is that the __COUNTER__ is per compilation unit, which I think would mean that every file would conflict by creating __setup_str_ign_0 for the first one, __setup_str_ign_1 for the next, etc. Unless they are static scoped or have a variable-name-friendly unique prefix, they aren't suitable for globals that share a namespace. Another is that each evaluation increments it, so the macro would need some tricks to avoid double-evaluation since it both defines __setup_str_ign_XYZ and references it in the __kparam structure. This is in contrast to __LINE__, which is constant in the macro and based on the line where it was invoked so the double evaluation is not a problem. > Instead of opencoding TEMP_NAME(), can we borrow Linux's __UNIQUE_ID() > infrastructure?=C2=A0 COUNTER appears to have existed for ages, and > exists in all of our supported compilers. I'm definitely in favor of borrowing it from Linux, although subject to those two caveats. > If you want, I can sort that out as a prereq patch, and rebase this one > on top? That sounds fine to me. They really are two separate patches. -- Trammell