drm: mst: Fix query_payload ack reply struct
Subsystems (33)
Sasha Levin
maintainerPATCH 171/177 crypto: vmx - Avoid weird build failures
In reply to Sasha LevinFrom: Michael Ellerman <[email protected]>
[ Upstream commit 4ee812f6143d78d8ba1399671d78c8d78bf2817c ]
In the vmx crypto Makefile we assign to a variable called TARGET and pass that to the aesp8-ppc.pl and ghashp8-ppc.pl scripts.
The variable is meant to describe what flavour of powerpc we're building for, eg. either 32 or 64-bit, and big or little endian.
Unfortunately TARGET is a fairly common name for a make variable, and if it happens that TARGET is specified as a command line parameter to make, the value specified on the command line will override our value.
In particular this can happen if the kernel Makefile is driven by an external Makefile that uses TARGET for something.
This leads to weird build failures, eg:
nonsense at /build/linux/drivers/crypto/vmx/ghashp8-ppc.pl line 45. /linux/drivers/crypto/vmx/Makefile:20: recipe for target 'drivers/crypto/vmx/ghashp8-ppc.S' failed
Which shows that we passed an empty value for $(TARGET) to the perl script, confirmed with make V=1:
perl /linux/drivers/crypto/vmx/ghashp8-ppc.pl > drivers/crypto/vmx/ghashp8-ppc.S
We can avoid this confusion by using override, to tell make that we don't want anything to override our variable, even a value specified on the command line. We can also use a less common name, given the script calls it "flavour", let's use that.
--- drivers/crypto/vmx/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/crypto/vmx/Makefile +3 -3
@@ -3,13 +3,13 @@ obj-$(CONFIG_CRYPTO_DEV_VMX_ENCRYPT) += vmx-crypto.o vmx-crypto-objs := vmx.o aesp8-ppc.o ghashp8-ppc.o aes.o aes_cbc.o aes_ctr.o aes_xts.o ghash.o ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y) -TARGET := linux-ppc64le +override flavour := linux-ppc64le else -TARGET := linux-ppc64 +override flavour := linux-ppc64 endif quiet_cmd_perl = PERL $@ - cmd_perl = $(PERL) $(<) $(TARGET) > $(@) + cmd_perl = $(PERL) $(<) $(flavour) > $(@) targets += aesp8-ppc.S ghashp8-ppc.S
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 172/177 libtraceevent: Fix memory leakage in copy_filter_type
In reply to Sasha LevinFrom: Hewenliang <[email protected]>
[ Upstream commit 10992af6bf46a2048ad964985a5b77464e5563b1 ]
It is necessary to free the memory that we have allocated when error occurs.
--- tools/lib/traceevent/parse-filter.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
tools/lib/traceevent/parse-filter.c +7 -2
@@ -1475,8 +1475,10 @@ static int copy_filter_type(struct event_filter *filter,if (strcmp (str,"TRUE" ) ==0 ||strcmp (str,"FALSE" ) ==0 ) {/* Add trivial event */ arg =allocate_arg (); -if (arg ==NULL ) +if (arg ==NULL ) { +free (str);return -1 ; + } arg->type =FILTER_ARG_BOOLEAN ;if (strcmp (str,"TRUE" ) ==0 )
@@ -1485,8 +1487,11 @@ static int copy_filter_type(struct event_filter *filter, arg->boolean.value =0 ; filter_type =add_filter_type (filter, event->id); -if (filter_type ==NULL ) +if (filter_type ==NULL ) { +free (str); +free_arg (arg);return -1 ; + } filter_type->filter = arg;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 173/177 perf parse: Fix potential memory leak when handling tracepoint errors
In reply to Sasha LevinFrom: Ian Rogers <[email protected]>
[ Upstream commit 4584f084aa9d8033d5911935837dbee7b082d0e9 ]
An error may be in place when tracepoint_error is called, use parse_events__handle_error to avoid a memory leak and to capture the first and last error. Error detected by LLVM's libFuzzer using the following event:
$ perf stat -e 'msr/event/,f:e'
event syntax error: 'msr/event/,f:e'
\___ can't access trace eventsError: No permissions to read /sys/kernel/debug/tracing/events/f/e Hint: Try 'sudo mount -o remount,mode=755 /sys/kernel/debug/tracing/'
Initial error:
event syntax error: 'msr/event/,f:e'
\___ no value assigned for term
Run 'perf list' for a list of valid events
Usage: perf stat [<options>] [<command>]
-e, --event <event> event selector. use 'perf list' to list available events
--- tools/perf/util/parse-events.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
tools/perf/util/parse-events.c +5 -4
@@ -457,6 +457,7 @@ int parse_events_add_cache(struct list_head *list, int *idx,static void tracepoint_error (struct parse_events_error *e,int err,const char *sys,const char *name) { +const char *str;char help[BUFSIZ ];if (!e)
@@ -470,18 +471,18 @@ static void tracepoint_error(struct parse_events_error *e, int err,switch (err) {case EACCES : - e->str =strdup ("can't access trace events" ); + str ="can't access trace events" ;break ;case ENOENT : - e->str =strdup ("unknown tracepoint" ); + str ="unknown tracepoint" ;break ;default : - e->str =strdup ("failed to add tracepoint" ); + str ="failed to add tracepoint" ;break ; }tracing_path__strerror_open_tp (err, help,sizeof (help), sys, name); - e->help =strdup (help); +parse_events__handle_error (e,0 ,strdup (str),strdup (help)); } static int add_tracepoint(struct list_head *list, int *idx,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 174/177 mips: fix build when "48 bits virtual memory" is enabled
In reply to Sasha LevinFrom: Mike Rapoport <[email protected]>
[ Upstream commit 3ed6751bb8fa89c3014399bb0414348499ee202a ]
With CONFIG_MIPS_VA_BITS_48=y the build fails miserably:
CC arch/mips/kernel/asm-offsets.s
In file included from arch/mips/include/asm/pgtable.h:644,
from include/linux/mm.h:99,
from arch/mips/kernel/asm-offsets.c:15:include/asm-generic/pgtable.h:16:2: error: #error CONFIG_PGTABLE_LEVELS is not consistent with __PAGETABLE_{P4D,PUD,PMD}_FOLDED
#error CONFIG_PGTABLE_LEVELS is not consistent with __PAGETABLE_{P4D,PUD,PMD}_FOLDED
^~~~~include/asm-generic/pgtable.h:390:28: error: unknown type name 'p4d_t'; did you mean 'pmd_t'?
static inline int p4d_same(p4d_t p4d_a, p4d_t p4d_b)
^~~~~
pmd_t[ ... more such errors ... ]
scripts/Makefile.build:99: recipe for target 'arch/mips/kernel/asm-offsets.s' failed make[2]: *** [arch/mips/kernel/asm-offsets.s] Error 1
This happens because when CONFIG_MIPS_VA_BITS_48 enables 4th level of the page tables, but neither pgtable-nop4d.h nor 5level-fixup.h are included to cope with the 5th level.
Replace #ifdef conditions around includes of the pgtable-nop{m,u}d.h with explicit CONFIG_PGTABLE_LEVELS and add include of 5level-fixup.h for the case when CONFIG_PGTABLE_LEVELS==4
--- arch/mips/include/asm/pgtable-64.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
arch/mips/include/asm/pgtable-64.h +7 -2
@@ -18,10 +18,12 @@#include <asm/fixmap.h> #define __ARCH_USE_5LEVEL_HACK -#if defined(CONFIG_PAGE_SIZE_64KB ) && !defined(CONFIG_MIPS_VA_BITS_48 ) +#if CONFIG_PGTABLE_LEVELS ==2 #include <asm-generic/pgtable-nopmd.h> -#elif !(defined(CONFIG_PAGE_SIZE_4KB ) && defined(CONFIG_MIPS_VA_BITS_48 )) +#elif CONFIG_PGTABLE_LEVELS ==3 #include <asm-generic/pgtable-nopud.h> +#else +#include <asm-generic/5level-fixup.h> #endif /*
@@ -216,6 +218,9 @@ static inline unsigned long pgd_page_vaddr(pgd_t pgd)return pgd_val (pgd); } +#define pgd_phys (pgd) virt_to_phys((void *)pgd_val(pgd)) +#define pgd_page (pgd) (pfn_to_page(pgd_phys(pgd) >> PAGE_SHIFT)) +static inline pud_t *pud_offset (pgd_t *pgd,unsigned long address) {return (pud_t *)pgd_page_vaddr (*pgd) +pud_index (address);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 175/177 drm/amdgpu: fix bad DMA from INTERRUPT_CNTL2
In reply to Sasha LevinFrom: Sam Bobroff <[email protected]>
[ Upstream commit 3d0e3ce52ce3eb4b9de3caf9c38dbb5a4d3e13c3 ]
The INTERRUPT_CNTL2 register expects a valid DMA address, but is currently set with a GPU MC address. This can cause problems on systems that detect the resulting DMA read from an invalid address (found on a Power8 guest).
Instead, use the DMA address of the dummy page because it will always be safe.
--- drivers/gpu/drm/amd/amdgpu/si_ih.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/si_ih.c +2 -1
@@ -62,7 +62,8 @@ static int si_ih_irq_init(struct amdgpu_device *adev)u64 wptr_off;si_ih_disable_interrupts (adev); -WREG32 (INTERRUPT_CNTL2 , adev->irq.ih.gpu_addr >>8 ); +/* set dummy read address to dummy page address */ +WREG32 (INTERRUPT_CNTL2 , adev->dummy_page_addr >>8 ); interrupt_cntl =RREG32 (INTERRUPT_CNTL ); interrupt_cntl &= ~IH_DUMMY_RD_OVERRIDE ; interrupt_cntl &= ~IH_REQ_NONSNOOP_EN ;
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Sasha Levin
maintainerPATCH 176/177 perf intel-bts: Does not support AUX area sampling
In reply to Sasha LevinFrom: Adrian Hunter <[email protected]>
[ Upstream commit 32a1ece4bdbde24734ab16484bad7316f03fc42d ]
Add an error message because Intel BTS does not support AUX area sampling.
--- tools/perf/arch/x86/util/auxtrace.c | 2 ++ tools/perf/arch/x86/util/intel-bts.c | 5 +++++ 2 files changed, 7 insertions(+)
tools/perf/arch/x86/util/auxtrace.c +2 -0
@@ -36,6 +36,8 @@ struct auxtrace_record *auxtrace_record__init_intel(struct perf_evlist *evlist, intel_pt_pmu =perf_pmu__find (INTEL_PT_PMU_NAME ); intel_bts_pmu =perf_pmu__find (INTEL_BTS_PMU_NAME ); +if (intel_bts_pmu) + intel_bts_pmu->auxtrace = true;evlist__for_each_entry (evlist, evsel) {if (intel_pt_pmu && evsel->attr.type == intel_pt_pmu->type)
tools/perf/arch/x86/util/intel-bts.c +5 -0
@@ -118,6 +118,11 @@ static int intel_bts_recording_options(struct auxtrace_record *itr,const struct cpu_map *cpus = evlist->cpus;bool privileged =geteuid () ==0 ||perf_event_paranoid () <0 ; +if (opts->auxtrace_sample_mode) { +pr_err ("Intel BTS does not support AUX area sampling\n" ); +return -EINVAL ; + } + btsr->evlist = evlist; btsr->snapshot_mode = opts->auxtrace_snapshot_mode;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 177/177 net: phy: initialise phydev speed and duplex sanely
In reply to Sasha LevinFrom: Russell King <[email protected]>
[ Upstream commit a5d66f810061e2dd70fb7a108dcd14e535bc639f ]
When a phydev is created, the speed and duplex are set to zero and -1 respectively, rather than using the predefined SPEED_UNKNOWN and DUPLEX_UNKNOWN constants.
There is a window at initialisation time where we may report link down using the 0/-1 values. Tidy this up and use the predefined constants, so debug doesn't complain with:
"Unsupported (update phy-core.c)/Unsupported (update phy-core.c)"
when the speed and duplex settings are printed.
--- drivers/net/phy/phy_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/phy/phy_device.c +2 -2
@@ -420,8 +420,8 @@ struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id, mdiodev->device_free = phy_mdio_device_free; mdiodev->device_remove = phy_mdio_device_remove; - dev->speed =0 ; - dev->duplex =-1 ; + dev->speed =SPEED_UNKNOWN ; + dev->duplex =DUPLEX_UNKNOWN ; dev->pause =0 ; dev->asym_pause =0 ; dev->link =0 ;
Signature · 1 line
2.20.1