[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH][xenvbd] 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 xenvbd_coinst.dll and xencrsh.sys Rule BA2018 (Error, empty SEH table) is still reported for xencrsh.sys Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> --- vs2019/xencrsh/xencrsh.vcxproj | 1 + vs2019/xendisk/xendisk.vcxproj | 10 +++++++--- vs2019/xenvbd/xenvbd.vcxproj | 8 +++++++- vs2019/xenvbd_coinst/xenvbd_coinst.vcxproj | 3 +++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/vs2019/xencrsh/xencrsh.vcxproj b/vs2019/xencrsh/xencrsh.vcxproj index 9f80df3..d9c8bef 100644 --- a/vs2019/xencrsh/xencrsh.vcxproj +++ b/vs2019/xencrsh/xencrsh.vcxproj @@ -19,6 +19,7 @@ </PropertyGroup> <ItemDefinitionGroup> <ClCompile> + <AdditionalOptions>/ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions> <AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>PROJECT=$(ProjectName);POOL_NX_OPTIN=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <IntrinsicFunctions>true</IntrinsicFunctions> diff --git a/vs2019/xendisk/xendisk.vcxproj b/vs2019/xendisk/xendisk.vcxproj index c8370ff..9b4874a 100644 --- a/vs2019/xendisk/xendisk.vcxproj +++ b/vs2019/xendisk/xendisk.vcxproj @@ -19,8 +19,8 @@ </PropertyGroup> <ItemDefinitionGroup> <ClCompile> + <AdditionalOptions>/ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions> <AdditionalIncludeDirectories>..\..\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <BufferSecurityCheck>false</BufferSecurityCheck> <PreprocessorDefinitions>PROJECT=$(ProjectName);POOL_NX_OPTIN=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <IntrinsicFunctions>true</IntrinsicFunctions> <WarningLevel>EnableAllWarnings</WarningLevel> @@ -31,7 +31,6 @@ <AdditionalIncludeDirectories>..\..\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> <CETCompat>true</CETCompat> @@ -44,11 +43,16 @@ <ClCompile> <PreprocessorDefinitions>__i386__;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> - </ItemDefinitionGroup> + <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/xenvbd/xenvbd.vcxproj b/vs2019/xenvbd/xenvbd.vcxproj index 6f68f0c..7cae5f0 100644 --- a/vs2019/xenvbd/xenvbd.vcxproj +++ b/vs2019/xenvbd/xenvbd.vcxproj @@ -19,6 +19,7 @@ </PropertyGroup> <ItemDefinitionGroup> <ClCompile> + <AdditionalOptions>/ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions> <AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>PROJECT=$(ProjectName);POOL_NX_OPTIN=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <IntrinsicFunctions>true</IntrinsicFunctions> @@ -30,7 +31,6 @@ <AdditionalIncludeDirectories>..\..\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <AdditionalDependencies>$(ProjectDir)..\$(ConfigurationName)\$(Platform)\xencrsh.lib;$(DDK_LIB_PATH)/storport.lib;$(DDK_LIB_PATH)/libcntpr.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/xenvbd_coinst/xenvbd_coinst.vcxproj b/vs2019/xenvbd_coinst/xenvbd_coinst.vcxproj index 9a66f45..5a0b918 100644 --- a/vs2019/xenvbd_coinst/xenvbd_coinst.vcxproj +++ b/vs2019/xenvbd_coinst/xenvbd_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> @@ -30,6 +32,7 @@ <Link> <ModuleDefinitionFile>../../src/coinst/xenvbd_coinst.def</ModuleDefinitionFile> <AdditionalDependencies>setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies> + <CETCompat>true</CETCompat> </Link> <ResourceCompile> <AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> -- 2.32.0.windows.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |