Re: [PATCH v1 3/3] mtd: spi-nor: mtk-quadspi: rename config to a common one

2019-01-14 Thread Ryder Lee
On Tue, 2019-01-15 at 07:34 +, tudor.amba...@microchip.com wrote: > Hi, Ryder, > > On 01/14/2019 07:12 AM, Ryder Lee wrote: > > The quadspi is a generic communication interface which could be shared > > with other MediaTek SoCs. Hence rename it to a common one. > > > > Signed-off-by: Ryder

[PATCH 2/2] gpio: sprd: Fix incorrect irq type setting for the async EIC

2019-01-14 Thread Baolin Wang
From: Neo Hou When setting async EIC as IRQ_TYPE_EDGE_BOTH type, we missed to set the SPRD_EIC_ASYNC_INTMODE register to 0, which means detecting edge signals. Thus this patch fixes the issue. Signed-off-by: Neo Hou Signed-off-by: Baolin Wang --- drivers/gpio/gpio-eic-sprd.c |1 + 1

[PATCH 1/2] gpio: sprd: Fix the incorrect data register

2019-01-14 Thread Baolin Wang
From: Neo Hou Since differnt type EICs have its own data register to read, thus fix the incorrect data register. Signed-off-by: Neo Hou Signed-off-by: Baolin Wang --- drivers/gpio/gpio-eic-sprd.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v1 2/3] mtd: spi-nor: mtk-quadspi: add SNOR_HWCAPS_READ for capcity setting

2019-01-14 Thread Guochun Mao
On Tue, 2019-01-15 at 06:59 +, tudor.amba...@microchip.com wrote: > Hi, Ryder, > > On 01/14/2019 07:12 AM, Ryder Lee wrote: > > From: Guochun Mao > > > > SNOR_HWCAPS_READ is a basic read mode for both flash and controller, > > it should be supported, so add the capcity for mtk-quadspi. > >

Re: [PATCHv2 6/7] x86/mm: remove bottom-up allocation style for x86_64

2019-01-14 Thread Pingfan Liu
On Tue, Jan 15, 2019 at 7:27 AM Dave Hansen wrote: > > On 1/10/19 9:12 PM, Pingfan Liu wrote: > > Although kaslr-kernel can avoid to stain the movable node. [1] > > Can you explain what staining is, or perhaps try to use some more > standard nomenclature? There are exactly 0 instances of the

Re: [PATCH v1 3/3] mtd: spi-nor: mtk-quadspi: rename config to a common one

2019-01-14 Thread Tudor.Ambarus
Hi, Ryder, On 01/14/2019 07:12 AM, Ryder Lee wrote: > The quadspi is a generic communication interface which could be shared > with other MediaTek SoCs. Hence rename it to a common one. > > Signed-off-by: Ryder Lee > --- > Changes since v1: rebase to v5.0-rc1. The patch doesn't apply on

Re: [PATCHv2 2/7] acpi: change the topo of acpi_table_upgrade()

2019-01-14 Thread Pingfan Liu
On Tue, Jan 15, 2019 at 7:12 AM Dave Hansen wrote: > > On 1/10/19 9:12 PM, Pingfan Liu wrote: > > The current acpi_table_upgrade() relies on initrd_start, but this var is > > "var" meaning variable? > > Could you please go back and try to ensure you spell out all the words > you are intending to

Re: [PATCH v3 1/3] powerpc/mm: prepare kernel for KAsan on PPC32

