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

Re: [PATCH 2/2] x86/shadow: adjust 2-level case of SHADOW_FOREACH_L2E()


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 15 Oct 2021 12:17:28 +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=1uo8Mv0D2r70UbdMK/P/Vk+E+XAdltSMPlY3GeqN5xc=; b=Xdh+V4sAaKw7CWBKrOfhjmQZnlSiA1La3XhyoBPY1ivys+xsrker0BE0iGZlTILfxmlxr2PB702t2csoFv8qGSsgd0brD5CAfAsL6SVHpFcp/h8VKDM9DUDw1NjDkH/sJWHPFJEYzP0Wt5akGSfO2+njv5OfNfM2cDiuQxht+DX8U++zy6QhAF2vyKI3CX1SzUhQja9B9zx1pVJ7IVsIgJZ4Edf/eUq0ga8rZpZ+mTKkdzsziCQplfSQ5SUREiKOu0DPBVDRABA6WyNlHlUi1YoIXGfocwF97poHir3EPhw0jHtbrJUbD3zlBM4cxM8HdYdc1K7eou7ji3X5ZBeIzA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eJJf0ctgfrD/pwfNrGSe86uv2TIMoEd55A+0KQQY4Pn76Klkf+U/Via79u571ofBrWlWQSz91/HrU3J5e2MRuJeSqkC8rrsD1VIht4160yTRbmUhLYPMbrTef0EuhFyrMFaEnM12hONLSNsnU4uhVjZaiLcAsq0u03N5CUldWFUWUbyybLSWmhzzvUpfc/UiG9VZ3o/sOvYQM32FTN9F9fqWTho014wisIvmeH3OguKqt0sj8PfpxiGjBCihUwwlhoFkDMRV/oH0Iva9SLCqew5CkJ6TI1wJikD/e4yCRwiYhA/rTrvplouSQ5UVVIiL+9iUdeuWnsAAyHmHiw5Ejg==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>
  • Delivery-date: Fri, 15 Oct 2021 11:18:01 +0000
  • Ironport-data: A9a23:zkzNxqwciataWNq369J6t+fCwSrEfRIJ4+MujC+fZmUNrF6WrkUFn DEbXTjXa6mDNjD2KdpzPtnj9U0FsMSEnNVnTQA6rSAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnvopW1TYhSEUOZugH9IQM8aZfHAsLeNYYH1500s6w7dk2tcAbeWRWGthh /uj+6UzB3f9s9JEGjp8B3Wr8U4HUFza4Vv0j3RmDRx5lAa2e0o9VfrzEZqZPXrgKrS4K8bhL wr1IBNVyUuCl/slIovNfr8W6STmSJaKVeSFoiI+t6RPHnGuD8H9u0o2HKN0VKtZt9mGt8htl e9Wj9vvdSwkPavoteUPbTBkFD4raMWq+JefSZS+mcmazkmAeHrw2fR+SkoxOOX0+M4uXzsIr 6ZBbmlQMFbT3Ipaw5riIgVoru0lINPmI8U0vXZ4wCuCJf0nXYrCU+PB4towMDIY250VRaaCN 5BxhTxHVRvaYkd/A2cuWMgFl8b12nvyQj1fkQfAzUYwyzeKl1EguFT3C/LFd9rPSchLk0Kwo mPd43+/EhwcLMaYyzeO7jSrnOCntSHxVZ8WFba43uV3m1DVzWsWYDUKVF6TsfS/zEmkVLp3N Eg86ico668o+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PwPk80kqQFnbX5XI3SITUO3VHHEGgM1/qb/9SNIVyYygcZ79 YbT0EcMqyBMbEZt7eC3ODQKb9Jq7PmgcPY9ts2jU0dKT2CA5sQnjuRYTzrdHGeKjM2Z6bRWK Dsnfau8FGbCAoqh4mAdzY4t6+pnay9qLvWJTo9QzI34giHij2lrJb8Dhijxx8bFxdC260r/2 TpmxHwovzLiYD79jbsk0voq7hGktrozdVOQOSKl8guMz3pziKlfp5oVbGutC085Muv9FEput /RpApIBbU811rhOkWO5Tf90Qjp1zgjr1fk1F+jmHPm5ff0QTorYvAxz75xQ1/80Q4Nrdt82K VE0yayrJxMFy7Nmyz7+pzhSwxqvlDcmwthrccjy1hkFacOYr5YqoISuGlPFo0bIS784Ic7VM FzEcDn4upMe1/yVQGbgoBW+q3pYp0PJGbAfqBb0fbllQS+3UoJj3fw/fZv20vpr/kGOsB5D+ etCNUiqFgBdL5PUUrRbN1xN/dfMVa9NC4kBljiaWgPJJt3SU4llKSHlIndxNvaNaDgn6FC1K gobjtjxCcPkgTVeJaz4KE=
  • Ironport-sdr: RNCy9xWIR22Inh+vqh0P5UKlcfr/tUPfKPa9gcprqZDqBWQQbtNNqGOaxPJ4mx8H+YdN39YsUe 6hYdQf+GThep0cshtRnTQHTKrbRwVvGUxoIMyksFJPk+H/UsIIt+Hg1Dn6sfXh5JRWlxRZyCff DEKg0ETScyFsO+/0YXSf8shFW0N0VzYt6BfHe5D9o1aqgeQS/JIGFmZntS9T6kHHikFXtLepVY eDUDLFbPhouGMR5ci4Cx1bGcY0DxoJjvvxNhmf0Zj07lV0kz/GhR7T0+mnelf2iNwmruHoMA4Y FGx/url0x1tLH8FvB19SG7nj
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13/10/2021 16:38, Jan Beulich wrote:
> Coverity apparently takes issue with the assignment inside an if(), but
> then only in two of the cases (sh_destroy_l2_shadow() and
> sh_unhook_32b_mappings()). As it's pretty simple to break out of the
> outer loop without the need for a local helper variable, adjust the code
> that way.
>
> While there, with the other "unused value" reports also in mind, further
> drop a dead assignment from SHADOW_FOREACH_L1E().
>
> Coverity-ID: 1492857
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> Looking over other SHADOW_FOREACH_L<N>E() invocations wrt their uses of
> "done", I find the audit ones particularly odd: The respective variables
> get set only from AUDIT_FAIL() and AUDIT_FAIL_MIN(), but in both cases
> after invoking BUG(), i.e. in an unreachable position.

Sounds like there is dead code we can drop.

This logic is all horrible.  I think this is an improvement, so
Acked-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®.