[PATCH v4 10/19] tracing: probeevent: Return consumed bytes of dynamic area

2018-02-27 Thread Masami Hiramatsu
Cleanup string fetching routine so that returns the consumed bytes of dynamic area and store the string information as data_loc format instead of data_rloc. This simplifies the fetcharg loop. Signed-off-by: Masami Hiramatsu --- kernel/trace/trace_kprobe.c | 51 +++--

[PATCH v4 11/19] tracing: probeevent: Append traceprobe_ for exported function

2018-02-27 Thread Masami Hiramatsu
Append traceprobe_ for exported function set_print_fmt() as same as other functions. Signed-off-by: Masami Hiramatsu --- kernel/trace/trace_kprobe.c |4 ++-- kernel/trace/trace_probe.c |2 +- kernel/trace/trace_probe.h |2 +- kernel/trace/trace_uprobe.c |4 ++-- 4 files changed

[PATCH v4 12/19] tracing: probeevent: Unify fetch_insn processing common part

2018-02-27 Thread Masami Hiramatsu
Unify the fetch_insn bottom process (from stage 2: dereference indirect data) from kprobe and uprobe events, since those are mostly same. Signed-off-by: Masami Hiramatsu --- kernel/trace/trace_kprobe.c | 47 + kernel/trace/trace_probe_tmpl.h | 55 +

[PATCH v4 13/19] tracing: probeevent: Add symbol type

2018-02-27 Thread Masami Hiramatsu
Add "symbol" type to probeevent, which is an alias of u32 or u64 (depends on BITS_PER_LONG). This shows the result value in symbol+offset style. This type is only available with kprobe events. Signed-off-by: Masami Hiramatsu --- Changes in v2: - Add symbol type to README file. --- Documentati

[PATCH v4 14/19] x86: ptrace: Add function argument access API

2018-02-27 Thread Masami Hiramatsu
Add regs_get_argument() which returns N th argument of the function call. Note that this chooses most probably assignment, in some case it can be incorrect (e.g. passing data structure or floating point etc.) This is expected to be called from kprobes or ftrace with regs where the top of stack is

[PATCH v3 2/4] mm/sparsemem: Defer the ms->section_mem_map clearing

2018-02-27 Thread Baoquan He
In sparse_init(), if CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER=y, system will allocate one continuous memory chunk for mem maps on one node and populate the relevant page tables to map memory section one by one. If fail to populate for a certain mem section, print warning and its ->section_mem_map wi

[PATCH v4 16/19] tracing: probeevent: Add array type support

2018-02-27 Thread Masami Hiramatsu
Add array type support for probe events. This allows user to get arraied types from memory address. The array type syntax is TYPE[N] Where TYPE is one of types (u8/16/32/64,s8/16/32/64, x8/16/32/64, symbol, string) and N is a fixed value less than 64. The string array type is a bit diffe

[PATCH v3 0/4] mm/sparse: Optimize memmap allocation during sparse_init()

2018-02-27 Thread Baoquan He
This is v3 post. V1 can be found here: https://www.spinics.net/lists/linux-mm/msg144486.html In sparse_init(), two temporary pointer arrays, usemap_map and map_map are allocated with the size of NR_MEM_SECTIONS. They are used to store each memory section's usemap and mem map if marked as present.

[PATCH v3 4/4] mm/sparse: Optimize memmap allocation during sparse_init()

2018-02-27 Thread Baoquan He
In sparse_init(), two temporary pointer arrays, usemap_map and map_map are allocated with the size of NR_MEM_SECTIONS. They are used to store each memory section's usemap and mem map if marked as present. With the help of these two arrays, continuous memory chunk is allocated for usemap and memmap

[PATCH v3 3/4] mm/sparse: Add a new parameter 'data_unit_size' for alloc_usemap_and_memmap

2018-02-27 Thread Baoquan He
It's used to pass the size of map data unit into alloc_usemap_and_memmap, and is preparation for next patch. Signed-off-by: Baoquan He --- mm/sparse.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mm/sparse.c b/mm/sparse.c index 5769a0a79dc1..e1aa2f44530d 100644

[PATCH v4 17/19] selftests: ftrace: Add a testcase for symbol type

2018-02-27 Thread Masami Hiramatsu
Add a testcase for symbol type with kprobe event. This tests good/bad syntax combinations and also the traced data. If the kernel doesn't support symbol type, it skips the test as UNSUPPORTED. Signed-off-by: Masami Hiramatsu --- Changes in v3: - Use IP/PC register to test the symbol type ---

[PATCH v4 18/19] selftests: ftrace: Add a testcase for $argN with kprobe_event

2018-02-27 Thread Masami Hiramatsu
Add a testcase for array type with kprobe event. This tests whether the traced data is correct or not. If the kernel doesn't support array type, it skips the test as UNSUPPORTED. Signed-off-by: Masami Hiramatsu --- .../ftrace/test.d/kprobe/kprobe_args_argN.tc | 25 1

[PATCH v3 1/4] mm/sparse: Add a static variable nr_present_sections

2018-02-27 Thread Baoquan He
It's used to record how many memory sections are marked as present during system boot up, and will be used in the later patch. Signed-off-by: Baoquan He --- mm/sparse.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/mm/sparse.c b/mm/sparse.c index 7af5e7a92528..3400c1c02f7a 100644 --

Re: [RFC PATCH v2] ptr_ring: linked list fallback