2019-01-14 Thread Christophe Leroy
On 01/14/2019 09:34 AM, Dmitry Vyukov wrote: On Sat, Jan 12, 2019 at 12:16 PM Christophe Leroy wrote: In kernel/cputable.c, explicitly use memcpy() in order to allow GCC to replace it with __memcpy() when KASAN is selected. Since commit 400c47d81ca38 ("powerpc32: memset: only use dcbz

Re: Regression in 32-bit-compat TIOCGPTPEER ioctl due to 311fc65c9fb9c966bca8e6f3ff8132ce57344ab9

2019-01-14 Thread Eric W. Biederman
"Robert O'Callahan" writes: > This commit refactored the implementation of TIOCGPTPEER, moving "case > TIOCGPTPEER" from pty_unix98_ioctl() to tty_ioctl(). > pty_unix98_ioctl() is called by pty_unix98_compat_ioctl(), so before > the commit, TIOCGPTPEER worked for 32-bit userspace. Unfortunately

Re: [PATCH v3] memcg: schedule high reclaim for remote memcgs on high_work

2019-01-14 Thread Michal Hocko
On Mon 14-01-19 12:18:07, Shakeel Butt wrote: > On Sun, Jan 13, 2019 at 10:34 AM Michal Hocko wrote: > > > > On Fri 11-01-19 14:54:32, Shakeel Butt wrote: > > > Hi Johannes, > > > > > > On Fri, Jan 11, 2019 at 12:59 PM Johannes Weiner > > > wrote: > > > > > > > > Hi Shakeel, > > > > > > > > On

Re: KASAN: use-after-scope Read in corrupted

2019-01-14 Thread Dmitry Vyukov
On Tue, Jan 15, 2019 at 5:43 AM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:1bdbe2274920 Merge tag 'vfio-v5.0-rc2' of git://github.com.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1519d39f40 > kernel config:

Re: [PATCH v15 3/6] x86/boot: Introduce efi_get_rsdp_addr() to find RSDP from EFI table

2019-01-14 Thread Chao Fan
On Mon, Jan 14, 2019 at 10:07:56AM +0100, Borislav Petkov wrote: >On Mon, Jan 14, 2019 at 09:26:42AM +0800, Chao Fan wrote: >> According to the code, I saw: >> #ifdef ACPI_ASL_COMPILER >> #define ACPI_32BIT_PHYSICAL_ADDRESS >> #endif >> >> and then >> #ifdef ACPI_32BIT_PHYSICAL_ADDRESS >> typedef

[PATCH] kbuild: mark prepare0 as PHONY to fix external module build

2019-01-14 Thread Masahiro Yamada
Commit c3ff2a5193fa ("powerpc/32: add stack protector support") caused kernel panic on PowerPC if an external module is used with CONFIG_STACKPROTECTOR because the 'prepare' target was not executed for the external module build. Commit e07db28eea38 ("kbuild: fix single target build for external

Re: Plain accesses and data races in the Linux Kernel Memory Model

2019-01-14 Thread Dmitry Vyukov
On Tue, Jan 15, 2019 at 12:54 AM Paul E. McKenney wrote: > > On Mon, Jan 14, 2019 at 02:41:49PM -0500, Alan Stern wrote: > > The patch below is my first attempt at adapting the Linux Kernel > > Memory Model to handle plain accesses (i.e., those which aren't > > specially marked as READ_ONCE,

Re: [PATCH 1/2] kbuild: remove top-level built-in.a

2019-01-14 Thread Nicholas Piggin
Masahiro Yamada's on January 14, 2019 1:27 pm: > The symbol table in the final archive is unneeded because it is passed > to the linker after the --whole-archive option. Every object file in > the archive is included in the link anyway. > > Pass thin archives from subdirectories directly to the

Re: [PATCH net V3] vhost: log dirty page correctly

2019-01-14 Thread Jason Wang
On 2019/1/15 上午2:04, Michael S. Tsirkin wrote: On Fri, Jan 11, 2019 at 12:00:36PM +0800, Jason Wang wrote: Vhost dirty page logging API is designed to sync through GPA. But we try to log GIOVA when device IOTLB is enabled. This is wrong and may lead to missing data after migration. To solve

Re: [PATCH] kvm: add proper frame pointer logic for vmx

2019-01-14 Thread Paolo Bonzini
On 15/01/19 08:04, Qian Cai wrote: > > > On 1/15/19 1:44 AM, Qian Cai wrote: >> compilation warning since v5.0-rc1, >> >> arch/x86/kvm/vmx/vmx.o: warning: objtool: vmx_vcpu_run.part.17()+0x3171: >> call without frame pointer save/setup >> >> Fixes: 453eafbe65f (KVM: VMX: Move VM-Enter + VM-Exit

Compensation for your effort

2019-01-14 Thread MRS SABAH IBRAHIM
Dear Friend, How are you I hope you are very fine with your entire family? If so glory be to Almighty God. I'm happy to inform you about my success in getting those funds transferred under the cooperation of a new partner from GREECE, Presently i'm in GREECE for a better treatment and

[PATCH] nvmem: sc27xx: Convert nvmem offset to block index

2019-01-14 Thread Baolin Wang
From: Freeman Liu The Spreadtrum SC27XX efuse data are organized by blocks and each block contains 2 bytes data. Moreover the nvmem core always pass the offset in byte to the controller, so we should change the offset in byte to the correct block index and block offset to read the data.

Re: [PATCHv2 1/7] x86/mm: concentrate the code to memblock allocator enabled

2019-01-14 Thread Pingfan Liu
On Tue, Jan 15, 2019 at 7:07 AM Dave Hansen wrote: > > On 1/10/19 9:12 PM, Pingfan Liu wrote: > > This patch identifies the point where memblock alloc start. It has no > > functional. > > It has no functional ... what? Effects? > During re-organize the code, it takes me a long time to figure out

Re: [PATCH] kvm: add proper frame pointer logic for vmx

2019-01-14 Thread Qian Cai
On 1/15/19 1:44 AM, Qian Cai wrote: > compilation warning since v5.0-rc1, > > arch/x86/kvm/vmx/vmx.o: warning: objtool: vmx_vcpu_run.part.17()+0x3171: > call without frame pointer save/setup > > Fixes: 453eafbe65f (KVM: VMX: Move VM-Enter + VM-Exit handling to > non-inline sub-routines)

Re: [PATCH v1 2/3] mtd: spi-nor: mtk-quadspi: add SNOR_HWCAPS_READ for capcity setting

2019-01-14 Thread Tudor.Ambarus
Hi, Ryder, On 01/14/2019 07:12 AM, Ryder Lee wrote: > From: Guochun Mao > > SNOR_HWCAPS_READ is a basic read mode for both flash and controller, > it should be supported, so add the capcity for mtk-quadspi. Since I couldn't find a datasheet for mt8173, I tend to share your assumption -

[PATCH] spi: omap2-mcspi: Fix DMA and FIFO event trigger size mismatch

2019-01-14 Thread Vignesh R
Commit b682cffa3ac6 ("spi: omap2-mcspi: Set FIFO DMA trigger level to word length") broke SPI transfers where bits_per_word != 8. This is because of mimsatch between McSPI FIFO level event trigger size (SPI word length) and DMA request size(word length * maxburst). This leads to data corruption,

Re: [PATCH] libceph: protect pending flags in ceph_con_keepalive()

2019-01-14 Thread Myungho Jung
On Mon, Jan 14, 2019 at 09:37:25PM +0100, Ilya Dryomov wrote: > On Thu, Jan 3, 2019 at 4:50 AM Myungho Jung wrote: > > I reproduced on vm using syzkaller utils and verified the fix by syzbot. > > Hi Myungho, > > I think this might be a better fix: > > diff --git a/net/ceph/messenger.c

Re: [PATCH v2 00/15] powerpc/32s: Use BATs/LTLBs for STRICT_KERNEL_RWX

2019-01-14 Thread Christophe Leroy
Le 15/01/2019 à 01:33, Jonathan Neuschäfer a écrit : On Mon, Jan 14, 2019 at 07:23:07PM +0100, Christophe Leroy wrote: Le 13/01/2019 à 22:02, Jonathan Neuschäfer a écrit : On Sun, Jan 13, 2019 at 08:43:07PM +0100, Christophe Leroy wrote: Le 13/01/2019 à 19:16, Jonathan Neuschäfer a écrit 

Re: [PATCH 1/1] remoteproc: fix recovery procedure

2019-01-14 Thread xiang xiao
Here is my output after apply your patch, the duplication device still exist: [ 48.012300] remoteproc remoteproc0: crash detected in f921.toppwr:tl421-rproc: type watchdog [ 48.023473] remoteproc remoteproc0: handling crash #1 in f921.toppwr:tl421-rproc [ 48.037504] remoteproc

[PATCH] kvm: add proper frame pointer logic for vmx

2019-01-14 Thread Qian Cai
compilation warning since v5.0-rc1, arch/x86/kvm/vmx/vmx.o: warning: objtool: vmx_vcpu_run.part.17()+0x3171: call without frame pointer save/setup Fixes: 453eafbe65f (KVM: VMX: Move VM-Enter + VM-Exit handling to non-inline sub-routines) Signed-off-by: Qian Cai --- arch/x86/kvm/vmx/vmenter.S |

Re: [PATCH v3 2/5] virtio-pmem: Add virtio pmem driver

2019-01-14 Thread Pankaj Gupta
> > This patch adds virtio-pmem driver for KVM guest. > > > > Guest reads the persistent memory range information from > > Qemu over VIRTIO and registers it on nvdimm_bus. It also > > creates a nd_region object with the persistent memory > > range information so that existing 'nvdimm/pmem'

[PATCH v2 3/4] arm64: kprobes: Move exception_text check in blacklist

2019-01-14 Thread Masami Hiramatsu
Move exception/irqentry text address check in blacklist, since those are symbol based rejection. If we prohibit probing on the symbols in exception_text, those should be blacklisted. Signed-off-by: Masami Hiramatsu --- arch/arm64/kernel/probes/kprobes.c |6 ++ 1 file changed, 2

[PATCH v2 4/4] arm64: kprobes: Use arch_populate_kprobe_blacklist()

2019-01-14 Thread Masami Hiramatsu
Use arch_populate_kprobe_blacklist() instead of arch_within_kprobe_blacklist() so that we can see the full blacklisted symbols under the debugfs. Signed-off-by: Masami Hiramatsu --- arch/arm64/kernel/probes/kprobes.c | 42 1 file changed, 23 insertions(+),

[PATCH v2 2/4] arm64: kprobes: Remove unneeded RODATA check

2019-01-14 Thread Masami Hiramatsu
Remove unneeded RODATA check from arch_prepare_kprobe(). Since check_kprobe_address_safe() already ensured that the probe address is in kernel text, we don't need to check whether the address in RODATA or not. That must be always false. Signed-off-by: Masami Hiramatsu ---

[PATCH v2 1/4] arm64: kprobes: Move extable address check into arch_prepare_kprobe()

2019-01-14 Thread Masami Hiramatsu
Move extable address check into arch_prepare_kprobe() from arch_within_kprobe_blacklist(). The blacklist is exposed via debugfs as a list of symbols. The extable entries are smaller, so must be filtered out by arch_prepare_kprobe(). Signed-off-by: Masami Hiramatsu Reviewed-by: James Morse ---

[PATCH v2 0/4] arm64: kprobes: Update blacklist checking on arm64

2019-01-14 Thread Masami Hiramatsu
Hello, Here is the v2 series of update of the kprobe blacklist checking on arm64. I found that some blacklist checking code were mis-placed in arch_prepare_kprobe() and arch_within_kprobe_blacklist(). Since the blacklist just filters by symbol, smaller than the symbol, like extable must be

Re: [PATCHv2 0/7] x86_64/mm: remove bottom-up allocation style by pushing forward the parsing of mem hotplug info

2019-01-14 Thread Pingfan Liu
On Tue, Jan 15, 2019 at 7:02 AM Dave Hansen wrote: > > On 1/10/19 9:12 PM, Pingfan Liu wrote: > > Background > > When kaslr kernel can be guaranteed to sit inside unmovable node > > after [1]. > > What does this "[1]" refer to? > https://lore.kernel.org/patchwork/patch/1029376/ > Also, can you

[PATCH] RDMA/mlx5: Replace kzalloc with kcalloc

2019-01-14 Thread Gustavo A. R. Silva
Replace kzalloc() function with its 2-factor argument form, kcalloc(). This patch replaces cases of: kzalloc(a * b, gfp) with: kcalloc(a, b, gfp) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/infiniband/hw/mlx5/main.c | 2

Re: [PATCH] Documentation/ABI: Correct mlxreg-io KernelVersion for 5.0

2019-01-14 Thread Andy Shevchenko
On Sun, Jan 13, 2019 at 6:32 AM Darren Hart (VMware) wrote: > > The mlxreg-io for the merge window assumed 4.21 as the next kernel > version. Replace 4.21 with 5.0. > Reviewed-by: Andy Shevchenko > Signed-off-by: Darren Hart (VMware) > --- > Documentation/ABI/stable/sysfs-driver-mlxreg-io |

Re: [PATCH 2/8] libertas: change snprintf to scnprintf for possible overflow

2019-01-14 Thread Kalle Valo
Willy Tarreau writes: > From: Silvio Cesare > > Change snprintf to scnprintf. There are generally two cases where using > snprintf causes problems. > > 1) Uses of size += snprintf(buf, SIZE - size, fmt, ...) > In this case, if snprintf would have written more characters than what the > buffer

Re: [PATCH] remoteproc/qcom_sysmon.c: Remove duplicate header

2019-01-14 Thread Bjorn Andersson
On Wed 09 Jan 06:29 PST 2019, Brajeswar Ghosh wrote: > Remove linux/notifier.h which is included more than once > Applied, with Souptick's ack. Thanks, Bjorn > Signed-off-by: Brajeswar Ghosh > --- > drivers/remoteproc/qcom_sysmon.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git

Re: [PATCH 1/3] arm64: kprobes: Move extable address check into arch_prepare_kprobe()

2019-01-14 Thread Masami Hiramatsu
On Fri, 11 Jan 2019 18:22:38 + James Morse wrote: > Hi, > > On 09/01/2019 02:05, Masami Hiramatsu wrote: > > On Tue, 8 Jan 2019 17:13:36 + > > James Morse wrote: > >> On 08/01/2019 02:39, Masami Hiramatsu wrote: > >>> On Thu, 3 Jan 2019 17:05:18 + > >>> James Morse wrote: >

Re: [Ocfs2-devel] [PATCH] ocfs2: fix the application IO timeout when fstrim is running

2019-01-14 Thread Gang He
Hello Changewei, >>> On 2019/1/15 at 11:50, in message <63adc13fd55d6546b7dece290d39e3730127825...@h3cmlb12-ex.srv.huawei-3com.com>, Changwei Ge wrote: > Hi Gang, > > Most parts of this patch look sane to me, just a tiny question... > > On 2019/1/11 17:01, Gang He wrote: >> The user reported

Re: [PATCH] staging/android/vsoc: Remove duplicate header

2019-01-14 Thread Souptick Joarder
On Wed, Jan 9, 2019 at 8:56 PM Brajeswar Ghosh wrote: > > Remove linux/mutex.h.h which is included more than once > > Signed-off-by: Brajeswar Ghosh Acked-by: Souptick Joarder > --- > drivers/staging/android/vsoc.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git

Re: [PATCH] remoteproc/qcom_sysmon.c: Remove duplicate header

2019-01-14 Thread Souptick Joarder
On Wed, Jan 9, 2019 at 8:00 PM Brajeswar Ghosh wrote: > > Remove linux/notifier.h which is included more than once > > Signed-off-by: Brajeswar Ghosh Acked-by: Souptick Joarder > --- > drivers/remoteproc/qcom_sysmon.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git

Re: [PATCH] mfd: cros_ec: Add support for MKBP more event flags

2019-01-14 Thread Gwendal Grignou
On Mon, Jan 14, 2019 at 6:04 PM Brian Norris wrote: > > Hi Gwendal, > > On Mon, Jan 14, 2019 at 3:50 PM Gwendal Grignou wrote: > > On Fri, Dec 7, 2018 at 2:22 PM Brian Norris > > wrote: > > > On Thu, Nov 29, 2018 at 11:55:48AM -0800, egran...@google.com wrote: > > > > ---

Re: [PATCH 9/9] xen/privcmd-buf.c: Convert to use vm_insert_range_buggy

2019-01-14 Thread Souptick Joarder
On Tue, Jan 15, 2019 at 5:01 AM Boris Ostrovsky wrote: > > On 1/11/19 10:13 AM, Souptick Joarder wrote: > > Convert to use vm_insert_range_buggy() to map range of kernel > > memory to user vma. > > > > This driver has ignored vm_pgoff. We could later "fix" these drivers > > to behave according to

Re: [PATCH v3 0/6] Static calls

2019-01-14 Thread H. Peter Anvin
On 1/14/19 9:01 PM, H. Peter Anvin wrote: > > This could be as simple as spinning for a limited time waiting for > states 0 or 3 if we are not the patching CPU. It is also not necessary > to wait for the mask to become zero for the first sync if we find > ourselves suddenly in state 4. > So

Problem of TCP bandwidth drops when change MTU to a small value

2019-01-14 Thread Weilong Chen
Hi, when we change the mtu to a small value, for example, ifconfig eth0 mtu 68, IPERF test shows there's a great bandwidth drop while previous kernel versions don't. Git bisect find the differences is from the patch 28d35bcdd3925e7293408cdb8aa5f2aac5f0d6e3 (net: ipv4: don't let PMTU updates

Re: [Qemu-devel] [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-14 Thread Pankaj Gupta
> > > > > > > > On Mon, Jan 14, 2019 at 02:15:40AM -0500, Pankaj Gupta wrote: > > > > > > > > > > > > Until you have images (and hence host page cache) shared between > > > > > > > multiple guests. People will want to do this, because it means > > > > > > > they > > > > > > > only need a single

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-14 Thread Pankaj Gupta
> > > On Mon, Jan 14, 2019 at 02:15:40AM -0500, Pankaj Gupta wrote: > > > > > > > > > > Until you have images (and hence host page cache) shared between > > > > > > multiple guests. People will want to do this, because it means they > > > > > > only need a single set of pages in host memory for

Re: [PATCH] pinctrl: cherryview: fix Strago DMI workaround

2019-01-14 Thread Andy Shevchenko
On Mon, Jan 14, 2019 at 07:38:36PM -0800, Dmitry Torokhov wrote: > Well, hopefully 3rd time is a charm. We tried making that check > DMI_BIOS_VERSION and DMI_BOARD_VERSION, but the real one is > DMI_PRODUCT_VERSION. Reviewed-by: Andy Shevchenko > Fixes: 86c5dd6860a6 ("pinctrl: cherryview: limit

Re: [RFC PATCH] x86, numa: always initialize all possible nodes

2019-01-14 Thread Pingfan Liu
[...] > > > > I would appreciate a help with those architectures because I couldn't > > really grasp how the memoryless nodes are really initialized there. E.g. > > ppc only seem to call setup_node_data for online nodes but I couldn't > > find any special treatment for nodes without any memory. >

Re: [PATCH v2] rbtree: fix the red root

2019-01-14 Thread Qian Cai
> [ 114.913404] Padding 6913c65d: 00 00 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 > [ 114.915437] Padding 2d53f25c: 00 00 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 > [ 114.917390] Padding 78f7d621: 00 00 00 00 00 00 00 00 00 00

Regression in 32-bit-compat TIOCGPTPEER ioctl due to 311fc65c9fb9c966bca8e6f3ff8132ce57344ab9

2019-01-14 Thread Robert O'Callahan
This commit refactored the implementation of TIOCGPTPEER, moving "case TIOCGPTPEER" from pty_unix98_ioctl() to tty_ioctl(). pty_unix98_ioctl() is called by pty_unix98_compat_ioctl(), so before the commit, TIOCGPTPEER worked for 32-bit userspace. Unfortunately tty_compat_ioctl() does not call

[PATCH] drm/amdgpu: Replace kzalloc with kcalloc

2019-01-14 Thread Gustavo A. R. Silva
Replace kzalloc() function with its 2-factor argument form, kcalloc(). This patch replaces cases of: kzalloc(a * b, gfp) with: kcalloc(a, b, gfp) Also, improve the coding style and the use of sizeof during allocation by changing sizeof(struct dc_surface_update) and

Re: [PATCH V2] x86/kexec: fix a kexec_file_load failure

2019-01-14 Thread Dave Young
On 12/28/18 at 09:12am, Dave Young wrote: > The code cleanup mentioned in Fixes tag changed the behavior of > kexec_locate_mem_hole. The kexec_locate_mem_hole will try to > allocate free memory only when kbuf.mem is initialized as zero. > > But in x86 kexec_file_load implementation there are a

Re: [PATCH v3 0/6] Static calls

2019-01-14 Thread H. Peter Anvin
On 1/14/19 7:05 PM, Andy Lutomirski wrote: > On Mon, Jan 14, 2019 at 2:55 PM H. Peter Anvin wrote: >> >> I think this sequence ought to work (keep in mind we are already under a >> mutex, so the global data is safe even if we are preempted): > > I'm trying to wrap my head around this. The

[PATCH v6] ftrace: support early boot function tracing

2019-01-14 Thread Abderrahmane Benbachir
Rebasing and fixing conflicts. Thanks. Previous changes: PATCH v1: Initial patch PATCH v2: Removed arch specific code and use the default clock. Add more code re-usability Add HAVE_EARLY_BOOT_FTRACE config option, which will be disabled by default PATCH v3: Write early boot temporary

Re: [PATCH v2 4/8] ASoC: imx-audmux: change snprintf to scnprintf for possible overflow

2019-01-14 Thread Gustavo A. R. Silva
Hi Willy, On 1/14/19 9:27 PM, Willy Tarreau wrote: From: Silvio Cesare Change snprintf to scnprintf. There are generally two cases where using snprintf causes problems. 1) Uses of size += snprintf(buf, SIZE - size, fmt, ...) In this case, if snprintf would have written more characters than

Re: [PATCH 8/9] xen/gntdev.c: Convert to use vm_insert_range

2019-01-14 Thread Souptick Joarder
On Tue, Jan 15, 2019 at 4:58 AM Boris Ostrovsky wrote: > > On 1/11/19 10:12 AM, Souptick Joarder wrote: > > Convert to use vm_insert_range() to map range of kernel > > memory to user vma. > > > > Signed-off-by: Souptick Joarder > > Reviewed-by: Boris Ostrovsky > > (although it would be good to

[PATCH v2] Staging: fbtft: Switch to the gpio descriptor interface

2019-01-14 Thread Nishad Kamdar
This switches the fbtft driver to use GPIO descriptors rather than numerical gpios: Utilize the GPIO library's intrinsic handling of OF GPIOs and polarity. If the line is flagged active low, gpiolib will deal with this. Remove gpios from platform device structure. Neither assign statically

Re: [PATCH] powerpc: PCI does not require PowerNV

2019-01-14 Thread Alexey Kardashevskiy
On 15/01/2019 11:47, Jason A. Donenfeld wrote: > Commit 0e759bd75285 moved around the declaration of pnv_npu2_init, but > did not conditionalize it inside of the PCI pSeries driver. This meant > that CONFIG_PCI && CONFIG_PPC_PSERIES && !CONFIG_PPC_POWERNV resulted > in: > >

KASAN: use-after-scope Read in corrupted

2019-01-14 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:1bdbe2274920 Merge tag 'vfio-v5.0-rc2' of git://github.com.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1519d39f40 kernel config: https://syzkaller.appspot.com/x/.config?x=edf1c3031097c304

Re: [PATCH v4 0/3] Reset controller support for i.MX8MQ

2019-01-14 Thread Andrey Smirnov
On Wed, Dec 19, 2018 at 5:07 PM Andrey Smirnov wrote: > > Everyone: > > This patch contains changes I made in order to add support for i.MX8MQ > to reset-imx7.c in order to enable support of PCIE IP block on i.MX8MQ > SoCs. > > Feedback is welcome! > > Thanks, > Andrey Smirnov > Philipp, are

[PATCH] staging: rtl8188eu: Replace kzalloc with kcalloc

2019-01-14 Thread Gustavo A. R. Silva
Replace kzalloc() function with its 2-factor argument form, kcalloc(). This patch replaces cases of: kzalloc(a * b, gfp) with: kcalloc(a, b, gfp) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva ---

Re: [PATCH] sbitmap: Protect swap_lock from hardirq

2019-01-14 Thread Jens Axboe
On 1/14/19 9:31 PM, Linus Torvalds wrote: > On Tue, Jan 15, 2019 at 4:28 PM Jens Axboe wrote: >> >> Thanks Ming, I'll queue this up for shipping this week. > > Oops. I _just_ applied it to my tree as a follow-up to Steven's > softirq version. I just hadn't had time to build test and push out >

[PATCH] tracing: Replace kzalloc with kcalloc

2019-01-14 Thread Gustavo A. R. Silva
Replace kzalloc() function with its 2-factor argument form, kcalloc(). This patch replaces cases of: kzalloc(a * b, gfp) with: kcalloc(a * b, gfp) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- kernel/trace/trace_probe.c | 4 ++--

Re: [PATCH] sbitmap: Protect swap_lock from hardirq

2019-01-14 Thread Linus Torvalds
On Tue, Jan 15, 2019 at 4:28 PM Jens Axboe wrote: > > Thanks Ming, I'll queue this up for shipping this week. Oops. I _just_ applied it to my tree as a follow-up to Steven's softirq version. I just hadn't had time to build test and push out yet. Linus

Re: [PATCH] sbitmap: Protect swap_lock from hardirq

2019-01-14 Thread Jens Axboe
On 1/14/19 8:59 PM, Ming Lei wrote: > The original report is actually one real deadlock: > > [ 106.132865] Possible interrupt unsafe locking scenario: > [ 106.132865] > [ 106.133659]CPU0CPU1 > [ 106.134194] >

Re: Real deadlock being suppressed in sbitmap

2019-01-14 Thread Steven Rostedt
On Tue, 15 Jan 2019 12:14:27 +0800 Ming Lei wrote: > As I mentioned, it should be fine given it is triggered only after one word > is run out of. > > Follows the lockdep warning on the latest linus tree: Thanks for following up on this. Yes, this requires the irqsave then. -- Steve

[PATCH v9 16/22] char/nvram: Add "devname:nvram" module alias

2019-01-14 Thread Finn Thain
Signed-off-by: Finn Thain --- drivers/char/nvram.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index adcc213c331e..c9e295d73dc5 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c @@ -503,3 +503,4 @@ module_exit(nvram_module_exit);

[PATCH v9 05/22] m68k/atari: Implement arch_nvram_ops struct

2019-01-14 Thread Finn Thain
By implementing an arch_nvram_ops struct, a platform can re-use the drivers/char/nvram.c module without needing any arch-specific code in that module. Atari does so here. Acked-by: Geert Uytterhoeven Signed-off-by: Finn Thain --- Changed since v8: - Added static inline wrapper functions to

[PATCH v9 02/22] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

2019-01-14 Thread Finn Thain
Move the m68k-specific code out of the driver to make the driver generic. I've used 'SPDX-License-Identifier: GPL-2.0+' for the new file because the old file is covered by MODULE_LICENSE("GPL"). Acked-by: Geert Uytterhoeven Signed-off-by: Finn Thain --- Changed since v8: - Fixed an old bug by

[PATCH v9 03/22] char/nvram: Re-order functions to remove forward declarations and #ifdefs

2019-01-14 Thread Finn Thain
Also give functions more sensible names: nvram_misc_* for misc device ops, nvram_proc_* for proc file ops and nvram_module_* for init and exit functions. This prevents name collisions with nvram.h helper functions and improves readability. Signed-off-by: Finn Thain --- drivers/char/nvram.c |

[PATCH v9 04/22] nvram: Replace nvram_* function exports with static functions

2019-01-14 Thread Finn Thain
Replace nvram_* functions with static functions in nvram.h. These will become wrappers for struct nvram_ops method calls. This patch effectively disables existing NVRAM functionality so as to allow the rest of the series to be bisected without build failures. That functionality is gradually

[PATCH v9 08/22] char/nvram: Allow the set_checksum and initialize ioctls to be omitted

2019-01-14 Thread Finn Thain
The drivers/char/nvram.c module has previously supported only RTC "CMOS" NVRAM, for which it provides appropriate checksum ioctls. Make these ioctls optional so the module can be re-used with other kinds of NVRAM. The ops struct methods that implement the ioctls now return error codes so that a

[PATCH v9 01/22] scsi/atari_scsi: Don't select CONFIG_NVRAM

2019-01-14 Thread Finn Thain
On powerpc, setting CONFIG_NVRAM=n builds a kernel with no NVRAM support. Setting CONFIG_NVRAM=m enables the /dev/nvram misc device module without enabling NVRAM support in drivers. Setting CONFIG_NVRAM=y enables the misc device (built-in) and also enables NVRAM support in drivers. m68k shares

[PATCH v9 06/22] powerpc: Replace nvram_* extern declarations with standard header

2019-01-14 Thread Finn Thain
Remove the nvram_read_byte() and nvram_write_byte() declarations in powerpc/include/asm/nvram.h and use the cross-platform static functions in linux/nvram.h instead. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- Changed since v8: - Added nvram_read_byte() and nvram_write_byte()

[PATCH v9 10/22] m68k/atari: Implement arch_nvram_ops methods and enable CONFIG_HAVE_ARCH_NVRAM_OPS

2019-01-14 Thread Finn Thain
Atari RTC NVRAM uses a checksum so implement the remaining arch_nvram_ops methods for the set_checksum and initialize ioctls. Enable CONFIG_HAVE_ARCH_NVRAM_OPS. Acked-by: Geert Uytterhoeven Signed-off-by: Finn Thain --- Changed since v8: - Moved the HAVE_ARCH_NVRAM_OPS symbol to common code as

[PATCH v9 22/22] powerpc: Adopt nvram module for PPC64

2019-01-14 Thread Finn Thain
Adopt nvram module to reduce code duplication. This means CONFIG_NVRAM becomes available to PPC64 builds. Previously it was only available to PPC32 builds because it depended on CONFIG_GENERIC_NVRAM. The IOC_NVRAM_GET_OFFSET ioctl as implemented on PPC64 validates the offset returned by

[PATCH v9 18/22] powerpc: Implement nvram ioctls

2019-01-14 Thread Finn Thain
Add the powerpc-specific ioctls to the nvram module. This allows the nvram module to replace the generic_nvram module. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- On PPC32, the IOC_NVRAM_SYNC ioctl call always returns 0, even for those platforms that don't implement ppc_md.nvram_sync.

[PATCH v9 20/22] powerpc: Enable HAVE_ARCH_NVRAM_OPS and disable GENERIC_NVRAM

2019-01-14 Thread Finn Thain
Switch PPC32 kernels from the generic_nvram module to the nvram module. Also fix a theoretical bug where CHRP omits the chrp_nvram_init() call when CONFIG_NVRAM_MODULE=m. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- The change in the name of the module is visible to userspace. The

[PATCH v9 07/22] char/nvram: Adopt arch_nvram_ops

2019-01-14 Thread Finn Thain
NVRAMs on different platforms and architectures have different attributes and access methods. E.g. some platforms have byte-at-a-time accessor functions while others have byte-range accessor functions. Some have checksum functionality while others do not. By calling ops struct methods via the

[PATCH v9 17/22] powerpc: Define missing ppc_md.nvram_size for CHRP and PowerMac

2019-01-14 Thread Finn Thain
Add the nvram_size() function to those PowerPC platforms that don't already have one: CHRP and PowerMac. This means that the ppc_md.nvram_size() function can be called by nvram_get_size(). Since we are addressing CHRP inconsistencies here, rename chrp_nvram_read and chrp_nvram_write, which break

[PATCH v9 15/22] m68k: Dispatch nvram_ops calls to Atari or Mac functions

2019-01-14 Thread Finn Thain
A multi-platform kernel binary has to decide at run-time how to dispatch the arch_nvram_ops calls. Add a platform-independent arch_nvram_ops struct for this, to replace the atari-specific one. Enable CONFIG_HAVE_ARCH_NVRAM_OPS for Macs. Acked-by: Geert Uytterhoeven Tested-by: Stan Johnson

[PATCH v9 11/22] m68k/mac: Adopt naming and calling conventions for PRAM routines

2019-01-14 Thread Finn Thain
Adopt the existing *_read_byte and *_write_byte naming convention. Rename via_pram_readbyte and via_pram_writebyte to avoid confusion. Adjust calling conventions of mac_pram_* functions to match the struct nvram_ops methods. Acked-by: Geert Uytterhoeven Tested-by: Stan Johnson Signed-off-by:

[PATCH v9 14/22] macintosh/via-cuda: Don't rely on Cuda to end a transfer

2019-01-14 Thread Finn Thain
Certain Cuda transfers have to be ended by the driver. According to Apple's open source Cuda driver, as found in mkLinux and XNU, this applies to any "open ended request such as PRAM read". This fixes an infinite polling loop in cuda_pram_read_byte(). Tested-by: Stan Johnson Signed-off-by: Finn

[PATCH v9 13/22] m68k/mac: Fix PRAM accessors

2019-01-14 Thread Finn Thain
PMU-based m68k Macs pre-date PowerMac-style NVRAM. Use the appropriate PMU commands. Also implement the missing XPRAM accessors for VIA-based Macs. Acked-by: Geert Uytterhoeven Tested-by: Stan Johnson Signed-off-by: Finn Thain --- Changed since v7: - Revised PMU response decoding due to

[PATCH v9 00/22] Re-use nvram module

2019-01-14 Thread Finn Thain
The "generic" NVRAM module, drivers/char/generic_nvram.c, implements a /dev/nvram misc device. This module is used only by 32-bit PowerPC platforms. The RTC "CMOS" NVRAM module, drivers/char/nvram.c, also implements a /dev/nvram misc device. This module is now used only by x86 and m68k thanks to

[PATCH v9 21/22] char/generic_nvram: Remove as unused

2019-01-14 Thread Finn Thain
Signed-off-by: Finn Thain --- drivers/char/Makefile| 6 +- drivers/char/generic_nvram.c | 160 --- 2 files changed, 1 insertion(+), 165 deletions(-) delete mode 100644 drivers/char/generic_nvram.c diff --git a/drivers/char/Makefile

[PATCH v9 19/22] powerpc, fbdev: Use NV_CMODE and NV_VMODE only when CONFIG_PPC32 && CONFIG_PPC_PMAC && CONFIG_NVRAM

2019-01-14 Thread Finn Thain
This patch addresses inconsistencies in Mac framebuffer drivers and their use of Kconfig symbols relating to NVRAM, so PPC64 can use CONFIG_NVRAM. The defined(CONFIG_NVRAM) condition is replaced with the weaker IS_REACHABLE(CONFIG_NVRAM) condition, like atari_scsi. Macintosh framebuffer drivers

[PATCH v9 12/22] m68k/mac: Use macros for RTC accesses not magic numbers

2019-01-14 Thread Finn Thain
This is intended to improve code style and not affect code behaviour. Acked-by: Geert Uytterhoeven Tested-by: Stan Johnson Signed-off-by: Finn Thain --- arch/m68k/mac/misc.c | 59 ++-- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git

[PATCH v9 09/22] char/nvram: Implement NVRAM read/write methods

2019-01-14 Thread Finn Thain
Refactor the RTC "CMOS" NVRAM functions so that they can be used as arch_nvram_ops methods. Checksumming logic is moved from the misc device operations to the nvram read/write operations. This makes the misc device implementation more generic. This preserves the locking mechanism such that "read

Re: Real deadlock being suppressed in sbitmap

2019-01-14 Thread Ming Lei
On Mon, Jan 14, 2019 at 10:50:17PM -0500, Steven Rostedt wrote: > On Tue, 15 Jan 2019 11:23:56 +0800 > Ming Lei wrote: > > > Given 'swap_lock' can be acquired from blk_mq_dispatch_rq_list() via > > blk_mq_get_driver_tag() directly, the above deadlock may be possible. > > > > Sounds the correct

Re: [PATCH v2] PCI: avoid bridge feature re-probing on hotplug

2019-01-14 Thread Michael S. Tsirkin
On Thu, Dec 20, 2018 at 05:36:03PM -0500, Michael S. Tsirkin wrote: > On Thu, Dec 20, 2018 at 04:31:58PM -0600, Bjorn Helgaas wrote: > > On Thu, Dec 20, 2018 at 04:26:54PM -0500, Michael S. Tsirkin wrote: > > > On Thu, Dec 20, 2018 at 01:49:50PM -0600, Bjorn Helgaas wrote: > > > > On Mon, Dec 17,

[PATCH] sbitmap: Protect swap_lock from hardirq

2019-01-14 Thread Ming Lei
The original report is actually one real deadlock: [ 106.132865] Possible interrupt unsafe locking scenario: [ 106.132865] [ 106.133659]CPU0CPU1 [ 106.134194] [ 106.134733]

Re: [PATCH] block/blk-sysfs.c: Remove last reference of blk_init_queue

2019-01-14 Thread Jens Axboe
On 1/14/19 8:06 PM, Marcos Paulo de Souza wrote: > blk_init_queue was removed in a1ce35fa4985. Honestly, most of that comment is wrong anyway. Since this isn't a visible API, I'd just kill the comment completely. > Signed-off-by: Marcos Paulo de Souza > --- > There are more two references in

Re: [PATCH V2 2/2] Input: rotaty-encoder - Add DT binding document

2019-01-14 Thread Dmitry Torokhov
[ resending to Rob... ] On Tue, Jan 08, 2019 at 01:42:49AM +0900, Donghoon Han wrote: > Add DT binding document for rotary-encoder, keycode options. > > Signed-off-by: Donghoon Han > Cc: Dmitry Torokhov > Cc: Daniel Mack > Cc: devicet...@vger.kernel.org > To: linux-in...@vger.kernel.org > ---

Re: [PATCH V2 2/2] Input: rotaty-encoder - Add DT binding document

2019-01-14 Thread Dmitry Torokhov
On Tue, Jan 08, 2019 at 01:42:49AM +0900, Donghoon Han wrote: > Add DT binding document for rotary-encoder, keycode options. > > Signed-off-by: Donghoon Han > Cc: Dmitry Torokhov > Cc: Daniel Mack > Cc: devicet...@vger.kernel.org > To: linux-in...@vger.kernel.org > --- >

Re: [Ocfs2-devel] [PATCH] ocfs2: fix the application IO timeout when fstrim is running

2019-01-14 Thread Changwei Ge
Hi Gang, Most parts of this patch look sane to me, just a tiny question... On 2019/1/11 17:01, Gang He wrote: > The user reported this problem, the upper application IO was > timeout when fstrim was running on this ocfs2 partition. the > application monitoring resource agent considered that this

Re: Real deadlock being suppressed in sbitmap

2019-01-14 Thread Steven Rostedt
On Tue, 15 Jan 2019 11:23:56 +0800 Ming Lei wrote: > Given 'swap_lock' can be acquired from blk_mq_dispatch_rq_list() via > blk_mq_get_driver_tag() directly, the above deadlock may be possible. > > Sounds the correct fix may be the following one, and the irqsave cost > should be fine given

Re: Real deadlock being suppressed in sbitmap

2019-01-14 Thread Ming Lei
On Mon, Jan 14, 2019 at 08:41:16PM -0700, Jens Axboe wrote: > On 1/14/19 8:23 PM, Ming Lei wrote: > > Hi Steven, > > > > On Mon, Jan 14, 2019 at 12:14:14PM -0500, Steven Rostedt wrote: > >> It was brought to my attention (by this creating a splat in the RT tree > >> too) this code: > >> > >>

  1   2   3   4   5   6   7   8   9   10   >