Skip to contentSkip to conversation

netlabel: Move bitmap manipulation functions to the NetLabel core.

RFC PATCH In review Huw Davies 1 participant 1 message Feb 17, 2016

Subsystems (4)
lore
Share & tools
lore

Huw Davies

author
#0 lore raw

RFC PATCH v3 9/19 netlabel: Move bitmap manipulation functions to the NetLabel core.

This is to allow the CALIPSO labelling engine to use these.

---
 include/net/netlabel.h       |  6 +++
 net/ipv4/cipso_ipv4.c        | 88 +++++---------------------------------------
 net/netlabel/netlabel_kapi.c | 70 +++++++++++++++++++++++++++++++++++
 3 files changed, 85 insertions(+), 79 deletions(-)
include/net/netlabel.h +6 -0
index 2c0513b..9fc2cab 100644
@@ -434,6 +434,12 @@ int netlbl_catmap_setlong(struct netlbl_lsm_catmap **catmap,
 			  unsigned long bitmap,
 			  gfp_t flags);
 
+/* Bitmap functions
+ */
+int netlbl_bitmap_walk(const unsigned char *bitmap, u32 bitmap_len,
+		       u32 offset, u8 state);
+void netlbl_bitmap_setbit(unsigned char *bitmap, u32 bit, u8 state);
+
 /*
  * LSM protocol operations (NetLabel LSM/kernel API)
  */
net/ipv4/cipso_ipv4.c +9 -79

112 lines not on this page · raw message

net/netlabel/netlabel_kapi.c +70 -0

76 lines not on this page · raw message

Signature · 1 line
2.7.0