2018-02-27 Thread Jason Wang
On 2018年02月28日 01:12, Michael S. Tsirkin wrote: On Tue, Feb 27, 2018 at 10:29:26AM +0800, Jason Wang wrote: On 2018年02月27日 04:34, Michael S. Tsirkin wrote: On Mon, Feb 26, 2018 at 11:15:42AM +0800, Jason Wang wrote: On 2018年02月26日 09:17, Michael S. Tsirkin wrote: So pointer rings work fine

[PATCH v4 15/19] tracing: probeevent: Add $argN for accessing function args

2018-02-27 Thread Masami Hiramatsu
Add $argN special fetch variable for accessing function arguments. This allows user to trace the Nth argument easily at the function entry. Note that this returns most probably assignment of registers and stacks. In some case, it may not work well. If you need to access correct registers or stacks

[PATCH v4 19/19] selftests: ftrace: Add a testcase for array type with kprobe_event

2018-02-27 Thread Masami Hiramatsu
Add a testcase for array type with kprobe event. This tests good/bad syntax combinations and also the traced data is correct in several way. If the kernel doesn't support array type, it skips the test as UNSUPPORTED. Signed-off-by: Masami Hiramatsu --- Changes in v4: - Add format field tests.

[PATCH v5 2/2] KVM: X86: Allow userspace to define the microcode version

2018-02-27 Thread Wanpeng Li
From: Wanpeng Li Linux (among the others) has checks to make sure that certain features aren't enabled on a certain family/model/stepping if the microcode version isn't greater than or equal to a known good version. By exposing the real microcode version, we're preventing buggy guests that don

[PATCH v5 1/2] KVM: X86: Introduce kvm_get_msr_feature()

2018-02-27 Thread Wanpeng Li
From: Wanpeng Li Introduce kvm_get_msr_feature() to handle the msrs which are supported by different vendors and sharing the same emulation logic. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Liran Alon Cc: Nadav Amit Cc: Borislav Petkov Cc: Tom Lendacky Signed-off-by: Wanpeng Li --- arch/x86

Re: [RFC PATCH v2] ptr_ring: linked list fallback

2018-02-27 Thread Jason Wang
On 2018年02月28日 11:28, Jason Wang wrote: Well I believe the main user for this is qdisc, which use skb array. And we can not use what implemented in this patch directly for sk_buff without some changes on the data structure. Why not? skb has next and prev pointers at 1st two fields: struct s

回覆: [PATCH] staging: typec: handle vendor defined part and modify drp toggling flow

2018-02-27 Thread 李書帆
Hi Jun, For the questions of drp_toggling, our test is as following: According to TCPCI 4.4.5.2 It is recommended the TCPM write ROLE_CONTROL.DRP=0 before writing to POWER_CONTROL.AutoDischargeDisconnect and starting the DRP toggling using COMMAND.Look4Connection. We've encounter a situati

Re: [PATCH 4/4] staging: fsl-dpaa2/eth: allow the driver to compile multi-arch

2018-02-27 Thread kbuild test robot
Hi Ioana, I love your patch! Perhaps something to improve: [auto build test WARNING on staging/staging-testing] [also build test WARNING on v4.16-rc3 next-20180227] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com

[PATCH 03/29] arm64: mm: Allocate ASIDs in pairs

2018-02-27 Thread Alex Shi
From: Will Deacon commit 0c8ea531b774 upstream. In preparation for separate kernel/user ASIDs, allocate them in pairs for each mm_struct. The bottom bit distinguishes the two: if it is set, then the ASID will map only userspace. Reviewed-by: Mark Rutland Tested-by: Laura Abbott Tested-by: Sha

[PATCH 0/29] arm meltdown fix backporting review for lts 4.9

2018-02-27 Thread Alex Shi
Hi All, This backport patchset fixed the meltdown issue, it's original branch: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/log/?h=kpti A few dependency or fixingpatches are also picked up, if they are necessary and no functional changes. The patchset also on repository:

[PATCH 04/29] arm64: mm: Add arm64_kernel_unmapped_at_el0 helper

2018-02-27 Thread Alex Shi
From: Will Deacon commit fc0e1299da54 upstream. In order for code such as TLB invalidation to operate efficiently when the decision to map the kernel at EL0 is determined at runtime, this patch introduces a helper function, arm64_kernel_unmapped_at_el0, to determine whether or not the kernel is

[PATCH 01/29] arm64: mm: Use non-global mappings for kernel space

2018-02-27 Thread Alex Shi
From: Will Deacon commit e046eb0c9bf2 upstream. In preparation for unmapping the kernel whilst running in userspace, make the kernel mappings non-global so we can avoid expensive TLB invalidation on kernel exit to userspace. Reviewed-by: Mark Rutland Tested-by: Laura Abbott Tested-by: Shanker

[PATCH 06/29] arm64: factor out entry stack manipulation

2018-02-27 Thread Alex Shi
From: Mark Rutland commit b11e5759bfac upstream. In subsequent patches, we will detect stack overflow in our exception entry code, by verifying the SP after it has been decremented to make space for the exception regs. This verification code is small, and we can minimize its impact by placing i

[PATCH 02/29] arm64: mm: Move ASID from TTBR0 to TTBR1

2018-02-27 Thread Alex Shi
From: Will Deacon commit 7655abb95386 upstream. In preparation for mapping kernelspace and userspace with different ASIDs, move the ASID to TTBR1 and update switch_mm to context-switch TTBR0 via an invalid mapping (the zero page). Reviewed-by: Mark Rutland Tested-by: Laura Abbott Tested-by: S

