[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH][xenvif] 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 xenvif_coinst.dll Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> --- vs2019/xenvif/xenvif.vcxproj | 8 +++++++- vs2019/xenvif_coinst/xenvif_coinst.vcxproj | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/vs2019/xenvif/xenvif.vcxproj b/vs2019/xenvif/xenvif.vcxproj index 39427b7..52473b8 100644 --- a/vs2019/xenvif/xenvif.vcxproj +++ b/vs2019/xenvif/xenvif.vcxproj @@ -19,6 +19,7 @@ </PropertyGroup> <ItemDefinitionGroup> <ClCompile> + <AdditionalOptions>/ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions> <AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>PROJECT=$(ProjectName);POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <IntrinsicFunctions>true</IntrinsicFunctions> @@ -30,7 +31,6 @@ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <AdditionalDependencies>$(DDK_LIB_PATH)/Rtlver.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/aux_klib.lib;$(DDK_LIB_PATH)/ksecdd.lib;$(DDK_LIB_PATH)/procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies> <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> <CETCompat>true</CETCompat> @@ -43,11 +43,17 @@ <ClCompile> <PreprocessorDefinitions>__i386__;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> + <Link> + <ImageHasSafeExceptionHandlers>true</ImageHasSafeExceptionHandlers> + </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Platform)'=='x64'"> <ClCompile> <PreprocessorDefinitions>__x86_64__;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> + <Link> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)'=='Windows 8 Release'"> <ClCompile> diff --git a/vs2019/xenvif_coinst/xenvif_coinst.vcxproj b/vs2019/xenvif_coinst/xenvif_coinst.vcxproj index ccf4135..ae187fc 100644 --- a/vs2019/xenvif_coinst/xenvif_coinst.vcxproj +++ b/vs2019/xenvif_coinst/xenvif_coinst.vcxproj @@ -22,6 +22,8 @@ </PropertyGroup> <ItemDefinitionGroup> <ClCompile> + <AdditionalOptions>/ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions> + <SDLCheck>true</SDLCheck> <PreprocessorDefinitions>PROJECT=$(ProjectName);%(PreprocessorDefinitions)</PreprocessorDefinitions> <WarningLevel>EnableAllWarnings</WarningLevel> <DisableSpecificWarnings>4127;4548;4711;4820;4668;4255;5045;6001;6054;26052;28196;%(DisableSpecificWarnings)</DisableSpecificWarnings> @@ -33,6 +35,7 @@ <Link> <ModuleDefinitionFile>../../src/coinst/xenvif_coinst.def</ModuleDefinitionFile> <AdditionalDependencies>setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies> + <CETCompat>true</CETCompat> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> -- 2.32.0.windows.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |