Merge 5.0-rc4 into char-misc-next
We need the char-misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -23,10 +23,6 @@ depfile = $(subst $(comma),_,$(dot-target).d)
|
||||
# filename of target with directory and extension stripped
|
||||
basetarget = $(basename $(notdir $@))
|
||||
|
||||
###
|
||||
# filename of first prerequisite with directory and extension stripped
|
||||
baseprereq = $(basename $(notdir $<))
|
||||
|
||||
###
|
||||
# Escape single quote for use in echo statements
|
||||
escsq = $(subst $(squote),'\$(squote)',$1)
|
||||
|
||||
@@ -32,7 +32,7 @@ type T;
|
||||
(T *)
|
||||
\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
|
||||
kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|vmalloc\|vzalloc\|
|
||||
dma_alloc_coherent\|dma_zalloc_coherent\|devm_kmalloc\|devm_kzalloc\|
|
||||
dma_alloc_coherent\|devm_kmalloc\|devm_kzalloc\|
|
||||
kvmalloc\|kvzalloc\|kvmalloc_node\|kvzalloc_node\|pci_alloc_consistent\|
|
||||
pci_zalloc_consistent\|kmem_alloc\|kmem_zalloc\|kmem_zone_alloc\|
|
||||
kmem_zone_zalloc\|vmalloc_node\|vzalloc_node\)(...)
|
||||
@@ -55,7 +55,7 @@ type r1.T;
|
||||
* (T *)
|
||||
\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
|
||||
kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|vmalloc\|vzalloc\|
|
||||
dma_alloc_coherent\|dma_zalloc_coherent\|devm_kmalloc\|devm_kzalloc\|
|
||||
dma_alloc_coherent\|devm_kmalloc\|devm_kzalloc\|
|
||||
kvmalloc\|kvzalloc\|kvmalloc_node\|kvzalloc_node\|pci_alloc_consistent\|
|
||||
pci_zalloc_consistent\|kmem_alloc\|kmem_zalloc\|kmem_zone_alloc\|
|
||||
kmem_zone_zalloc\|vmalloc_node\|vzalloc_node\)(...)
|
||||
@@ -78,7 +78,7 @@ type r1.T;
|
||||
- (T *)
|
||||
\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
|
||||
kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|vmalloc\|vzalloc\|
|
||||
dma_alloc_coherent\|dma_zalloc_coherent\|devm_kmalloc\|devm_kzalloc\|
|
||||
dma_alloc_coherent\|devm_kmalloc\|devm_kzalloc\|
|
||||
kvmalloc\|kvzalloc\|kvmalloc_node\|kvzalloc_node\|pci_alloc_consistent\|
|
||||
pci_zalloc_consistent\|kmem_alloc\|kmem_zalloc\|kmem_zone_alloc\|
|
||||
kmem_zone_zalloc\|vmalloc_node\|vzalloc_node\)(...)
|
||||
@@ -95,7 +95,7 @@ position p;
|
||||
(T@p *)
|
||||
\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
|
||||
kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|vmalloc\|vzalloc\|
|
||||
dma_alloc_coherent\|dma_zalloc_coherent\|devm_kmalloc\|devm_kzalloc\|
|
||||
dma_alloc_coherent\|devm_kmalloc\|devm_kzalloc\|
|
||||
kvmalloc\|kvzalloc\|kvmalloc_node\|kvzalloc_node\|pci_alloc_consistent\|
|
||||
pci_zalloc_consistent\|kmem_alloc\|kmem_zalloc\|kmem_zone_alloc\|
|
||||
kmem_zone_zalloc\|vmalloc_node\|vzalloc_node\)(...)
|
||||
|
||||
@@ -69,15 +69,6 @@ statement S;
|
||||
- x = (T)vmalloc(E1);
|
||||
+ x = (T)vzalloc(E1);
|
||||
|
|
||||
- x = dma_alloc_coherent(E2,E1,E3,E4);
|
||||
+ x = dma_zalloc_coherent(E2,E1,E3,E4);
|
||||
|
|
||||
- x = (T *)dma_alloc_coherent(E2,E1,E3,E4);
|
||||
+ x = dma_zalloc_coherent(E2,E1,E3,E4);
|
||||
|
|
||||
- x = (T)dma_alloc_coherent(E2,E1,E3,E4);
|
||||
+ x = (T)dma_zalloc_coherent(E2,E1,E3,E4);
|
||||
|
|
||||
- x = kmalloc_node(E1,E2,E3);
|
||||
+ x = kzalloc_node(E1,E2,E3);
|
||||
|
|
||||
@@ -225,7 +216,7 @@ p << r2.p;
|
||||
x << r2.x;
|
||||
@@
|
||||
|
||||
msg="WARNING: dma_zalloc_coherent should be used for %s, instead of dma_alloc_coherent/memset" % (x)
|
||||
msg="WARNING: dma_alloc_coherent use in %s already zeroes out memory, so memset is not needed" % (x)
|
||||
coccilib.report.print_report(p[0], msg)
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
@@ -13,7 +13,7 @@ static unsigned int arm_pertask_ssp_rtl_execute(void)
|
||||
for (insn = get_insns(); insn; insn = NEXT_INSN(insn)) {
|
||||
const char *sym;
|
||||
rtx body;
|
||||
rtx masked_sp;
|
||||
rtx mask, masked_sp;
|
||||
|
||||
/*
|
||||
* Find a SET insn involving a SYMBOL_REF to __stack_chk_guard
|
||||
@@ -33,12 +33,13 @@ static unsigned int arm_pertask_ssp_rtl_execute(void)
|
||||
* produces the address of the copy of the stack canary value
|
||||
* stored in struct thread_info
|
||||
*/
|
||||
mask = GEN_INT(sext_hwi(sp_mask, GET_MODE_PRECISION(Pmode)));
|
||||
masked_sp = gen_reg_rtx(Pmode);
|
||||
|
||||
emit_insn_before(gen_rtx_SET(masked_sp,
|
||||
gen_rtx_AND(Pmode,
|
||||
stack_pointer_rtx,
|
||||
GEN_INT(sp_mask))),
|
||||
mask)),
|
||||
insn);
|
||||
|
||||
SET_SRC(body) = gen_rtx_PLUS(Pmode, masked_sp,
|
||||
@@ -52,6 +53,19 @@ static unsigned int arm_pertask_ssp_rtl_execute(void)
|
||||
#define NO_GATE
|
||||
#include "gcc-generate-rtl-pass.h"
|
||||
|
||||
#if BUILDING_GCC_VERSION >= 9000
|
||||
static bool no(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static void arm_pertask_ssp_start_unit(void *gcc_data, void *user_data)
|
||||
{
|
||||
targetm.have_stack_protect_combined_set = no;
|
||||
targetm.have_stack_protect_combined_test = no;
|
||||
}
|
||||
#endif
|
||||
|
||||
__visible int plugin_init(struct plugin_name_args *plugin_info,
|
||||
struct plugin_gcc_version *version)
|
||||
{
|
||||
@@ -99,5 +113,10 @@ __visible int plugin_init(struct plugin_name_args *plugin_info,
|
||||
register_callback(plugin_info->base_name, PLUGIN_PASS_MANAGER_SETUP,
|
||||
NULL, &arm_pertask_ssp_rtl_pass_info);
|
||||
|
||||
#if BUILDING_GCC_VERSION >= 9000
|
||||
register_callback(plugin_info->base_name, PLUGIN_START_UNIT,
|
||||
arm_pertask_ssp_start_unit, NULL);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -206,4 +206,4 @@ filechk_conf_cfg = $(CONFIG_SHELL) $<
|
||||
$(obj)/%conf-cfg: $(src)/%conf-cfg.sh FORCE
|
||||
$(call filechk,conf_cfg)
|
||||
|
||||
clean-files += conf-cfg
|
||||
clean-files += *conf-cfg
|
||||
|
||||
@@ -2185,7 +2185,7 @@ static void add_intree_flag(struct buffer *b, int is_intree)
|
||||
/* Cannot check for assembler */
|
||||
static void add_retpoline(struct buffer *b)
|
||||
{
|
||||
buf_printf(b, "\n#ifdef RETPOLINE\n");
|
||||
buf_printf(b, "\n#ifdef CONFIG_RETPOLINE\n");
|
||||
buf_printf(b, "MODULE_INFO(retpoline, \"Y\");\n");
|
||||
buf_printf(b, "#endif\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user