[PATCH 05/29] arm64: mm: Invalidate both kernel and user ASIDs when performing TLBI

2018-02-27 Thread Alex Shi
From: Will Deacon commit 9b0de864b5bc upstream. Since an mm has both a kernel and a user ASID, we need to ensure that broadcast TLB maintenance targets both address spaces so that things like CoW continue to work with the uaccess primitives in the kernel. Reviewed-by: Mark Rutland Tested-by: L

[PATCH 13/29] arm64: tls: Avoid unconditional zeroing of tpidrro_el0 for native tasks

2018-02-27 Thread Alex Shi
From: Will Deacon commit 18011eac28c7 upstream. When unmapping the kernel at EL0, we use tpidrro_el0 as a scratch register during exception entry from native tasks and subsequently zero it in the kernel_ventry macro. We can therefore avoid zeroing tpidrro_el0 in the context-switch path for nativ

[PATCH 09/29] arm64: entry: Add exception trampoline page for exceptions from EL0

2018-02-27 Thread Alex Shi
From: Will Deacon commit c7b9adaf85f8 upstream. To allow unmapping of the kernel whilst running at EL0, we need to point the exception vectors at an entry trampoline that can map/unmap the kernel on entry/exit respectively. This patch adds the trampoline page, although it is not yet plugged int

[PATCH 08/29] module: extend 'rodata=off' boot cmdline parameter to module mappings

2018-02-27 Thread Alex Shi
From: AKASHI Takahiro commit 39290b389ea upstream. The current "rodata=off" parameter disables read-only kernel mappings under CONFIG_DEBUG_RODATA: commit d2aa1acad22f ("mm/init: Add 'rodata=off' boot cmdline parameter to disable read-only kernel mappings") This patch is a logical exten

[PATCH 14/29] arm64: entry: Add fake CPU feature for unmapping the kernel at EL0

2018-02-27 Thread Alex Shi
From: Will Deacon commit ea1e3de85e94 upstream. Allow explicit disabling of the entry trampoline on the kernel command line (kpti=off) by adding a fake CPU feature (ARM64_UNMAP_KERNEL_AT_EL0) that can be used to toggle the alternative sequences in our entry code and avoid use of the trampoline a

[PATCH 11/29] arm64: entry: Explicitly pass exception level to kernel_ventry macro

2018-02-27 Thread Alex Shi
From: Will Deacon commit 5b1f7fe41909 upstream. We will need to treat exceptions from EL0 differently in kernel_ventry, so rework the macro to take the exception level as an argument and construct the branch target using that. Reviewed-by: Mark Rutland Tested-by: Laura Abbott Tested-by: Shank

[PATCH 07/29] arm64: entry.S: move SError handling into a C function for future expansion

2018-02-27 Thread Alex Shi
From: Xie XiuQi commit a92d4d1454ab upstream. Today SError is taken using the inv_entry macro that ends up in bad_mode. SError can be used by the RAS Extensions to notify either the OS or firmware of CPU problems, some of which may have been corrected. To allow this handling to be added, add a

[PATCH 12/29] arm64: entry: Hook up entry trampoline to exception vectors

2018-02-27 Thread Alex Shi
From: Will Deacon commit 4bf3286d29f3 upstream. Hook up the entry trampoline to our exception vectors so that all exceptions from and returns to EL0 go via the trampoline, which swizzles the vector base register accordingly. Transitioning to and from the kernel clobbers x30, so we use tpidrro_el

[PATCH 18/29] arm64: Kconfig: Reword UNMAP_KERNEL_AT_EL0 kconfig entry

2018-02-27 Thread Alex Shi
From: Will Deacon commit 0617052ddde3 upstream. Although CONFIG_UNMAP_KERNEL_AT_EL0 does make KASLR more robust, it's actually more useful as a mitigation against speculation attacks that can leak arbitrary kernel data to userspace through speculation. Reword the Kconfig help message to reflect

[PATCH 16/29] arm64: use RET instruction for exiting the trampoline

2018-02-27 Thread Alex Shi
From: Will Deacon commit be04a6d1126b upstream. Speculation attacks against the entry trampoline can potentially resteer the speculative instruction stream through the indirect branch and into arbitrary gadgets within the kernel. This patch defends against these attacks by forcing a mispredicti

[PATCH 15/29] arm64: kaslr: Put kernel vectors address in separate data page

2018-02-27 Thread Alex Shi
From: Will Deacon commit 6c27c4082f4f upstream. The literal pool entry for identifying the vectors base is the only piece of information in the trampoline page that identifies the true location of the kernel. This patch moves it into a page-aligned region of the .rodata section and maps this ad

[PATCH 19/29] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-02-27 Thread Alex Shi
From: Will Deacon commit 179a56f6f9fb upstream. For non-KASLR kernels where the KPTI behaviour has not been overridden on the command line we can use ID_AA64PFR0_EL1.CSV3 to determine whether or not we should unmap the kernel whilst running at EL0. Reviewed-by: Suzuki K Poulose Signed-off-by:

[PATCH 23/29] arm64: cputype: Add MIDR values for Cavium ThunderX2 CPUs

2018-02-27 Thread Alex Shi
From: Jayachandran C commit 0d90718871fe upstream. Add the older Broadcom ID as well as the new Cavium ID for ThunderX2 CPUs. Signed-off-by: Jayachandran C Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas Signed-off-by: Alex Shi Conflicts: no falkor support in arch/arm64/i

