forked from Minki/linux
hardening updates for v5.18-rc1-fix1
- Disable CONFIG_HARDENED_USERCOPY_PAGESPAN - DMA: remove CMA code when not buiding CMA -----BEGIN PGP SIGNATURE----- iQJKBAABCgA0FiEEpcP2jyKd1g9yPm4TiXL039xtwCYFAmJF8n0WHGtlZXNjb29r QGNocm9taXVtLm9yZwAKCRCJcvTf3G3AJtdND/9Ppip+WsqdPi7NfTpMoJTMshMc nFTkmC9jAdvXomXjV0ogXNNJASvWRRKfw+I3dsMJd0qedJG1Cw62qRDIXMBB6VZU A46wG3KVSy6LVTVfNZTb74gUucdoRstAhHzY3NssAD7cuQWi+/A96NV9nII83Ft8 ew1zz1evRUdfrTXZvP4NfzVmJsJ0BfuvSf+7f4jy1rDN/COvAIqB4Oyjv4ehWstX jk3DEDQlr13wtbBX5BO/OihbB1Le/v+EpKnthofF+7myv7u6OqSeYq7RGh0n1hEz Q1BSY54WoW3sHY4sjX5j1uVOwW3d0JDfhd8J8ruf79WPnSfoPmP2d1WtUAmkKQgT dbDFDMbsfzZQ/AAK9Eh9FyQIr46jPqZUZYvFNReJLFOebqb4/34e4Z1sovlrOxQF o4mUGMmzpwvjl96QbQb5wcZ8tno67VQ/Wu0fw6m45mbCyN+Pzyos0IAOnbP4nbnx 8jWheAU92mqAn/rWlq39ORTVH3HGh1MZJTNovf/7Cdu5MkjJEUst0sWUaT1I9ngw EgfQPWoeQ8qNsNPdM+ah3p8JXWZcJUjKQB1vuz1ps9XEBcjP12vaVHa1rqkU2VnJ +IK+wZzbbFFrMzCiW82HrtXhNEN6OROlxy8cENg3GVDAmhN0ocVPaBPeVGQjm6MD B6UEb7wpz7GMweP4MQ== =VR9d -----END PGP SIGNATURE----- Merge tag 'hardening-v5.18-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardening updates from Kees Cook: "This addresses an -Warray-bounds warning found under a few ARM defconfigs, and disables long-broken HARDENED_USERCOPY_PAGESPAN" * tag 'hardening-v5.18-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: ARM/dma-mapping: Remove CMA code when not built with CMA usercopy: Disable CONFIG_HARDENED_USERCOPY_PAGESPAN
This commit is contained in:
commit
f87cbd0565
@ -381,6 +381,7 @@ out:
|
||||
*/
|
||||
postcore_initcall(atomic_pool_init);
|
||||
|
||||
#ifdef CONFIG_CMA_AREAS
|
||||
struct dma_contig_early_reserve {
|
||||
phys_addr_t base;
|
||||
unsigned long size;
|
||||
@ -435,6 +436,7 @@ void __init dma_contiguous_remap(void)
|
||||
iotable_init(&map, 1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static int __dma_update_pte(pte_t *pte, unsigned long addr, void *data)
|
||||
{
|
||||
|
@ -88,6 +88,10 @@ extern phys_addr_t arm_lowmem_limit;
|
||||
|
||||
void __init bootmem_init(void);
|
||||
void arm_mm_memblock_reserve(void);
|
||||
#ifdef CONFIG_CMA_AREAS
|
||||
void dma_contiguous_remap(void);
|
||||
#else
|
||||
static inline void dma_contiguous_remap(void) { }
|
||||
#endif
|
||||
|
||||
unsigned long __clear_cr(unsigned long mask);
|
||||
|
@ -12,10 +12,6 @@
|
||||
*/
|
||||
#ifdef CONFIG_CMA_AREAS
|
||||
#define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS)
|
||||
|
||||
#else
|
||||
#define MAX_CMA_AREAS (0)
|
||||
|
||||
#endif
|
||||
|
||||
#define CMA_MAX_NAME 64
|
||||
|
@ -166,7 +166,7 @@ config HARDENED_USERCOPY
|
||||
config HARDENED_USERCOPY_PAGESPAN
|
||||
bool "Refuse to copy allocations that span multiple pages"
|
||||
depends on HARDENED_USERCOPY
|
||||
depends on EXPERT
|
||||
depends on BROKEN
|
||||
help
|
||||
When a multi-page allocation is done without __GFP_COMP,
|
||||
hardened usercopy will reject attempts to copy it. There are,
|
||||
|
Loading…
Reference in New Issue
Block a user