Skip to content

Commit

Permalink
Merge tag 'char-misc-5.5-rc7' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/gregkh/char-misc

Pull char/misc fixes from Greg KH:
 "Here are some small fixes for 5.5-rc7

  Included here are:

   -  two lkdtm fixes

   -  coresight build fix

   -  Documentation update for the hw process document

  All of these have been in linux-next with no reported issues"

* tag 'char-misc-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  Documentation/process: Add Amazon contact for embargoed hardware issues
  lkdtm/bugs: fix build error in lkdtm_UNSET_SMEP
  lkdtm/bugs: Make double-fault test always available
  coresight: etm4x: Fix unused function warning
  • Loading branch information
torvalds committed Jan 18, 2020
2 parents bf3f401 + fb85145 commit f04dba6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Documentation/process/embargoed-hardware-issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ an involved disclosed party. The current ambassadors list:
Red Hat Josh Poimboeuf <[email protected]>
SUSE Jiri Kosina <[email protected]>

Amazon
Amazon Peter Bowen <[email protected]>
Google Kees Cook <[email protected]>
============= ========================================================

Expand Down
13 changes: 6 additions & 7 deletions drivers/hwtracing/coresight/coresight-etm4x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,6 @@ static void etm4_init_trace_id(struct etmv4_drvdata *drvdata)
drvdata->trcid = coresight_get_trace_id(drvdata->cpu);
}

#ifdef CONFIG_CPU_PM
static int etm4_cpu_save(struct etmv4_drvdata *drvdata)
{
int i, ret = 0;
Expand Down Expand Up @@ -1402,17 +1401,17 @@ static struct notifier_block etm4_cpu_pm_nb = {

static int etm4_cpu_pm_register(void)
{
return cpu_pm_register_notifier(&etm4_cpu_pm_nb);
if (IS_ENABLED(CONFIG_CPU_PM))
return cpu_pm_register_notifier(&etm4_cpu_pm_nb);

return 0;
}

static void etm4_cpu_pm_unregister(void)
{
cpu_pm_unregister_notifier(&etm4_cpu_pm_nb);
if (IS_ENABLED(CONFIG_CPU_PM))
cpu_pm_unregister_notifier(&etm4_cpu_pm_nb);
}
#else
static int etm4_cpu_pm_register(void) { return 0; }
static void etm4_cpu_pm_unregister(void) { }
#endif

static int etm4_probe(struct amba_device *adev, const struct amba_id *id)
{
Expand Down
12 changes: 7 additions & 5 deletions drivers/misc/lkdtm/bugs.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ void lkdtm_STACK_GUARD_PAGE_TRAILING(void)

void lkdtm_UNSET_SMEP(void)
{
#ifdef CONFIG_X86_64
#if IS_ENABLED(CONFIG_X86_64) && !IS_ENABLED(CONFIG_UML)
#define MOV_CR4_DEPTH 64
void (*direct_write_cr4)(unsigned long val);
unsigned char *insn;
Expand Down Expand Up @@ -338,13 +338,13 @@ void lkdtm_UNSET_SMEP(void)
native_write_cr4(cr4);
}
#else
pr_err("FAIL: this test is x86_64-only\n");
pr_err("XFAIL: this test is x86_64-only\n");
#endif
}

#ifdef CONFIG_X86_32
void lkdtm_DOUBLE_FAULT(void)
{
#ifdef CONFIG_X86_32
/*
* Trigger #DF by setting the stack limit to zero. This clobbers
* a GDT TLS slot, which is okay because the current task will die
Expand Down Expand Up @@ -373,6 +373,8 @@ void lkdtm_DOUBLE_FAULT(void)
asm volatile ("movw %0, %%ss; addl $0, (%%esp)" ::
"r" ((unsigned short)(GDT_ENTRY_TLS_MIN << 3)));

panic("tried to double fault but didn't die\n");
}
pr_err("FAIL: tried to double fault but didn't die\n");
#else
pr_err("XFAIL: this test is ia32-only\n");
#endif
}

0 comments on commit f04dba6

Please sign in to comment.