[PATCH 20/29] arm64: Allow checking of a CPU-local erratum

2018-02-27 Thread Alex Shi
From: Marc Zyngier commit 8f4137588261d7504f4aa022dc9d1a1fd1940e8e upstream. this_cpu_has_cap() only checks the feature array, and not the errata one. In order to be able to check for a CPU-local erratum, allow it to inspect the latter as well. This is consistent with cpus_have_cap()'s behaviou

[PATCH 22/29] arm64: cputype: Add missing MIDR values for Cortex-A72 and Cortex-A75

2018-02-27 Thread Alex Shi
From: Will Deacon commit f0be3364335d47267aa1f7c5ed5faaa59c70db13 upstream Hook up MIDR values for the Cortex-A72 and Cortex-A75 CPUs, since they will soon need MIDR matches for hardening the branch predictor. Signed-off-by: Will Deacon Signed-off-by: Alex Shi Conflicts: add A73 type

[PATCH 21/29] arm64: capabilities: Handle duplicate entries for a capability

2018-02-27 Thread Alex Shi
From: Suzuki K Poulose commit 67948af41f2e upstream. Sometimes a single capability could be listed multiple times with differing matches(), e.g, CPU errata for different MIDR versions. This breaks verify_local_cpu_feature() and this_cpu_has_cap() as we stop checking for a capability on a CPU wit

[PATCH 27/29] arm64: Force KPTI to be disabled on Cavium ThunderX

2018-02-27 Thread Alex Shi
From: Marc Zyngier commit 6dc52b15c4a4 upstream. Cavium ThunderX's erratum 27456 results in a corruption of icache entries that are loaded from memory that is mapped as non-global (i.e. ASID-tagged). As KPTI is based on memory being mapped non-global, let's prevent it from kicking in if this er

[PATCH 29/29] arm64: idmap: Use "awx" flags for .idmap.text .pushsection directives

2018-02-27 Thread Alex Shi
From: Will Deacon commit 439e70e27a51 upstream. The identity map is mapped as both writeable and executable by the SWAPPER_MM_MMUFLAGS and this is relied upon by the kpti code to manage a synchronisation flag. Update the .pushsection flags to reflect the actual mapping attributes. Reported-by:

[PATCH 28/29] arm64: entry: Reword comment about post_ttbr_update_workaround

2018-02-27 Thread Alex Shi
From: Will Deacon commit f167211a93ac upstream. We don't fully understand the Cavium ThunderX erratum, but it appears that mapping the kernel as nG can lead to horrible consequences such as attempting to execute userspace from kernel context. Since kpti isn't enabled for these CPUs anyway, simpl

[PATCH 26/29] arm64: kpti: Add ->enable callback to remap swapper using nG mappings

2018-02-27 Thread Alex Shi
From: Will Deacon commit f992b4dfd58b upstream. Defaulting to global mappings for kernel space is generally good for performance and appears to be necessary for Cavium ThunderX. If we subsequently decide that we need to enable kpti, then we need to rewrite our existing page table entries to be n

[PATCH 25/29] arm64: kpti: Make use of nG dependent on arm64_kernel_unmapped_at_el0()

2018-02-27 Thread Alex Shi
From: Will Deacon commit 41acec624087 upstream. To allow systems which do not require kpti to continue running with global kernel mappings (which appears to be a requirement for Cavium ThunderX due to a CPU erratum), make the use of nG in the kernel page tables dependent on arm64_kernel_unmapped

[PATCH 24/29] arm64: Turn on KPTI only on CPUs that need it

2018-02-27 Thread Alex Shi
From: Jayachandran C commit 0ba2e29c7fc1 upstream. Whitelist Broadcom Vulcan/Cavium ThunderX2 processors in unmap_kernel_at_el0(). These CPUs are not vulnerable to CVE-2017-5754 and do not need KPTI when KASLR is off. Acked-by: Will Deacon Signed-off-by: Jayachandran C Signed-off-by: Catalin

[PATCH 17/29] arm64: Kconfig: Add CONFIG_UNMAP_KERNEL_AT_EL0

2018-02-27 Thread Alex Shi
From: Will Deacon commit 084eb77cd3a8 upstream. Add a Kconfig entry to control use of the entry trampoline, which allows us to unmap the kernel whilst running in userspace and improve the robustness of KASLR. Reviewed-by: Mark Rutland Tested-by: Laura Abbott Tested-by: Shanker Donthineni Sig

linux-next: Tree for Feb 28

