This patch adds a new target called `Win10Analyze` to the driver solution.
It enables us to trigger static analysis over the Win10 target.
Since the location of the ruleset of drivers is somewhat random
starting from 1803:
https://www.osr.com/blog/2018/05/21/wdk-1803-ca/
Commit the ruleset inside our repository. This is the same ruleset used for
8,8.1 and 10.
Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Acked-by: Anand Kumar <kumaranand@vmware.com>
<Configuration>Win10 Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Win10Analyze|x64">
+ <Configuration>Win10Analyze</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Win8.1 Debug|x64">
<Configuration>Win8.1 Debug</Configuration>
<Platform>x64</Platform>
<PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
<DriverTargetPlatform>Desktop</DriverTargetPlatform>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'" Label="Configuration">
+ <TargetVersion />
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">10.0</PlatformToolsetVer>
+ <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
+ <DriverTargetPlatform>Desktop</DriverTargetPlatform>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'" Label="Configuration">
<TargetVersion>Windows8</TargetVersion>
<UseDebugLibraries>true</UseDebugLibraries>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
<Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
+ <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
+ </PropertyGroup>
<PropertyGroup>
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
<EnableDeployment>False</EnableDeployment>
<UseLocalTime>true</UseLocalTime>
</Inf2Cat>
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
+ <Inf2Cat>
+ <UseLocalTime>true</UseLocalTime>
+ </Inf2Cat>
+ </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">
<Inf2Cat>
<UseLocalTime>true</UseLocalTime>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
<SignMode>TestSign</SignMode>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
+ <SignMode>TestSign</SignMode>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
<SignMode>TestSign</SignMode>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">
<SignMode>TestSign</SignMode>
</PropertyGroup>
-</Project>
+</Project>
\ No newline at end of file
datapath-windows/Package/package.VcxProj.user \
datapath-windows/include/OvsDpInterfaceExt.h \
datapath-windows/include/OvsDpInterfaceCtExt.h \
+ datapath-windows/misc/DriverRecommendedRules.ruleset \
datapath-windows/misc/OVS.psm1 \
datapath-windows/misc/install.cmd \
datapath-windows/misc/uninstall.cmd \
datapath-windows/ovsext/resource.h
datapath_windows_analyze: all
+ MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win10Analyze"
MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win8.1Analyze"
MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win8Analyze"
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<RuleSet Name="Microsoft Driver Recommended Rules" Description="This rule set contains rules recommended for drivers." ToolsVersion="10.0">
+ <Include Path="NativeRecommendedRules.ruleset" Action="Default" />
+ <Rules AnalyzerId="Microsoft.Analyzers.NativeCodeAnalysis" RuleNamespace="Microsoft.Rules.Native">
+ <Rule Id="C28101" Action="Warning" />
+ <Rule Id="C28110" Action="Warning" />
+ <Rule Id="C28111" Action="Warning" />
+ <Rule Id="C28114" Action="Warning" />
+ <Rule Id="C28120" Action="Warning" />
+ <Rule Id="C28121" Action="Warning" />
+ <Rule Id="C28122" Action="Warning" />
+ <Rule Id="C28123" Action="Warning" />
+ <Rule Id="C28124" Action="Warning" />
+ <Rule Id="C28126" Action="Warning" />
+ <Rule Id="C28127" Action="Warning" />
+ <Rule Id="C28128" Action="Warning" />
+ <Rule Id="C28129" Action="Warning" />
+ <Rule Id="C28131" Action="Warning" />
+ <Rule Id="C28132" Action="Warning" />
+ <Rule Id="C28133" Action="Warning" />
+ <Rule Id="C28134" Action="Warning" />
+ <Rule Id="C28135" Action="Warning" />
+ <Rule Id="C28139" Action="Warning" />
+ <Rule Id="C28141" Action="Warning" />
+ <Rule Id="C28143" Action="Warning" />
+ <Rule Id="C28144" Action="Warning" />
+ <Rule Id="C28145" Action="Warning" />
+ <Rule Id="C28146" Action="Warning" />
+ <Rule Id="C28147" Action="Warning" />
+ <Rule Id="C28150" Action="Warning" />
+ <Rule Id="C28151" Action="Warning" />
+ <Rule Id="C28152" Action="Warning" />
+ <Rule Id="C28153" Action="Warning" />
+ <Rule Id="C28156" Action="Warning" />
+ <Rule Id="C28157" Action="Warning" />
+ <Rule Id="C28158" Action="Warning" />
+ <Rule Id="C28161" Action="Warning" />
+ <Rule Id="C28162" Action="Warning" />
+ <Rule Id="C28165" Action="Warning" />
+ <Rule Id="C28166" Action="Warning" />
+ <Rule Id="C28167" Action="Warning" />
+ <Rule Id="C28168" Action="Warning" />
+ <Rule Id="C28169" Action="Warning" />
+ <Rule Id="C28170" Action="Warning" />
+ <Rule Id="C28171" Action="Warning" />
+ <Rule Id="C28172" Action="Warning" />
+ <Rule Id="C28175" Action="Warning" />
+ <Rule Id="C28176" Action="Warning" />
+ <Rule Id="C28177" Action="Warning" />
+ <Rule Id="C28208" Action="Warning" />
+ <Rule Id="C28260" Action="Warning" />
+ <Rule Id="C28266" Action="Warning" />
+ <Rule Id="C28268" Action="Warning" />
+ <Rule Id="C28601" Action="Warning" />
+ <Rule Id="C28602" Action="Warning" />
+ <Rule Id="C28604" Action="Warning" />
+ <Rule Id="C28615" Action="Warning" />
+ <Rule Id="C28616" Action="Warning" />
+ <Rule Id="C28617" Action="Warning" />
+ <Rule Id="C28623" Action="Warning" />
+ <Rule Id="C28624" Action="Warning" />
+ <Rule Id="C28625" Action="Warning" />
+ <Rule Id="C28636" Action="Warning" />
+ <Rule Id="C28637" Action="Warning" />
+ <Rule Id="C28638" Action="Warning" />
+ <Rule Id="C28639" Action="Warning" />
+ <Rule Id="C28640" Action="Warning" />
+ <Rule Id="C28645" Action="Warning" />
+ <Rule Id="C28648" Action="Warning" />
+ <Rule Id="C28650" Action="Warning" />
+ <Rule Id="C28714" Action="Warning" />
+ <Rule Id="C28715" Action="Warning" />
+ <Rule Id="C28716" Action="Warning" />
+ <Rule Id="C28717" Action="Warning" />
+ <Rule Id="C28719" Action="Warning" />
+ <Rule Id="C28720" Action="Warning" />
+ <Rule Id="C28721" Action="Warning" />
+ <Rule Id="C28726" Action="Warning" />
+ <Rule Id="C28727" Action="Warning" />
+ <Rule Id="C28730" Action="Warning" />
+ <Rule Id="C28735" Action="Warning" />
+ <Rule Id="C28736" Action="Warning" />
+ <Rule Id="C28750" Action="Warning" />
+ <Rule Id="C28751" Action="Warning" />
+ </Rules>
+</RuleSet>
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Win10Analyze|x64 = Win10Analyze|x64
Win10Debug|x64 = Win10Debug|x64
Win10Release|x64 = Win10Release|x64
Win8.1Analyze|x64 = Win8.1Analyze|x64
Win8Release|x64 = Win8Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Analyze|x64.ActiveCfg = Win10Analyze|x64
+ {911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Analyze|x64.Build.0 = Win10Analyze|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Debug|x64.ActiveCfg = Win10 Debug|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Debug|x64.Build.0 = Win10 Debug|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Debug|x64.Deploy.0 = Win10 Debug|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Debug|x64.Build.0 = Win8 Debug|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Release|x64.ActiveCfg = Win8 Release|x64
{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Release|x64.Build.0 = Win8 Release|x64
+ {63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Analyze|x64.ActiveCfg = Win10Analyze|x64
+ {63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Analyze|x64.Build.0 = Win10Analyze|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Debug|x64.ActiveCfg = Win10 Debug|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Debug|x64.Build.0 = Win10 Debug|x64
{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Debug|x64.Deploy.0 = Win10 Debug|x64
<Configuration>Win10 Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Win10Analyze|x64">
+ <Configuration>Win10Analyze</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Win8.1 Debug|x64">
<Configuration>Win8.1 Debug</Configuration>
<Platform>x64</Platform>
<PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
<DriverTargetPlatform>Desktop</DriverTargetPlatform>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'" Label="Configuration">
+ <TargetVersion />
+ <UseDebugLibraries>True</UseDebugLibraries>
+ <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">10.0</PlatformToolsetVer>
+ <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
+ <DriverTargetPlatform>Desktop</DriverTargetPlatform>
+ </PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">
<TargetVersion>Windows8</TargetVersion>
<UseDebugLibraries>True</UseDebugLibraries>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
<ItemGroup Label="WrappedTaskItems">
<ClInclude Include="..\include\OvsDpInterfaceCtExt.h" />
<ClInclude Include="..\include\OvsDpInterfaceExt.h" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
<Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
+ <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
+ <CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <RunCodeAnalysis>true</RunCodeAnalysis>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">
<RunCodeAnalysis>true</RunCodeAnalysis>
+ <CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8Analyze|x64'">
<RunCodeAnalysis>true</RunCodeAnalysis>
+ <CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
<ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib;$(DDK_LIB_PATH)\netio.lib</AdditionalDependencies>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
<MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">true</MultiProcessorCompilation>
<MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">true</MultiProcessorCompilation>
<MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">true</MultiProcessorCompilation>
+ <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">true</MultiProcessorCompilation>
<MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">true</MultiProcessorCompilation>
<MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">true</MultiProcessorCompilation>
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">true</EnablePREfast>
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Win8Analyze|x64'">true</EnablePREfast>
+ <EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">true</EnablePREfast>
</ClCompile>
<Inf>
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">$(Version)</TimeStamp>
</Inf>
<Inf>
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">$(Version)</TimeStamp>
+ <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">$(Version)</TimeStamp>
</Inf>
<Inf>
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">$(Version)</TimeStamp>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Exclude="@(None)" Include="*.def;*.bat;*.hpj;*.asmx" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project>
+</Project>
\ No newline at end of file
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
<SignMode>TestSign</SignMode>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
+ <SignMode>TestSign</SignMode>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
<SignMode>TestSign</SignMode>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">
<SignMode>TestSign</SignMode>
</PropertyGroup>
-</Project>
+</Project>
\ No newline at end of file