Research
.
Skip Search Box

SELinux Mailing List

Re: [PATCH] Warnings and 64bit

From: Stephen Smalley <sds_at_epoch.ncsc.mil>
Date: 07 Oct 2003 16:16:34 -0400


On Tue, 2003-10-07 at 15:29, Thorsten Kukuk wrote:
> Maybe in theory, but in practice you will get a lot of compiler
> warnings on 64it archs like AMD64:
>
> policy_parse.y: In function `define_cexpr':
> policy_parse.y:2644: warning: cast from pointer to integer of different size
> policy_parse.y:2645: warning: cast from pointer to integer of different size
> policy_parse.y:2648: warning: cast from pointer to integer of different size
> policy_parse.y:2649: warning: cast from pointer to integer of different size
>
> while it may be the case, that in this case we know that nothing can
> happen, in 95% of all cases where I saw this warnings the code was
> really broken and needs to be fixed.
>
> So we should make sure that we don't get this warnings, they show
> there can be something go wrong.

Ok, we can look into addressing these warnings, but I don't think that the approach taken by this patch is what we want. It changes __u32 fields in struct constraint_expr into uintptr_t fields, but these fields are only used to store integers and need to be fixed size so that the policy binary representation doesn't change on 64bit.

-- 
Stephen Smalley <sds@epoch.ncsc.mil>
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
Received on Tue 7 Oct 2003 - 16:16:49 EDT
 

Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009

 
bottom

National Security Agency / Central Security Service