mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: James Morris <jmorris@redhat.com>,
	"Randy.Dunlap" <rddunlap@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: selinux build failure
Date: Sun, 24 Aug 2003 02:21:08 +0200	[thread overview]
Message-ID: <200308250006.h7P06Ax0022635@post.webmailer.de> (raw)
In-Reply-To: <o4YO.1Fl.21@gated-at.bofh.it>

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"

       reply	other threads:[~2003-08-25  0:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <o4Fj.1rw.9@gated-at.bofh.it>
     [not found] ` <o4YO.1Fl.21@gated-at.bofh.it>
2003-08-24  0:21   ` Arnd Bergmann [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200308250006.h7P06Ax0022635@post.webmailer.de \
    --to=arnd@arndb.de \
    --cc=jmorris@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®