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

Re: compat code lacks support for __attribute__


  • To: Olaf Hering <olaf@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 16 Jun 2023 12:07:20 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1GCVSF+xRa5nKArnmz74uJeaknbxVohR+Sa76QFPa7U=; b=GBgdGe+RTLhcBcWsjlklBah37liVzDfKjymgJrGwRoEvMgvuT6basErl8wyapPq1BDgAZP3ZFRp/yJM2oZ1iY9kRn31nuKYz8dN5LH+FzUx5eBPxgBV6luGywG6DqGZhaw1iX31iIUyW88hJIgdHr74cgsczYCfpbv8vJK5pwDsDXRHqxDdEFxVWS7VA8jceyiuNSB5WFU78p6cqDp0Q/Sd80Zoi2VTMjf+lSeACy9yEgW+hb4w92RQDYAy/UlGfAy3brJs3VtYvPLO36XVWgTDCCKuzqeKWvdNUjsV2y3y4s6e1pjUKep/vOjNIzDr3nU+7BhZ6CJD483hskri/MA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gl3JfBrALmCqmpK3Ws6LnQ6cEz6LWUmUg1dKyMCNssEWZDojM68Z5sm1qzgU/Wr4VCoJCZf0sEsCuxDAn8tpQE2QmUqIhISxlYvDxmGfLaoCaQ5wJkvnOI5q/BqUdsEcQl1jOsAk0TyneSDGjTzv4P+WlxSn6kr++8zZbMp17xRWcucrTww4YI4SRC5Uz9Xo5keAKi0c4W6ABEcWg+oVOx+7XizIpSMgiQ39VuNoe/EUxLkzpatKIzRfQH5MXb2ji3xT9YC00wBtQZZCpS4Y2znpRPQooRhDbNQ0iNl+CvJLN6PHBIZyMKRwAhBXi1DZaMw4wN9Y+MzM8Fc1AmZwZg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 16 Jun 2023 10:07:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16.06.2023 11:51, Olaf Hering wrote:
> Wed, 14 Jun 2023 11:49:35 +0200 Jan Beulich <jbeulich@xxxxxxxx>:
> 
>> However, if you're after adding packed attributes, and if you're
>> meaning to only communicate between Xen and the tool stack, then
>> the requirement above doesn't exist. Yet then I would also wonder
>> whether you need any compat translation in the first place. Those
>> packed structures would better be arch-/bitness-agnostic, wouldn't
>> they? So perhaps we could arrange for your additions to be excluded
>> from the compat translation machinery?
> 
> The change below works for me. I wonder if any special compat handling
> for t_buf and t_rec is required. To me it looks like only uint32_t is
> used, which will most likely cause no unexpected alignment issues.

No special handling is needed, indeed, but ...

> --- a/xen/common/trace.c
> +++ b/xen/common/trace.c
> @@ -34,15 +34,6 @@
>  #include <asm/atomic.h>
>  #include <public/sysctl.h>
>  
> -#ifdef CONFIG_COMPAT
> -#include <compat/trace.h>
> -#define xen_t_buf t_buf
> -CHECK_t_buf;

... you're removing the line that's actually verifying this is the case.

Jan



 


Rackspace

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