Wrappers to load bitmaps (Re: [PATCH] Improve ebitmap scanning)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: Stephen Smalley <sds@...>, Paul Moore <paul.moore@...>, <selinux@...>, Yuichi Nakamura <ynakam@...>, James Morris <jmorris@...>, Eric Paris <eparis@...>
Date: Thursday, September 13, 2007 - 9:02 pm

Now I'm improving the performance to scan bitmap in SELinux,
with replacing its original bitmap implementation (ebitmap)
by common bitops like find_next_bit().

I posted a patch to replace them, however, it got a bit complex
bacause we had to translate u64 <--> unsigned long by myself
to adjust between the format of security policy and common bitops.
  http://marc.info/?l=selinux&m=118956715414494&w=2

I have an idea to provide several wrapper functions to copy u64/u32
to/from unsigned long for each architecture.
Maybe, it will be defined as follows:
  int arraycpy_u64_to_ulong(u64 *src, unsigned long *dest, size_t len);
  int arraycpy_ulong_to_u64(unsigned long *src, u64 *dest, size_t len);

I believe this feature will help getting code simpler and reducing bugs
for any other subsystem, not only SELinux, which loads bitmaps from/to
userspace and handle them using common bitops.

Any comment please.

Stephen Smalley wrote:

  <...snip...>


-- 
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai@ak.jp.nec.com>
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Wrappers to load bitmaps (Re: [PATCH] Improve ebitmap scanni..., KaiGai Kohei, (Thu Sep 13, 9:02 pm)