[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH][xennet] 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 xennet_coinst.dll Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> --- vs2019/xennet/xennet.vcxproj | 9 ++++++++- vs2019/xennet_coinst/xennet_coinst.vcxproj | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/vs2019/xennet/xennet.vcxproj b/vs2019/xennet/xennet.vcxproj index cee1325..469ad09 100644 --- a/vs2019/xennet/xennet.vcxproj +++ b/vs2019/xennet/xennet.vcxproj @@ -21,6 +21,7 @@ </PropertyGroup> <ItemDefinitionGroup> <ClCompile> + <AdditionalOptions>/ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions> <PreprocessorDefinitions>PROJECT=$(ProjectName);NDIS_MINIPORT_DRIVER;NDIS_WDM=1;NDIS630_MINIPORT=1;NDIS660_MINIPORT=1;NDIS685_MINIPORT=1;POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <IntrinsicFunctions>true</IntrinsicFunctions> <AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;</AdditionalIncludeDirectories> @@ -32,7 +33,6 @@ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <AdditionalDependencies>$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/aux_klib.lib;$(DDK_LIB_PATH)/procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies> <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> <CETCompat>true</CETCompat> @@ -45,11 +45,18 @@ <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/xennet_coinst/xennet_coinst.vcxproj b/vs2019/xennet_coinst/xennet_coinst.vcxproj index d2c5d07..ea789f0 100644 --- a/vs2019/xennet_coinst/xennet_coinst.vcxproj +++ b/vs2019/xennet_coinst/xennet_coinst.vcxproj @@ -19,6 +19,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 @@ <Link> <ModuleDefinitionFile>../../src/coinst/xennet_coinst.def</ModuleDefinitionFile> <AdditionalDependencies>setupapi.lib;iphlpapi.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 |