* Re: selinux build failure
[not found] ` <o4YO.1Fl.21@gated-at.bofh.it>
@ 2003-08-24 0:21 ` Arnd Bergmann
2003-08-25 16:50 ` Randy.Dunlap
0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2003-08-24 0:21 UTC (permalink / raw)
To: James Morris, Randy.Dunlap, linux-kernel
James Morris wrote:
> On Sun, 24 Aug 2003, Christoph Hellwig wrote:
>
>> Argg, this is b0rked. {asm,linux}/compat.h are for the 32bit compatiblity
>> code. 64bit arches don't have fcntl64 - see the #if BITS_PER_LONG == 32
>> around sys_fcntl64 in fcntl.c..
>
> Indeed. How about this?
Fixes the problem on 64 bit s390. I still get a __you_cannot_kmalloc_that_much
link error in avtab_init() and some more warnings about selinux:
security/selinux/hooks.c: In function `selinux_bprm_set_security':
security/selinux/hooks.c:1384: warning: cast to pointer from integer of different size
security/selinux/hooks.c:1430: warning: cast to pointer from integer of different size
security/selinux/hooks.c: In function `selinux_bprm_compute_creds':
security/selinux/hooks.c:1520: warning: cast from pointer to integer of different size
security/selinux/hooks.c: In function `selinux_getprocattr':
security/selinux/hooks.c:3147: warning: passing arg 3 of `security_sid_to_context' from incompatible pointer type
security/selinux/ss/ebitmap.c: In function `ebitmap_read':
security/selinux/ss/ebitmap.c:255: warning: int format, different type arg (arg 3)
security/selinux/ss/ebitmap.c:264: warning: int format, different type arg (arg 3)
security/selinux/ss/ebitmap.c:287: warning: int format, different type arg (arg 3)
security/selinux/ss/ebitmap.c:293: warning: int format, different type arg (arg 3)
security/selinux/ss/policydb.c: In function `policydb_read':
security/selinux/ss/policydb.c:1078: warning: int format, different type arg (arg 3)
The link error can be avoided by using vmalloc for htable, but there
may be better solutions.
===== security/selinux/ss/avtab.c 1.1 vs edited =====
--- 1.1/security/selinux/ss/avtab.c Thu Jul 17 11:38:01 2003
+++ edited/security/selinux/ss/avtab.c Sun Aug 24 02:02:24 2003
@@ -106,7 +106,7 @@
}
h->htable[i] = NULL;
}
- kfree(h->htable);
+ vfree(h->htable);
}
@@ -138,7 +138,7 @@
{
int i;
- h->htable = kmalloc(sizeof(*(h->htable)) * AVTAB_SIZE, GFP_KERNEL);
+ h->htable = vmalloc(sizeof(*(h->htable)) * AVTAB_SIZE);
if (!h->htable)
return -ENOMEM;
for (i = 0; i < AVTAB_SIZE; i++)
===== security/selinux/ss/global.h 1.2 vs edited =====
--- 1.2/security/selinux/ss/global.h Sun Aug 10 13:22:59 2003
+++ edited/security/selinux/ss/global.h Sun Aug 24 02:09:28 2003
@@ -8,6 +8,7 @@
#include <linux/in.h>
#include <linux/spinlock.h>
#include <linux/sched.h>
+#include <linux/vmalloc.h>
#include "flask.h"
#include "avc.h"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: selinux build failure
2003-08-24 0:21 ` selinux build failure Arnd Bergmann
@ 2003-08-25 16:50 ` Randy.Dunlap
2003-08-26 0:12 ` James Morris
0 siblings, 1 reply; 7+ messages in thread
From: Randy.Dunlap @ 2003-08-25 16:50 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: jmorris, linux-kernel
On Sun, 24 Aug 2003 02:21:08 +0200 Arnd Bergmann <arnd@arndb.de> wrote:
| James Morris wrote:
|
| > On Sun, 24 Aug 2003, Christoph Hellwig wrote:
| >
| >> Argg, this is b0rked. {asm,linux}/compat.h are for the 32bit compatiblity
| >> code. 64bit arches don't have fcntl64 - see the #if BITS_PER_LONG == 32
| >> around sys_fcntl64 in fcntl.c..
| >
| > Indeed. How about this?
Yes, the second patch fixes for me also. [2.6.0-test4 now]
I also see the warnings below.
| security/selinux/hooks.c: In function `selinux_bprm_set_security':
| security/selinux/hooks.c:1384: warning: cast to pointer from integer of different size
| security/selinux/hooks.c:1430: warning: cast to pointer from integer of different size
| security/selinux/hooks.c: In function `selinux_bprm_compute_creds':
| security/selinux/hooks.c:1520: warning: cast from pointer to integer of different size
| security/selinux/hooks.c: In function `selinux_getprocattr':
| security/selinux/hooks.c:3147: warning: passing arg 3 of `security_sid_to_context' from incompatible pointer type
Thanks.
--
~Randy [mantra: Always include kernel version.]
"Everything is relative."
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: selinux build failure
2003-08-25 16:50 ` Randy.Dunlap
@ 2003-08-26 0:12 ` James Morris
0 siblings, 0 replies; 7+ messages in thread
From: James Morris @ 2003-08-26 0:12 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: Arnd Bergmann, linux-kernel, Stephen Smalley
On Mon, 25 Aug 2003, Randy.Dunlap wrote:
> Yes, the second patch fixes for me also. [2.6.0-test4 now]
> I also see the warnings below.
>
> | security/selinux/hooks.c: In function `selinux_bprm_set_security':
> | security/selinux/hooks.c:1384: warning: cast to pointer from integer of different size
> | security/selinux/hooks.c:1430: warning: cast to pointer from integer of different size
> | security/selinux/hooks.c: In function `selinux_bprm_compute_creds':
> | security/selinux/hooks.c:1520: warning: cast from pointer to integer of different size
> | security/selinux/hooks.c: In function `selinux_getprocattr':
> | security/selinux/hooks.c:3147: warning: passing arg 3 of `security_sid_to_context' from incompatible pointer type
>
Yep, a fix for this is forthcoming.
- James
--
James Morris
<jmorris@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: selinux build failure
2003-08-24 15:02 ` Christoph Hellwig
@ 2003-08-24 15:25 ` James Morris
0 siblings, 0 replies; 7+ messages in thread
From: James Morris @ 2003-08-24 15:25 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Randy.Dunlap, linux-kernel, linux-ia64, sds
On Sun, 24 Aug 2003, Christoph Hellwig wrote:
> Argg, this is b0rked. {asm,linux}/compat.h are for the 32bit compatiblity
> code. 64bit arches don't have fcntl64 - see the #if BITS_PER_LONG == 32
> around sys_fcntl64 in fcntl.c..
Indeed. How about this?
- James
--
James Morris
<jmorris@redhat.com>
diff -urN -X dontdiff linux-2.6.0-test4.orig/security/selinux/hooks.c linux-2.6.0-test4.w1/security/selinux/hooks.c
--- linux-2.6.0-test4.orig/security/selinux/hooks.c 2003-08-23 11:53:14.000000000 +1000
+++ linux-2.6.0-test4.w1/security/selinux/hooks.c 2003-08-25 01:23:11.690432168 +1000
@@ -2057,9 +2057,11 @@
case F_GETLK:
case F_SETLK:
case F_SETLKW:
+#if BITS_PER_LONG == 32
case F_GETLK64:
case F_SETLK64:
case F_SETLKW64:
+#endif
if (!file->f_dentry || !file->f_dentry->d_inode) {
err = -EINVAL;
break;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: selinux build failure
2003-08-24 14:49 ` James Morris
@ 2003-08-24 15:02 ` Christoph Hellwig
2003-08-24 15:25 ` James Morris
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2003-08-24 15:02 UTC (permalink / raw)
To: James Morris; +Cc: Randy.Dunlap, linux-kernel, linux-ia64, sds
On Mon, Aug 25, 2003 at 12:49:52AM +1000, James Morris wrote:
> > see a good way to #include asm/compat.h, nor is it available for all
> > processor architectures.
>
> It is available via <linux/compat.h> if CONFIG_COMPAT is defined.
>
> Does the patch below fix this for you?
Argg, this is b0rked. {asm,linux}/compat.h are for the 32bit compatiblity
code. 64bit arches don't have fcntl64 - see the #if BITS_PER_LONG == 32
around sys_fcntl64 in fcntl.c..
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: selinux build failure
2003-08-23 4:27 Randy.Dunlap
@ 2003-08-24 14:49 ` James Morris
2003-08-24 15:02 ` Christoph Hellwig
0 siblings, 1 reply; 7+ messages in thread
From: James Morris @ 2003-08-24 14:49 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: linux-kernel, linux-ia64, sds
On Fri, 22 Aug 2003, Randy.Dunlap wrote:
> selinux/hooks.c won't build on ia64.
> 2.6.0-test3 + ia64 patch or 2.6.0-test4.
>
> security/selinux/hooks.c: In function `selinux_file_fcntl':
> security/selinux/hooks.c:2032: error: `F_GETLK64' undeclared (first use in
> this function) security/selinux/hooks.c:2033: error: `F_SETLK64' undeclared
> (first use in this function) security/selinux/hooks.c:2034: error:
> `F_SETLKW64' undeclared (first use in this function)
>
> The __64 versions of these are defined in include/asm-ia64/compat.h. I don't
> see a good way to #include asm/compat.h, nor is it available for all
> processor architectures.
It is available via <linux/compat.h> if CONFIG_COMPAT is defined.
Does the patch below fix this for you?
- James
--
James Morris
<jmorris@redhat.com>
diff -urN -X dontdiff linux-2.6.0-test4.orig/security/selinux/hooks.c linux-2.6.0-test4.w1/security/selinux/hooks.c
--- linux-2.6.0-test4.orig/security/selinux/hooks.c 2003-08-23 11:53:14.000000000 +1000
+++ linux-2.6.0-test4.w1/security/selinux/hooks.c 2003-08-25 00:31:58.655604472 +1000
@@ -44,6 +44,7 @@
#include <linux/ext2_fs.h>
#include <linux/proc_fs.h>
#include <linux/kd.h>
+#include <linux/compat.h>
#include <net/icmp.h>
#include <net/ip.h> /* for sysctl_local_port_range[] */
#include <net/tcp.h> /* struct or_callable used in sock_rcv_skb */
^ permalink raw reply [flat|nested] 7+ messages in thread
* selinux build failure
@ 2003-08-23 4:27 Randy.Dunlap
2003-08-24 14:49 ` James Morris
0 siblings, 1 reply; 7+ messages in thread
From: Randy.Dunlap @ 2003-08-23 4:27 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-ia64, sds, jmorris
selinux/hooks.c won't build on ia64.
2.6.0-test3 + ia64 patch or 2.6.0-test4.
security/selinux/hooks.c: In function `selinux_file_fcntl':
security/selinux/hooks.c:2032: error: `F_GETLK64' undeclared (first use in
this function) security/selinux/hooks.c:2033: error: `F_SETLK64' undeclared
(first use in this function) security/selinux/hooks.c:2034: error:
`F_SETLKW64' undeclared (first use in this function)
The __64 versions of these are defined in include/asm-ia64/compat.h. I don't
see a good way to #include asm/compat.h, nor is it available for all
processor architectures.
~Randy
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-08-26 0:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <o4Fj.1rw.9@gated-at.bofh.it>
[not found] ` <o4YO.1Fl.21@gated-at.bofh.it>
2003-08-24 0:21 ` selinux build failure Arnd Bergmann
2003-08-25 16:50 ` Randy.Dunlap
2003-08-26 0:12 ` James Morris
2003-08-23 4:27 Randy.Dunlap
2003-08-24 14:49 ` James Morris
2003-08-24 15:02 ` Christoph Hellwig
2003-08-24 15:25 ` James Morris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).