]> git.proxmox.com Git - pve-kernel.git/blame - patches/kernel/0110-bitops-Revert-cbe96375025e-bitops-Add-clear-set_bit3.patch
update ZFS to 0.7.4 + ARC hit rate cherry-pick
[pve-kernel.git] / patches / kernel / 0110-bitops-Revert-cbe96375025e-bitops-Add-clear-set_bit3.patch
CommitLineData
59d5af67 1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
321d628a
FG
2From: Thomas Gleixner <tglx@linutronix.de>
3Date: Thu, 2 Nov 2017 13:30:03 +0100
59d5af67
FG
4Subject: [PATCH] bitops: Revert cbe96375025e ("bitops: Add clear/set_bit32()
5 to linux/bitops.h")
321d628a
FG
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10CVE-2017-5754
11
12These ops are not endian safe and may break on architectures which have
13aligment requirements.
14
15Reverts: cbe96375025e ("bitops: Add clear/set_bit32() to linux/bitops.h")
16Reported-by: Peter Zijlstra <peterz@infradead.org>
17Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
18Cc: Andi Kleen <ak@linux.intel.com>
19(cherry picked from commit 1943dc07b45e347c52c1bfdd4a37e04a86e399aa)
20Signed-off-by: Andy Whitcroft <apw@canonical.com>
21Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
22(cherry picked from commit adb64d8c852206281ea6ee6590ae35076a219409)
23Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
24---
25 include/linux/bitops.h | 26 --------------------------
26 1 file changed, 26 deletions(-)
27
28diff --git a/include/linux/bitops.h b/include/linux/bitops.h
29index eb257a96db6d..a83c822c35c2 100644
30--- a/include/linux/bitops.h
31+++ b/include/linux/bitops.h
32@@ -226,32 +226,6 @@ static inline unsigned long __ffs64(u64 word)
33 return __ffs((unsigned long)word);
34 }
35
36-/*
37- * clear_bit32 - Clear a bit in memory for u32 array
38- * @nr: Bit to clear
39- * @addr: u32 * address of bitmap
40- *
41- * Same as clear_bit, but avoids needing casts for u32 arrays.
42- */
43-
44-static __always_inline void clear_bit32(long nr, volatile u32 *addr)
45-{
46- clear_bit(nr, (volatile unsigned long *)addr);
47-}
48-
49-/*
50- * set_bit32 - Set a bit in memory for u32 array
51- * @nr: Bit to clear
52- * @addr: u32 * address of bitmap
53- *
54- * Same as set_bit, but avoids needing casts for u32 arrays.
55- */
56-
57-static __always_inline void set_bit32(long nr, volatile u32 *addr)
58-{
59- set_bit(nr, (volatile unsigned long *)addr);
60-}
61-
62 #ifdef __KERNEL__
63
64 #ifndef set_mask_bits
65--
662.14.2
67