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

Re: [PATCH] x86: avoid Misra Rule 19.1 violations


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 31 Jul 2023 14:18:03 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3Eh9JS1SrBDY5uy3QTv7zdeTIWuWQXr6sd44AVYXwRA=; b=OuhTzx91k7/oSVTXy/O4aCJ4SwyPGl2FdDSJ2CKe67acl0hK7zM6yTK1cstQoioJ848QVCJraXr9hLLdhRcXJ22YmRIycptWCZldJ7cFg0Ksb1KQV9SEONFo8awM0HN3K5KV7XOZOWYBBIY0jS6fG5vhK16+vWhHhnnvYxqRTftra89JPzZvHnC6oW86zTyHiAfdYzJJjqawNL/Q5kPkCfcd6b+WEO/bIoTdcXGMGWSGeYRuege1Bdx+tkUptcrhp24Azbi3RBAqF16Fw9ipddN1ocOMm2M8OryGfdAdSpKB5NFzgWVZEC3O4oM4Pph5vViA0QOQQb66wMy6t3AA0Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lLC7TPCgdY1d+ZLk9M1XvV4S4ti4MOYjcubZVfjPAc1NFLik4wtq9c1zV9vTZnon0bLtZHsMBlcr4dGLp+mwxgw1hP4a1L1yGNqdoRlNA/gGhQ0eg2jbSeqNCXTfNZnsLvzGjg4BM+i9ak2qSvoxciisRQmDfj4+t3+lp9h3HfiJPWD1b1JNKDOX4Bi8gj5JIbptbZvNvn6YeG2vrUCyW+peIMl8k+T+4sdqGBJ92tSqnbPpiRjNZNtCiZnCp9IsXFUugSZKkU1E8D/UCxFfMdxYG9P3/ZacmgpiDo8QM7vosjeDMAaub//BReXDe7K2vFtfuNsz3pCydOWmPzc1/w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • Delivery-date: Mon, 31 Jul 2023 13:18:21 +0000
  • Ironport-data: A9a23:/STvSakqM7CICODrLlFA4Jbo5gxlJ0RdPkR7XQ2eYbSJt1+Wr1Gzt xIWCjjVMquDMDCnct0nO4vn9kpU6sCGzdBkHFFqrCw2RSMWpZLJC+rCIxarNUt+DCFhoGFPt JxCN4aafKjYaleG+39B55C49SEUOZmgH+a6U6icfHgqH2eIcQ954Tp7gek1n4V0ttawBgKJq LvartbWfVSowFaYCEpNg064gE0p5K2aVA8w5ARkPqgU5waGzhH5MbpETU2PByqgKmVrNrbSq 9brlNmR4m7f9hExPdKp+p6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTbZLwXXx/mTSR9+2d/ f0W3XCGpaXFCYWX8AgVe0Ew/yiTpsSq8pefSZS0mZT7I0Er7xIAahihZa07FdRwxwp5PY1B3 aEmBQofVhaevdyrmZuAau5wr54TLsa+aevzulk4pd3YJdAPZMmbBo/suppf1jp2gd1SF/HDY cZfcSBocBnLfxxIPBEQFY46m+CrwHL4dlW0qnrM/fZxvzeVk1Q3ieC1WDbWUoXiqcF9t0CUv G/ZuU/+BQkXLoe3wjuZ6HO8wOTImEsXXapLTePmpqYz0AL7Kmo7FkNKckWQoMCDhWWXXOxwb HcavXYNov1nnKCsZpynN/Gim1aGtBMBX9tbE8Uh9RqAjKHT5m6xFmUCCzJMdtEinMs3XiAxk E+EmcvzAj5iu6HTTmiSnp+LqRuiNC5TKnUNDQceSgEI+cXk5os6gRTGVN9LGrO6ldDzFnf7x DXihC4/jLIXhIgV2rmh/FbGqzixqYPESAFz7QLSNl9J9St8bY+hIoautl7S6K8YKJ7DFwHZ+ n8Zh8KZ8eYCS4mXkzCAS/kMG7fv4OuZNDrbghhkGJxJGymRxkNPtLt4uFlWTHqF+O5eEdM1S Cc/YT9s2aI=
  • Ironport-hdrordr: A9a23:hf5rz68VEdT67md6J85uk+AEI+orL9Y04lQ7vn2ZKCYlCfBw8v rEoB1173HJYVoqNU3I2urwXJVoOEm8yXct2+ks1NSZLWvbUQmTXflfBOLZqlWLJ8SZzJ856U 4KScdD4bPLYWSSwvyKhzVQvuxQpuWv4eSDv8+b5XFoVARrY6Zr40NCDBqBGEEefngkOXN8Lu vk2vZ6
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17/07/2023 3:13 pm, Jan Beulich wrote:
> Not exactly overlapping accesses to objects on the left and right hand
> sides of an assignment are generally UB, and hence disallowed by Misra.
> While in the specific cases we're talking about here no actual UB can
> result as long as the compiler doesn't act actively "maliciously", let's
> still switch to using casts combined with exactly overlapping accesses.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>



 


Rackspace

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