[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86/oprof: fix !HVM && !PV32 build


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 23 Apr 2021 12:04:34 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tluXybjjDoHMux5mWdbQRg/qCP4s7UImVaAgTk8Cm3c=; b=b7YWQhs/oiCIHEeOGI58NnOqGWLmNQsbm2i0bTCnfY7ABEsdec1XNb47k+tGgK2UVtHR66cYZNT18l4Ke1hyQREY+85cuMiuQl3xUTlWVIozJ1cW90ro/JlaYNn2u2QWj8WL3qJnSFrc7nFVRziIke+Bc5VVOy1p9o/k+escKuJ0biBaw8jClTogJ34L6wcmU/kvoRU1SCOYr8PCWekm6G3yu7xr/1rtTEkuuS+9ykdeUf6tvKAXTz4JTVHseoOb9DAPWJ/eMphZJ0uAidZjUcwlgDgJ1qT0Ga7ltXmBITynQ88+ibkW9jYdVtHlK42lAylnFmRy5of3Dbro8x5mWg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MWvV6GkdJxNpRlheTOCUoaJPR2Sh60DpIFH5VYjd6H95x3fUYOFerfjBD/hIlJNe0CQHOnMGKRz45RNmhlBPf3mlM2CER4ETzGsgcNobCBwWmajITe8fVdhepOya7Sk24YUn7L5A8N9RsZDNSVr4zWh7zkdcYz5/tKjBY4WH+X/vaYWpF4Pws5iMk3hDiYq652i5cLnApT2gRnKbfKG8JL6B4vhrdxBQPP2bceiM+PYwg0m1BhtFOlzebC2lOpHtT/yChAez4YUsYFoSqSF68FR+lvlorD6FGwNy4qD/+Oz7c3R0yWisMBg2xObISZ0TPOns3MLbRW5TUoV7Ya4TLg==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 23 Apr 2021 11:04:52 +0000
  • Ironport-hdrordr: A9a23:Zcan7aj7COt0np0XrUG9SUZnlHBQX3Vw3DAbvn1ZSRFFG/Gwv/ uF2NwGyB75jysQUnk8mdaGfJKNW2/Y6IQd2+csFJ+Ydk3DtHGzJI9vqbHjzTrpBjHk+odmup tIW5NVTOf9BV0St6rHySGlDtctx8SG+qi0heHYi0xgVx1udrsI1WdEIyywe3cGIzVuL5w/CZ aa+45jrz2vZXwYYq2Adwc4dsLEoMDGk4+jXAUPAAQp5BLLoTSj7rP7FBbw5GZgbxpkx7A+/W /Z1zHo/6nLiYDG9jbw9U/2q65Xltzo18dZCKW36/Q9Bz3whm+TFf9ccpKYujRdmpDX1H8Ll5 32rw4kL4BP7RrqDxyIiD/M/yWl7zo08X/lzjaj8AneiOj0XigzBcYEpa8xSGqg12MasNtx0L 1G0gui3vI9Z36w/1Welqz1fipnmUaurX0pnfR7tQ04baIkZKJMtotaxUtJEf47bVHHwbo6G+ pjBty03ocyTXqmaRnizw1S6eC3Um92NhmLRVVqgL3u7xFm2Fp9z0ce2fUFmGYB+J8XW/B/lp T5G5Utu7dUQsAMa6VhQM8HXMusE2TIBSnBKWSIPD3cZe86EkOIj6SyzKQ+5emsdpBN5JwumK 7ZWFcdkWIpYUrhBeCHwZUjyGGNfEyNGRDWju1O7ZlwvbPxAJDxNzeYdVwom8y8590CH8zyQZ +ISdBrKs6mCVGrNZdC3gX4VZUXA2IZStcpttEyXE/Lit7XK7ftqvfQfJ/o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cV81oRzpBM2rK6mtyy/TAupM+srprriDKwcCsJD+te7Yjq+juuzpRL+JekukVfNP s9KAPu/waExP97wruv5XQy3aseielZeRrmrFAhfU4VpChKtWnlE0LM9gC2gVca1RSVIWiM4Kug JmxUhEohcyQM5eBwaqVikH0KH6wdpCv+w9pKP/dGyPAxh+UU6T6pHvZoNbdZZ+jlM0Am4B580G 1Gc=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23/04/2021 11:58, Jan Beulich wrote:
> On 23.04.2021 12:51, Andrew Cooper wrote:
>> On 23/04/2021 10:50, Roger Pau Monné wrote:
>>> On Fri, Apr 16, 2021 at 04:20:59PM +0200, Jan Beulich wrote:
>>>> On 16.04.2021 15:41, Andrew Cooper wrote:
>>>>> On 16/04/2021 09:16, Jan Beulich wrote:
>>>>>> clang, at the very least, doesn't like unused inline functions, unless
>>>>>> their definitions live in a header.
>>>>>>
>>>>>> Fixes: d23d792478 ("x86: avoid building COMPAT code when !HVM && !PV32")
>>>>>> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>>>>>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>>>>> I agree this will fix the build.  However, looking at the code, I'm not
>>>>> sure the original CONFIG_COMPAT was correct.  In particular, ...
>>>>>
>>>>>> --- a/xen/arch/x86/oprofile/backtrace.c
>>>>>> +++ b/xen/arch/x86/oprofile/backtrace.c
>>>>>> @@ -43,6 +43,7 @@ dump_hypervisor_backtrace(struct vcpu *v
>>>>>>      return head->ebp;
>>>>>>  }
>>>>>>  
>>>>>> +#ifdef CONFIG_COMPAT
>>>>>>  static inline int is_32bit_vcpu(struct vcpu *vcpu)
>>>>>>  {
>>>>>>      if (is_hvm_vcpu(vcpu))
>>>>> ... this chunk of logic demonstrates that what oprofile is doing isn't
>>>>> related to the Xen ABI in the slightest.
>>>>>
>>>>> I think OProfile is misusing the guest handle infrastructure, and
>>>>> shouldn't be using it for this task.
>>>> I'm afraid I consider this something for another day. Both the
>>>> original #ifdef and the one getting added here are merely
>>>> measures to get things to build.
>>> Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>>>
>>> Without entering on the debate whether CONFIG_COMPAT is the correct
>>> conditional to use it's not making the issue any worse, and it will
>>> allow to unblock the build. We can discuss about the CONFIG_COMPAT
>>> stuff later.
>> I disagree.  Fixing this less effort than the time wasted arguing about
>> fixing it.
>>
>> But if you are going to insist on not fixing it, and putting in a patch
>> like this, then at a minimum, it needs to include a TODO comment stating
>> that the use of CONFIG_COMPAT is bogus and needs fixing.
> I disagree: It is (for now) just you saying this is bogus. The (ab)use
> of the handle infrastructure was there before. You could have sent a
> fix long ago, therefore, if you were thinking this needs fixing.

I only know it needed fixing because you didn't build test your change
in CI.  Don't make it out to be my fault I didn't spot this 6 months ago.

> I can
> see that you have good intentions, but orthogonal issues shouldn't be
> used to block necessary adjustments (and this applies to other pending
> build fixes as well).

You genuinely regressed things for 32bit HVM guests, with the
CONFIG_COMPAT change.

The code may have been using inappropriate interfaces to perform its job
before, but its actually broken now.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.