2018-02-27 Thread Stephen Rothwell
Hi all, Changes since 20180227: The net-next tree gained a conflict against the net tree. Non-merge commits (relative to Linus' tree): 3753 4443 files changed, 168483 insertions(+), 107955 deletions(-) I

Re: [PATCH 0/29] arm meltdown fix backporting review for lts 4.9

2018-02-27 Thread Alex Shi
On 02/28/2018 11:56 AM, Alex Shi wrote: > The patchset also on repository: > git://git.linaro.org/kernel/linux-linaro-stable.git lts-4.9-spectrevv2 Sorry, the correct branch address is here: https://git.linaro.org/kernel/speculation-fixes-staging.git v4.9-meltdown Thanks Alex

[PATCH] selftests/vm: Update max va test to check for high address return.

2018-02-27 Thread Aneesh Kumar K.V
mmap(-1,..) is expected to search from max supported VA top down. It should find an address above ADDR_SWITCH_HINT. Explicitly check for this. Also derefer the address even if we failed the addr check. Signed-off-by: Aneesh Kumar K.V --- tools/testing/selftests/vm/va_128TBswitch.c | 27

[PATCH 10/29] arm64: mm: Map entry trampoline into trampoline and kernel page tables

2018-02-27 Thread Alex Shi
From: Will Deacon commit 51a0048beb44 upstream. The exception entry trampoline needs to be mapped at the same virtual address in both the trampoline page table (which maps nothing else) and also the kernel page table, so that we can swizzle TTBR1_EL1 on exceptions from and return to EL0. This p

Re: [RFC PATCH v2] ptr_ring: linked list fallback

2018-02-27 Thread Michael S. Tsirkin
On Wed, Feb 28, 2018 at 11:28:57AM +0800, Jason Wang wrote: > > > On 2018年02月28日 01:12, Michael S. Tsirkin wrote: > > On Tue, Feb 27, 2018 at 10:29:26AM +0800, Jason Wang wrote: > > > > > > On 2018年02月27日 04:34, Michael S. Tsirkin wrote: > > > > On Mon, Feb 26, 2018 at 11:15:42AM +0800, Jason Wa

Re: [RFC PATCH v2] ptr_ring: linked list fallback

2018-02-27 Thread Michael S. Tsirkin
On Wed, Feb 28, 2018 at 11:39:15AM +0800, Jason Wang wrote: > > > On 2018年02月28日 11:28, Jason Wang wrote: > > > > Well I believe the main user for this is qdisc, which use skb > > > > array. And we > > > > can not use what implemented in this patch directly for sk_buff > > > > without some > > >

Re: [PATCH 46/52] arm: Add BTB invalidation on switch_mm for Cortex-A9, A12 and A17

2018-02-27 Thread Alex Shi
On 02/26/2018 06:45 PM, Will Deacon wrote: > On Mon, Feb 26, 2018 at 06:40:42PM +0800, Alex Shi wrote: >> >> >> On 02/26/2018 06:05 PM, Greg KH wrote: >>> On Mon, Feb 26, 2018 at 04:20:20PM +0800, Alex Shi wrote: From: Marc Zyngier ** Not yet queued for inclusion in mainline ** >>

Re: [PATCH 3/4] auxdisplay: charlcd: fix x/y address commands

2018-02-27 Thread Willy Tarreau
Hi Robert, On Wed, Feb 28, 2018 at 12:29:38AM +0100, Robert Abel wrote: > It is however an edge case that incurs a > lot of code for little to no functionality. > I'd much prefer if we broke backwards compatibility here and actually > only parse the format that is indicated in the comment: > > >

[PATCH net 2/2] net/macmace: Fix and clean up log messages

2018-02-27 Thread Finn Thain
Don't log the unexpanded "eth%d" format string. Log the chip revision in the probe message (consistent with mace.c). Drop redundant debug messages for FIFO events recorded in the interface statistics (also consistent with mace.c). Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/ne

[PATCH net 1/2] net/macmace: Drop redundant MACH_IS_MAC test

2018-02-27 Thread Finn Thain
The MACH_IS_MAC test is redundant here because the platform device won't get registered unless MACH_IS_MAC. Adopt module_platform_driver() convention. Cc: Geert Uytterhoeven Signed-off-by: Finn Thain --- drivers/net/ethernet/apple/macmace.c | 16 +--- 1 file changed, 1 insertion(+),

[PATCH net 0/2] Fixes, cleanup and modernization for macmace driver

2018-02-27 Thread Finn Thain
Changes since v4 of combined patch series: - Removed redundant and non-portable MACH_IS_MAC tests. - Omitted patches unrelated to macmace driver. Finn Thain (2): net/macmace: Drop redundant MACH_IS_MAC test net/macmace: Fix and clean up log messages drivers/net/ethernet/apple/macmace.c | 25

Re: [RFC 4/4] input: misc: Add Gateworks System Controller support

2018-02-27 Thread Dmitry Torokhov
Hi Tim, On Tue, Feb 27, 2018 at 05:21:14PM -0800, Tim Harvey wrote: > Add support for dispatching Linux Input events for the various interrupts > the Gateworks System Controller provides. > > Signed-off-by: Tim Harvey > --- > drivers/input/misc/Kconfig | 6 ++ > drivers/input/misc/Makefil

[PATCH v6 0/3] Add support for Hi3660 mailbox driver

2018-02-27 Thread Leo Yan
Hi3660 mailbox controller is used to send message within multiple processors, MCU, HIFI, etc. This patch series is to implement an initial version for Hi3660 mailbox driver with "automatic acknowledge" mode. The patch set have been verified with Hi3660 stub clock driver, so we can send message to

[PATCH v6 3/3] dts: arm64: Add mailbox binding for hi3660

2018-02-27 Thread Leo Yan
From: Kaihua Zhong Add DT binding for mailbox driver. Signed-off-by: Ruyi Wang Signed-off-by: Kaihua Zhong --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi366

[PATCH v6 1/3] dt-bindings: mailbox: Introduce Hi3660 controller binding

2018-02-27 Thread Leo Yan
Introduce a binding for the Hi3660 mailbox controller, the mailbox is used within application processor (AP), communication processor (CP), HIFI and MCU, etc. Acked-by: Rob Herring Signed-off-by: Leo Yan --- .../bindings/mailbox/hisilicon,hi3660-mailbox.txt | 51 ++ 1 file

[PATCH v6 2/3] mailbox: Add support for Hi3660 mailbox

2018-02-27 Thread Leo Yan
From: Kaihua Zhong Hi3660 mailbox controller is used to send message within multiple processors, MCU, HIFI, etc. It supports 32 mailbox channels and every channel can only be used for single transferring direction. Once the channel is enabled, it needs to specify the destination interrupt and a

Re: [PATCH 1/2] input: Add RAVE SP Powerbutton driver

2018-02-27 Thread Dmitry Torokhov
Hi Andrey, On Mon, Feb 26, 2018 at 07:41:29AM -0800, Andrey Smirnov wrote: > Add driver that properly handles input event emitted by RAVE SP > devices. > > Cc: Dmitry Torokhov > Cc: linux-in...@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: Rob Herring > Cc: Mark Rutland > Cc: device

[PATCH RESEND v3] checkpatch: Fix checks for Kconfig help text

2018-02-27 Thread Leo Yan
If one patch has Kconfig section, the check script variable '$is_start' will be set by first 'config' line and the variable '$is_end' is to be set by the second 'config' line. But patches often has only one 'config' line so we have no chance to set '$is_end', as result below condition is invalid an

[PATCH RESEND] checkpatch: Make '$min_conf_desc_length' default value to 1

2018-02-27 Thread Leo Yan
Make '$min_conf_desc_length' default value from 4 to 1; so can give more relax check for Kconfig description has at least one line rather than four lines. User can still pass parameter "--min-conf-desc-length=X" to set more strict check. Signed-off-by: Leo Yan --- scripts/checkpatch.pl | 2 +-

Re: [PATCH v3 3/3] arm64: dts: Hi3660: Add binding for stub clock

2018-02-27 Thread Leo Yan
Hi Wei, On Fri, Nov 17, 2017 at 05:27:32PM +0800, Xu YiPing wrote: > From: Kaihua Zhong > > Add DT binding for Hi3660 stub clock driver. > > Reviewed-by: Leo Yan > Signed-off-by: Kai Zhao > Signed-off-by: Tao Wang > Signed-off-by: Ruyi Wang > Signed-off-by: Kaihua Zhong Could you help to

[PATCH] f2fs: do gc in greedy mode for whole range if gc_urgent mode is set

2018-02-27 Thread Jaegeuk Kim
Otherwise, f2fs conducts GC on 8GB range only based on slow cost-benefit. Signed-off-by: Jaegeuk Kim --- fs/f2fs/gc.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index bc9420ce2275..bfb7a4a3a929 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2

Re: [PATCH] arm64: dts: Hi3660: Remove 'CPU_NAP' idle state

2018-02-27 Thread Leo Yan
Hi Wei, On Tue, Jan 09, 2018 at 12:32:42PM +0800, Leo Yan wrote: > Thanks a lot for Vincent Guittot careful work to find bug for 'CPU_NAP' > idle state. At early time, the CPU CA73 CPU_NAP idle state has been > supported on Hikey960. Later we found the system has the hang issue > and for resolvi

Re: [PATCH 1/5 v2] f2fs: add mount option for segment allocation policy

2018-02-27 Thread Jaegeuk Kim
Change log from v1: - add doc :) This patch adds an mount option, "alloc_mode=%s" having two options, "default" and "reuse". In "alloc_mode=reuse" case, f2fs starts to allocate segments from 0'th segment all the time to reassign segments. It'd be useful for small-sized eMMC parts. Signed-off-by

