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

[PATCH] Add annotation to fix SDV failure


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Wed, 15 Feb 2023 09:36:05 +0000
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Owen Smith <owen.smith@xxxxxxxxxx>, Alex Burke <Alex.Burke@xxxxxxxxxx>
  • Delivery-date: Wed, 15 Feb 2023 09:36:37 +0000
  • Ironport-data: A9a23:+IWWtqOvG/Rij8rvrR3el8FynXyQoLVcMsEvi/4bfWQNrUp2gzNWm mUcWDqGbP3ZNzOheY9/bY2x8k5X65HWz9RjHAto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQAOKnUoYoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGj9Suv3rRC9H5qyo42tC5wFmPJingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0uhQG1pj8 tdGFDxXTRPZ2Ouk2eiaY/Y506zPLOGzVG8eknRpzDWfBvc6W5HTBa7N4Le03h9p2JoIR6yHI ZNEN3w2Nk+ojx5nYz/7DLo5g+quwGL6ciFYgFmUubA28y7YywkZPL3FYYuIIYfXFZU9ckCwg yXZzX6hMykjbPeE4iiM232O2uGRpHauMG4VPOLhraM76LGJ/UQMCRtTTUX+rfSnh0qWX9NEN 1dS6icotbI19kGgUp/6RRLQnZKflkdCAZwKSbR8sVzTjPOOuG51G1ToUBZPT8YdmcgdGwAmj HyKxYzgFyU1kZSKHCf1GqivkRu+Pi0cLGknbCACTBcY79SLnLzfni4jXf44Tvfr04Sd9SXYh mnT8XNg3+l7Ydsjjf3TwLzRv967SnElpCYR7x6fYG+q5xgRiGWNN93xsgizARqtwe+kori9U JoswZP2AAMmV8vleMmxrAMlRunBCxGtblXhbaZHRcVJythU0yfLkXpsyD9/Plx1Fc0PZCXkZ kTe0SsIusANZyr7M/UmOdLrYyjP8UQGPY69PhwzRoATCqWdiSfdpH0+DaJu9z6FfLcQfVEXZ s7ALJfE4YcyAqV71jumL9rxIpdyrh3SMVj7HMihpzz+iOr2WZJgYetdWLd4RrxjvfzsTcS82 4o3CvZmPD0FDLyuMnWMqdVDRb3IRFBiba3LRwVsXrbrCmJb9KsJUZc9HZtJl1RZoplo
  • Ironport-hdrordr: A9a23:fPu5faiBRMYMKlMf9XHxVUc7xXBQXlMji2hC6mlwRA09TyX4ra yTdZEgviMc5wxwZJhNo7G90ey7MArhHLROkO4s1NSZMzUOxlHYSr2KhLGKq1eMJ8S9zJ8k6U 4HSdkENDSaNzZHZKjBkXWFOudl7N6b8L25wcfypk0dMj2CspsQlTuR3Dzrb3FedU19CZ0lD4 rZw8xIqTa6EE5nDPiTNz0+U+/fvM2OsZTpbxIcQzsq9wWK5AnYjYLSIlyj0hACSCMK+Kwl8m TOjmXCl8aemsD+8BPaynTCq69bgd7wjuZEbfb87vQoFg==
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

SDV can detect the BytesNeeded value may be 0, as it cannot determine the value
of some constants.

Signed-off-by: Alex Burke <Alex.Burke@xxxxxxxxxx>
Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 src/xennet/adapter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/xennet/adapter.c b/src/xennet/adapter.c
index 7a083e9..4b449f3 100644
--- a/src/xennet/adapter.c
+++ b/src/xennet/adapter.c
@@ -2130,6 +2130,7 @@ AdapterSetInformation(
         break;
 
     case OID_OFFLOAD_ENCAPSULATION:
+        __analysis_assume(BytesNeeded > 0);
         BytesNeeded = NDIS_SIZEOF_OFFLOAD_ENCAPSULATION_REVISION_1;
         if (BufferLength >= BytesNeeded) {
             ndisStatus = AdapterGetOffloadEncapsulation(Adapter,
-- 
2.39.0.windows.1




 


Rackspace

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