[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH][xenbus] Fix compiler options
Adds '/ZH:SHA_256' '/CETCOMPAT' '/sdl' to compiler and '/SafeSEH' to x86 linker command lines These changes were prompted by binskim https://github.com/microsoft/binskim Note: Rule BA2004 (Warning_NativeWithInsecureStaticLibraryCompilands) is still reported for xenbus_coinst.dll and xenbus_monitor.exe Rule BA2007 (Error_WarningsDisabled) is still reported for all drivers Rule BA2018 (Error, SSE table is empty) is still reported for x86 xen.sys Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> --- vs2019/xen/xen.vcxproj | 1 + vs2019/xenbus/xenbus.vcxproj | 8 +++++++- vs2019/xenbus_coinst/xenbus_coinst.vcxproj | 3 +++ vs2019/xenbus_monitor/xenbus_monitor.vcxproj | 3 +++ vs2019/xenfilt/xenfilt.vcxproj | 8 +++++++- 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/vs2019/xen/xen.vcxproj b/vs2019/xen/xen.vcxproj index 6aaebf5..f0e1b98 100644 --- a/vs2019/xen/xen.vcxproj +++ b/vs2019/xen/xen.vcxproj @@ -19,6 +19,7 @@ </PropertyGroup> <ItemDefinitionGroup> <ClCompile> + <AdditionalOptions>/ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions> <AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>PROJECT=$(ProjectName);POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <IntrinsicFunctions>true</IntrinsicFunctions> diff --git a/vs2019/xenbus/xenbus.vcxproj b/vs2019/xenbus/xenbus.vcxproj index 00b39a9..d7b94bd 100644 --- a/vs2019/xenbus/xenbus.vcxproj +++ b/vs2019/xenbus/xenbus.vcxproj @@ -19,6 +19,7 @@ </PropertyGroup> <ItemDefinitionGroup> <ClCompile> + <AdditionalOptions>/ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions> <PreprocessorDefinitions>PROJECT=$(ProjectName);POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <IntrinsicFunctions>true</IntrinsicFunctions> <AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;..\..\src\common;</AdditionalIncludeDirectories> @@ -30,7 +31,6 @@ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <AdditionalDependencies>$(ProjectDir)..\$(ConfigurationName)\$(Platform)\xen.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/procgrp.lib;$(DDK_LIB_PATH)/rtlver.lib;%(AdditionalDependencies)</AdditionalDependencies> <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> <CETCompat>true</CETCompat> @@ -43,11 +43,17 @@ <ClCompile> <PreprocessorDefinitions>__i386__;%(PreprocessorDefinitions);_X86_</PreprocessorDefinitions> </ClCompile> + <Link> + <ImageHasSafeExceptionHandlers>true</ImageHasSafeExceptionHandlers> + </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Platform)'=='x64'"> <ClCompile> <PreprocessorDefinitions>__x86_64__;%(PreprocessorDefinitions);_AMD64_</PreprocessorDefinitions> </ClCompile> + <Link> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)'=='Windows 8 Release'"> <ClCompile> diff --git a/vs2019/xenbus_coinst/xenbus_coinst.vcxproj b/vs2019/xenbus_coinst/xenbus_coinst.vcxproj index 2e7a6e7..b37e1a5 100644 --- a/vs2019/xenbus_coinst/xenbus_coinst.vcxproj +++ b/vs2019/xenbus_coinst/xenbus_coinst.vcxproj @@ -18,6 +18,8 @@ </PropertyGroup> <ItemDefinitionGroup> <ClCompile> + <AdditionalOptions>/ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions> + <SDLCheck>true</SDLCheck> <AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>PROJECT=$(ProjectName);%(PreprocessorDefinitions)</PreprocessorDefinitions> <WarningLevel>EnableAllWarnings</WarningLevel> @@ -31,6 +33,7 @@ <ModuleDefinitionFile>../../src/coinst/xenbus_coinst.def</ModuleDefinitionFile> <AdditionalDependencies>setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies> <EnableCOMDATFolding>false</EnableCOMDATFolding> + <CETCompat>true</CETCompat> </Link> <ResourceCompile> <AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> diff --git a/vs2019/xenbus_monitor/xenbus_monitor.vcxproj b/vs2019/xenbus_monitor/xenbus_monitor.vcxproj index 8652ac4..54272ec 100644 --- a/vs2019/xenbus_monitor/xenbus_monitor.vcxproj +++ b/vs2019/xenbus_monitor/xenbus_monitor.vcxproj @@ -22,6 +22,8 @@ </PropertyGroup> <ItemDefinitionGroup> <ClCompile> + <AdditionalOptions>/ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions> + <SDLCheck>true</SDLCheck> <AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>PROJECT=$(ProjectName);WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <WarningLevel>EnableAllWarnings</WarningLevel> @@ -33,6 +35,7 @@ </ClCompile> <Link> <AdditionalDependencies>wtsapi32.lib;cfgmgr32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <CETCompat>true</CETCompat> </Link> <ResourceCompile> <AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> diff --git a/vs2019/xenfilt/xenfilt.vcxproj b/vs2019/xenfilt/xenfilt.vcxproj index ef53280..270d2e4 100644 --- a/vs2019/xenfilt/xenfilt.vcxproj +++ b/vs2019/xenfilt/xenfilt.vcxproj @@ -19,6 +19,7 @@ </PropertyGroup> <ItemDefinitionGroup> <ClCompile> + <AdditionalOptions>/ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions> <PreprocessorDefinitions>PROJECT=$(ProjectName);POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <IntrinsicFunctions>true</IntrinsicFunctions> <AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;..\..\src\common;</AdditionalIncludeDirectories> @@ -30,7 +31,6 @@ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <AdditionalDependencies>$(ProjectDir)..\$(ConfigurationName)\$(Platform)\xen.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies> <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> <CETCompat>true</CETCompat> @@ -43,11 +43,17 @@ <ClCompile> <PreprocessorDefinitions>__i386__;%(PreprocessorDefinitions);_X86_</PreprocessorDefinitions> </ClCompile> + <Link> + <ImageHasSafeExceptionHandlers>true</ImageHasSafeExceptionHandlers> + </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Platform)'=='x64'"> <ClCompile> <PreprocessorDefinitions>__x86_64__;%(PreprocessorDefinitions);_AMD64_</PreprocessorDefinitions> </ClCompile> + <Link> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)'=='Windows 8 Release'"> <ClCompile> -- 2.32.0.windows.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |