]> git.ipfire.org Git - people/ms/linux.git/blobdiff - lib/bitmap.c
Importing "grsecurity-3.1-3.19.2-201503201903.patch"
[people/ms/linux.git] / lib / bitmap.c
index 324ea9eab8c1c6f2abbe6daf546370f0cdbafa5b..46b1ae22361fbbc147f336023027ee4387b16694 100644 (file)
@@ -271,7 +271,7 @@ int __bitmap_subset(const unsigned long *bitmap1,
 }
 EXPORT_SYMBOL(__bitmap_subset);
 
-int __bitmap_weight(const unsigned long *bitmap, unsigned int bits)
+int __intentional_overflow(-1) __bitmap_weight(const unsigned long *bitmap, unsigned int bits)
 {
        unsigned int k, lim = bits/BITS_PER_LONG;
        int w = 0;
@@ -437,7 +437,7 @@ int __bitmap_parse(const char *buf, unsigned int buflen,
 {
        int c, old_c, totaldigits, ndigits, nchunks, nbits;
        u32 chunk;
-       const char __user __force *ubuf = (const char __user __force *)buf;
+       const char __user *ubuf = (const char __force_user *)buf;
 
        bitmap_zero(maskp, nmaskbits);
 
@@ -522,7 +522,7 @@ int bitmap_parse_user(const char __user *ubuf,
 {
        if (!access_ok(VERIFY_READ, ubuf, ulen))
                return -EFAULT;
-       return __bitmap_parse((const char __force *)ubuf,
+       return __bitmap_parse((const char __force_kernel *)ubuf,
                                ulen, 1, maskp, nmaskbits);
 
 }
@@ -640,7 +640,7 @@ static int __bitmap_parselist(const char *buf, unsigned int buflen,
 {
        unsigned a, b;
        int c, old_c, totaldigits;
-       const char __user __force *ubuf = (const char __user __force *)buf;
+       const char __user *ubuf = (const char __force_user *)buf;
        int exp_digit, in_range;
 
        totaldigits = c = 0;
@@ -735,7 +735,7 @@ int bitmap_parselist_user(const char __user *ubuf,
 {
        if (!access_ok(VERIFY_READ, ubuf, ulen))
                return -EFAULT;
-       return __bitmap_parselist((const char __force *)ubuf,
+       return __bitmap_parselist((const char __force_kernel *)ubuf,
                                        ulen, 1, maskp, nmaskbits);
 }
 EXPORT_SYMBOL(bitmap_parselist_user);