Re: [PATCH v2 5/6] kconfig: invoke oldconfig instead of silentoldconfig from local*config

2018-02-27 Thread Ulf Magnusson
On Wed, Feb 28, 2018 at 09:15:25AM +0900, Masahiro Yamada wrote: > The purpose of local{yes,mod}config is to arrange the .config file > based on actually loaded modules. It is unnecessary to update > include/generated/autoconf.h and include/config/* stuff here. > > They will be automatically upda

Re: [RFC PATCH] e1000e: Fix link check race condition.

2018-02-27 Thread Benjamin Poirier
On 2018/02/26 08:14, Alexander Duyck wrote: [...] > > > > > switch (hw->mac.type) { > > case e1000_pch2lan: > > ret_val = e1000_k1_workaround_lv(hw); > > if (ret_val) > > - return ret_val; > > + goto out; >

[PATCH] e1000e: Fix link status in case of error.

2018-02-27 Thread Benjamin Poirier
Before commit 19110cfbb34d ("e1000e: Separate signaling for link check/link up"), errors which happen after "get_link_status = false" in the copper check_for_link callbacks would be ignored and the link considered up. After that commit, any error implies that the link is down. Since all combination

Re: [f2fs-dev] [PATCH] f2fs: handle quota for orphan inodes

2018-02-27 Thread Jaegeuk Kim
On 02/27, Chao Yu wrote: > Ping, > > On 2018/2/13 22:33, Chao Yu wrote: > > On 2018/2/10 10:28, Jaegeuk Kim wrote: > >> This is to fix missing dquot_initialize for orphan inodes. > > > > IMO, we don't need to call dquot_initialize as we have call the function > > in evict(), right? I think we'd

Re: [PATCH] staging:r8188eu: use lib80211 CCMP decrypt

2018-02-27 Thread Ivan Safonov
On 02/26/2018 10:56 AM, Dan Carpenter wrote: On Fri, Feb 23, 2018 at 05:57:42PM +0300, Ivan Safonov wrote: Custom AES decrypt implementation replaced with lib80211 library. Signed-off-by: Ivan Safonov The new code looks like original RTL code (really bad) so I'm guessing you copy and pasted

Re: [PATCH v2 07/11] firmware: split firmware fallback functionality into its own file

2018-02-27 Thread Kees Cook
On Tue, Feb 27, 2018 at 5:28 PM, Luis R. Rodriguez wrote: > On Tue, Feb 27, 2018 at 03:14:53PM -0800, Kees Cook wrote: >> On Fri, Feb 23, 2018 at 6:46 PM, Luis R. Rodriguez wrote: >> > The firmware fallback code is optional. Split that code out to help >> > distinguish the fallback functionlity f

Re: [PATCH 2/2] f2fs: support {d,id,did,x}node checksum

2018-02-27 Thread Jaegeuk Kim
On 02/27, Chao Yu wrote: > Ping, > > On 2018/2/13 15:34, Chao Yu wrote: > > Hi Jaegeuk, > > > > On 2018/2/10 10:52, Chao Yu wrote: > >> On 2018/2/10 9:41, Jaegeuk Kim wrote: > >>> On 02/01, Chao Yu wrote: > > > On 2018/2/1 6:15, Jaegeuk Kim wrote: > > On 01/31, Chao Yu wrote: >

Re: [PATCH v8 14/15] cpufreq: Add module to register cpufreq on Krait CPUs

2018-02-27 Thread Sricharan R
Hi Gregory, On 2/27/2018 8:28 PM, Gregory CLEMENT wrote: > Hi Sricharan, > > On mar., févr. 27 2018, Sricharan R wrote: > >> From: Stephen Boyd >> >> Register a cpufreq-generic device whenever we detect that a >> "qcom,krait" compatible CPU is present in DT. >> >> Acked-by: Viresh Kumar >>

Re: [PATCH 05/10] hwmon: generic-pwm-tachometer: Add generic PWM based tachometer

2018-02-27 Thread Rajkumar Rampelli
On Wednesday 21 February 2018 08:20 PM, Guenter Roeck wrote: On 02/20/2018 10:58 PM, Rajkumar Rampelli wrote: Add generic PWM based tachometer driver via HWMON interface to report the RPM of motor. This drivers get the period/duty cycle from PWM IP which captures the motor PWM output. This dri

Re: [PATCH v2 6/6] kconfig: rename silentoldconfig to syncconfig

2018-02-27 Thread Ulf Magnusson
On Wed, Feb 28, 2018 at 09:15:26AM +0900, Masahiro Yamada wrote: > As commit cedd55d49dee ("kconfig: Remove silentoldconfig from help > and docs; fix kconfig/conf's help") mentioned, 'silentoldconfig' is a > historical misnomer. That commit removed it from help and docs since > it is an internal i

Re: [PATCH v2 6/6] kconfig: rename silentoldconfig to syncconfig

2018-02-27 Thread Ulf Magnusson
On Wed, Feb 28, 2018 at 6:41 AM, Ulf Magnusson wrote: > On Wed, Feb 28, 2018 at 09:15:26AM +0900, Masahiro Yamada wrote: >> As commit cedd55d49dee ("kconfig: Remove silentoldconfig from help >> and docs; fix kconfig/conf's help") mentioned, 'silentoldconfig' is a >> historical misnomer. That comm

Re: [PATCH v4] Revert "f2fs crypto: avoid unneeded memory allocation in ->readdir"

2018-02-27 Thread Jaegeuk Kim
Hi Yunlong, As Eric pointed out, how do you think using nohighmem for directory likewise ext4, which looks like more efficient? Actually, we don't need to do this in most of recent kernels, right? Thanks, On 02/28, Yunlong Song wrote: > This reverts commit e06f86e61d7a67fe6e826010f57aa39c674f4b1

[PATCH] rcu: Call wake_nocb_leader_defer() with 'FORCE' when nocb_q_count is high

2018-02-27 Thread Byungchul Park
If many callbacks have been queued and waking up the nocb leader should be deferred, then we should wake up the leader unconditionally when it's safe to do so. It was well managed in commit fbce7497ee(rcu: Parallelize and economize NOCB kthread wakeups) at first, but the commit 8be6e1b15c(rcu: Use

Re: [PATCH v5 2/2] KVM: X86: Allow userspace to define the microcode version

2018-02-27 Thread Tom Lendacky
On 2/27/2018 9:34 PM, Wanpeng Li wrote: > From: Wanpeng Li > > Linux (among the others) has checks to make sure that certain features > aren't enabled on a certain family/model/stepping if the microcode version > isn't greater than or equal to a known good version. > > By exposing the real mic

[PATCH] blackfin: time: Use read_persistent_clock64() instead of read_persistent_clock()

2018-02-27 Thread Baolin Wang
Since struct timespec is not y2038 safe on 32bit machines, this patch converts read_persistent_clock() to read_persistent_clock64() using struct timespec64. Signed-off-by: Baolin Wang --- arch/blackfin/kernel/time-ts.c |6 -- arch/blackfin/kernel/time.c|6 -- 2 files changed,

Re: [PATCH 05/10] hwmon: generic-pwm-tachometer: Add generic PWM based tachometer

2018-02-27 Thread Guenter Roeck
On 02/27/2018 09:38 PM, Rajkumar Rampelli wrote: On Wednesday 21 February 2018 08:20 PM, Guenter Roeck wrote: On 02/20/2018 10:58 PM, Rajkumar Rampelli wrote: Add generic PWM based tachometer driver via HWMON interface to report the RPM of motor. This drivers get the period/duty cycle from PWM

Re: [RFC PATCH 1/1] power: supply: bq27xxx: Call power_supply_changed on status change

2018-02-27 Thread Matt Ranostay
Commit message please :) On Tue, Feb 27, 2018 at 5:04 PM, Merlijn Wajer wrote: > Signed-off-by: Merlijn Wajer > --- Single patch changes usually don't have a cover letter. you put more detail here in the cutoff section (aka after --- above) > drivers/power/supply/bq27xxx_battery.c | 59 > ++

Re: [PATCH v5 2/2] KVM: X86: Allow userspace to define the microcode version

2018-02-27 Thread Wanpeng Li
2018-02-28 13:55 GMT+08:00 Tom Lendacky : > On 2/27/2018 9:34 PM, Wanpeng Li wrote: >> From: Wanpeng Li >> >> Linux (among the others) has checks to make sure that certain features >> aren't enabled on a certain family/model/stepping if the microcode version >> isn't greater than or equal to a kno

[PATCH RESEND v5 2/2] KVM: X86: Allow userspace to define the microcode version

2018-02-27 Thread Wanpeng Li
From: Wanpeng Li Linux (among the others) has checks to make sure that certain features aren't enabled on a certain family/model/stepping if the microcode version isn't greater than or equal to a known good version. By exposing the real microcode version, we're preventing buggy guests that don

[PATCH RESEND v5 1/2] KVM: X86: Introduce kvm_get_msr_feature()

2018-02-27 Thread Wanpeng Li
From: Wanpeng Li Introduce kvm_get_msr_feature() to handle the msrs which are supported by different vendors and sharing the same emulation logic. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Liran Alon Cc: Nadav Amit Cc: Borislav Petkov Cc: Tom Lendacky Signed-off-by: Wanpeng Li --- arch/x86

Re: [PATCH v5 0/4] vm: add a syscall to map a process memory into a pipe

2018-02-27 Thread Andrei Vagin
On Tue, Feb 27, 2018 at 05:18:18AM +0300, Dmitry V. Levin wrote: > On Mon, Feb 26, 2018 at 12:02:25PM +0300, Pavel Emelyanov wrote: > > On 02/21/2018 03:44 AM, Andrew Morton wrote: > > > On Tue, 9 Jan 2018 08:30:49 +0200 Mike Rapoport > > > wrote: > > > > > >> This patches introduces new proces

Re: [PATCH 05/10] hwmon: generic-pwm-tachometer: Add generic PWM based tachometer

2018-02-27 Thread Rajkumar Rampelli
On Wednesday 28 February 2018 11:28 AM, Guenter Roeck wrote: On 02/27/2018 09:38 PM, Rajkumar Rampelli wrote: On Wednesday 21 February 2018 08:20 PM, Guenter Roeck wrote: On 02/20/2018 10:58 PM, Rajkumar Rampelli wrote: Add generic PWM based tachometer driver via HWMON interface to report th

[PATCH] frv: Use read_persistent_clock64() instead of read_persistent_clock()

2018-02-27 Thread Baolin Wang
The struct timespec is not y2038 safe on 32bit systems, thus this patch converts the read_persistent_clock() to read_persistent_clock64() with using struct timespec64. We also use time64_t type to record system time by converting the mktime() to mktime64() . Signed-off-by: Baolin Wang --- arch/f

[PATCH] m32r: Use read_persistent_clock64() instead of read_persistent_clock()

2018-02-27 Thread Baolin Wang
Since struct timespec is not y2038 safe on 32bit machines, this patch converts read_persistent_clock() to read_persistent_clock64() using struct timespec64, as well as converting mktime() to mktime64(). Signed-off-by: Baolin Wang --- arch/m32r/kernel/time.c |4 ++-- 1 file changed, 2 inserti

Re: [PATCH 0/2] ESRT fixes for relocatable kexec'd kernel

2018-02-27 Thread AKASHI Takahiro
Tyler, # I missed catching your patch as its subject doesn't contain arm64. On Fri, Feb 23, 2018 at 12:42:31PM -0700, Tyler Baicar wrote: > Currently on arm64 ESRT memory does not appear to be properly blocked off. > Upon successful initialization, ESRT prints out the memory region that it > exis

Re: [PATCH] Bluetooth: btqcomsmd: Fix channel open check

2018-02-27 Thread Marcel Holtmann
Hi Bjorn, > rpmsg_create_ept() returns NULL on error and as such > qcom_wcnss_open_channel() does the same. Clarify this in the > kernel-doc and correct the error checks in btqcomsmd. > > Fixes: 1511cc750c3d ("Bluetooth: Introduce Qualcomm WCNSS SMD based HCI > driver") > Cc: sta...@vger.kernel.

Re: [RFC PATCH v2] ptr_ring: linked list fallback

2018-02-27 Thread Jason Wang
On 2018年02月28日 12:09, Michael S. Tsirkin wrote: Or we can add plist to a union: struct sk_buff { union { struct { /* These two members must be first. */ struct sk_buff *next; str

  1   2   3   4   5   6   7   8   9   10   >