[Patch v6 03/22] CIFS: SMBD: Add rdma mount option

2017-11-04 Thread Long Li
From: Long Li Add "rdma" to CIFS mount options to connect to SMB Direct. Add checks to validate this is used on SMB 3.X dialects. To connect to SMBDirect, use "mount.cifs -o rdma,vers=3.x". At the time of this patch, 3.x can be 3.0, 3.02 or 3.1.1. Signed-off-by: Long Li --- fs/cifs/cifs_debug

[Patch v6 04/22] CIFS: SMBD: Add SMB Direct protocol initial values and constants

2017-11-04 Thread Long Li
From: Long Li To prepare for protocol implementation, add constants and user-configurable values for the SMB Direct protocol. Signed-off-by: Long Li --- fs/cifs/smbdirect.c | 77 + fs/cifs/smbdirect.h | 21 +++ 2 files changed, 98

[Patch v6 21/22] CIFS: SMBD: Upper layer performs SMB read via RDMA write through memory registration

2017-11-04 Thread Long Li
From: Long Li If I/O size is larger than rdma_readwrite_threshold, use RDMA write for SMB read by specifying channel SMB2_CHANNEL_RDMA_V1 or SMB2_CHANNEL_RDMA_V1_INVALIDATE in the SMB packet, depending on SMB dialect used. Append a smbd_buffer_descriptor_v1 to the end of the SMB packet and fill i

[Patch v6 13/22] CIFS: SMBD: Set SMB Direct maximum read or write size for I/O

2017-11-04 Thread Long Li
From: Long Li When connecting over SMB Direct, the transport negotiates its maximum I/O sizes with the server and determines how to choose to do RDMA send/recv vs read/write. Expose these maximum I/O sizes to upper layer so we will get the correct sized payloads. Signed-off-by: Long Li --- fs/

[Patch v6 07/22] CIFS: SMBD: Implement function to create a SMB Direct connection

2017-11-04 Thread Long Li
From: Long Li The upper layer calls this function to connect to peer through SMB Direct. Each SMB Direct connection is based on a RDMA RC Queue Pair. Signed-off-by: Long Li --- fs/cifs/smbdirect.c | 17 + 1 file changed, 17 insertions(+) diff --git a/fs/cifs/smbdirect.c b/fs/c

[Patch v6 09/22] CIFS: SMBD: Implement function to reconnect to a SMB Direct transport

2017-11-04 Thread Long Li
From: Long Li Add function to implement a reconnect to SMB Direct. This involves tearing down the current connection and establishing/negotiating a new connection. Signed-off-by: Long Li --- fs/cifs/smbdirect.c | 36 1 file changed, 36 insertions(+) diff -

[Patch v6 12/22] CIFS: SMBD: Upper layer destroys SMB Direct session on shutdown or umount

2017-11-04 Thread Long Li
From: Long Li When upper layer wants to umount, make it call shutdown on transport when SMB Direct is used. Signed-off-by: Long Li --- fs/cifs/connect.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 8ca3c13..23f10d1 100644

[Patch v6 11/22] CIFS: SMBD: Implement function to destroy a SMB Direct connection

2017-11-04 Thread Long Li
From: Long Li Add function to tear down a SMB Direct connection. This is used by upper layer to free all SMB Direct connection and transport resources. Signed-off-by: Long Li --- fs/cifs/smbdirect.c | 16 1 file changed, 16 insertions(+) diff --git a/fs/cifs/smbdirect.c b/fs/

[Patch v6 22/22] CIFS: SMBD: Add SMB Direct debug counters

2017-11-04 Thread Long Li
From: Long Li For debugging and troubleshooting, export SMBDirect debug counters to /proc/fs/cifs/DebugData. Signed-off-by: Long Li --- fs/cifs/cifs_debug.c | 66 1 file changed, 66 insertions(+) diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/

[Patch v6 00/22] CIFS: Implement SMB Direct protocol

2017-11-04 Thread Long Li
From: Long Li Starting with SMB2 dialect 3.0, Microsoft introduced SMB Direct transport protocol for transferring upper layer (SMB2) payload over RDMA via Infiniband, RoCE or iWARP. The prococol is published in [MS-SMBD] (https://msdn.microsoft.com/en-us/library/hh536346.aspx). Patch v2 added RD

[Patch v6 01/22] CIFS: SMBD: Add parameter rdata to smb2_new_read_req

2017-11-04 Thread Long Li
From: Long Li This patch is for preparing upper layer for doing SMB read via RDMA write. When the SMB read packet header is assembled, SMB Direct code needs to know the I/O layout if this request is to use a RDMA write. rdata has all the information of I/O layout for memory registration. Add rd

[Patch v6 17/22] CIFS: SMBD: Upper layer sends data via RDMA send

2017-11-04 Thread Long Li
From: Long Li With SMB Direct connected, use it for sending data via RDMA send. Signed-off-by: Long Li --- fs/cifs/transport.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 7efbab0..1b51d08 100644 --- a/fs/ci

[Patch v6 08/22] CIFS: SMBD: Upper layer connects to SMBDirect session

2017-11-04 Thread Long Li
From: Long Li When "rdma" is specified in the mount option, make CIFS connect to SMB Direct. Signed-off-by: Long Li --- fs/cifs/connect.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index b5a575f..2c0b34

[Patch v6 15/22] CIFS: SMBD: Upper layer receives data via RDMA receive

2017-11-04 Thread Long Li
From: Long Li With SMB Direct connected, use it for receiving data via RDMA receive. Signed-off-by: Long Li --- fs/cifs/connect.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 23f10d1..6325062 100644 --- a/fs/cifs/connect

[Patch v6 16/22] CIFS: SMBD: Implement function to send data via RDMA send

2017-11-04 Thread Long Li
From: Long Li The transport doesn't maintain send buffers or send queue for transferring payload via RDMA send. There is no data copy in the transport on send. Signed-off-by: Long Li --- fs/cifs/smbdirect.c | 246 fs/cifs/smbdirect.h | 3 +

[Patch v6 18/22] CIFS: SMBD: Implement RDMA memory registration

2017-11-04 Thread Long Li
From: Long Li Memory registration is used for transferring payload via RDMA read or write. After I/O is done, memory registrations are recovered and reused. This process can be time consuming and is done in a work queue at the same time or after I/O is returned to upper layer. Signed-off-by: Lo

[Patch v6 05/22] CIFS: SMBD: Establish SMB Direct connection

2017-11-04 Thread Long Li
From: Long Li Add code to implement the core functions to establish a SMB Direct connection. 1. Establish an RDMA connection to SMB server. 2. Negotiate and setup SMB Direct protocol. 3. Implement idle connection timer and credit management. SMB Direct is enabled by setting CONFIG_CIFS_SMB_DIRE

[Patch v6 20/22] CIFS: SMBD: Read correct returned data length for RDMA write (SMB read) I/O

2017-11-04 Thread Long Li
From: Long Li This patch is for preparing upper layer doing SMB read via RDMA write. When RDMA write is used for SMB read, the returned data length is in DataRemaining in the response packet. Reading it properly by adding a parameter to specifiy where the returned data length is. Add the defiti

[Patch v6 06/22] CIFS: SMBD: export protocol initial values

2017-11-04 Thread Long Li
From: Long Li For use-configurable SMB Direct protocol values, export them to /proc/fs/cifs. Signed-off-by: Long Li --- fs/cifs/cifs_debug.c | 79 1 file changed, 79 insertions(+) diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c ind

[Patch v6 02/22] CIFS: SMBD: Introduce kernel config option CONFIG_CIFS_SMB_DIRECT

2017-11-04 Thread Long Li
From: Long Li SMB Direct is a protocol for transferring SMB packets over RDMA. It was introduced with Windows Serer 2012 and SMB 3.0. With CONFIG_CIFS_SMB_DIRECT=y, SMB Direct code is built as part of CIFS. Signed-off-by: Long Li --- fs/cifs/Kconfig | 8 1 file changed, 8 insertions(

[Patch v6 19/22] CIFS: SMBD: Upper layer performs SMB write via RDMA read through memory registration

2017-11-04 Thread Long Li
From: Long Li When sending I/O, if size is larger than rdma_readwrite_threshold we prepare to send SMB write packet for a RDMA read via memory registration. The actual I/O is done by remote peer through local RDMA hardware. Modify the relevant fields in the packet accordingly, and append a smbd_b

[Patch v6 10/22] CIFS: SMBD: Upper layer reconnects to SMB Direct session

2017-11-04 Thread Long Li
From: Long Li Do a reconnect on SMB Direct when it is used as the connection. Reconnect can happen for many reasons and it's mostly the decision of SMB2 upper layer. Signed-off-by: Long Li --- fs/cifs/connect.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/fs/cifs/connect.c b/fs/c

[Patch v6 14/22] CIFS: SMBD: Implement function to receive data via RDMA receive

2017-11-04 Thread Long Li
From: Long Li On the receive path, the transport maintains receive buffers and a reassembly queue for transferring payload via RDMA recv. There is data copy in the transport on recv when it copies the payload to upper layer. The transport recognizes the RFC1002 header length use in the SMB upper

[PATCH 0/2] kbuild: move dtb-y and CONFIG_OF_ALL_DTBS to Kbuild core to fix some issues

2017-11-04 Thread Masahiro Yamada
This series applies on top of my previous cleanup patch: https://patchwork.kernel.org/patch/10038167/ This series must go to the same branch, so I am sending this to DT ML. Masahiro Yamada (2): MIPS: dts: remove bogus bcm96358nb4ser.dtb from dtb-y entry kbuild: handle dtb-y and CONFIG_OF_A

[PATCH 2/2] kbuild: handle dtb-y and CONFIG_OF_ALL_DTBS natively in Makefile.lib

2017-11-04 Thread Masahiro Yamada
If CONFIG_OF_ALL_DTBS is enabled, "make ARCH=arm64 dtbs" compiles each DTB twice; one from arch/arm64/boot/dts/*/Makefile and the other from the dtb-$(CONFIG_OF_ALL_DTBS) line in arch/arm64/boot/dts/Makefile. It could be a race problem when building DTBS in parallel. Another minor issue is CONFIG_

[PATCH 1/2] MIPS: dts: remove bogus bcm96358nb4ser.dtb from dtb-y entry

2017-11-04 Thread Masahiro Yamada
arch/mips/boot/dts/brcm/bcm96358nb4ser.dts does not exist, so we cannot build bcm96358nb4ser.dtb . Signed-off-by: Masahiro Yamada --- arch/mips/boot/dts/brcm/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/mips/boot/dts/brcm/Makefile b/arch/mips/boot/dts/brcm/Makefile index 69a

[PATCH 2/5] tty: serial: jsm: add blank line after declarations

2017-11-04 Thread Gimcuan Hui
This patch fixes checkpatch.pl warning: Missing a blank line after declarations. Signed-off-by: Gimcuan Hui --- drivers/tty/serial/jsm/jsm_tty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c index 729d2a083a74..ed58dfc3d4

[PATCH 4/5] tty: serial: jsm: fix coding style

2017-11-04 Thread Gimcuan Hui
This patch fixes the checkpatch.pl complain: ERROR: else should follow close brace '}'. Signed-off-by: Gimcuan Hui --- drivers/tty/serial/jsm/jsm_tty.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c index

[PATCH 5/5] tty: serial: jsm: add space before the open parenthesis '('

2017-11-04 Thread Gimcuan Hui
This patch fixes the checkpatch.pl complains: space required before the open parenthesis '('. Signed-off-by: Gimcuan Hui --- drivers/tty/serial/jsm/jsm_tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty

[PATCH 3/5] tty: serial: jsm: delete space between function name and '('

2017-11-04 Thread Gimcuan Hui
This patch fixes checkpatch.pl warning: space prohibited between function name and open parenthesis '('. Signed-off-by: Gimcuan Hui --- drivers/tty/serial/jsm/jsm_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/

[PATCH 0/5] TTY/JSM coding style fixes

2017-11-04 Thread Gimcuan Hui
This patch set fixes several warnings and errors reported by checkpatch.pl. Gimcuan Hui (5): tty: serial: jsm: change the type of local variable tty: serial: jsm: add blank line after declarations tty: serial: jsm: delete space between function name and '(' tty: serial: jsm: fix coding sty

[PATCH 1/5] tty: serial: jsm: change the type of local variable

2017-11-04 Thread Gimcuan Hui
The return type of jsm_get_mstat was int, and the local var result was for the return should be int, make the change. This patch fixes the checkpatch.pl warning: Prefer 'unsigned int' to bare use of 'unsigned'. Signed-off-by: Gimcuan Hui --- drivers/tty/serial/jsm/jsm_tty.c | 2 +- 1 file chang

[PATCH] thunderbolt: tb: fix use after free in tb_activate_pcie_devices

2017-11-04 Thread Gustavo A. R. Silva
Add a ̣̣continue statement in order to avoid using a previously free'd pointer tunnel in list_add. Addresses-Coverity-ID: 1415336 Fixes: 9d3cce0b6136 ("thunderbolt: Introduce thunderbolt bus and connection manager") Signed-off-by: Gustavo A. R. Silva --- drivers/thunderbolt/tb.c | 1 + 1 file c

Re: [PATCH] net/mlx5e/core/en_fs: fix pointer dereference after free in mlx5e_execute_l2_action

2017-11-04 Thread Saeed Mahameed
On Sat, Nov 4, 2017 at 8:54 PM, Gustavo A. R. Silva wrote: > hn is being kfree'd in mlx5e_del_l2_from_hash and then dereferenced > by accessing hn->ai.addr > > Fix this by copying the MAC address into a local variable for its safe use > in all possible execution paths within function mlx5e_execute

[PATCH v4] tty: serial: meson: allow baud-rates lower than 9600

2017-11-04 Thread Thomas Rohloff
Devices like DCF77 receivers need the baud-rate to be as low as 50. I have tested this on a Meson GXL device with uart_A. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Carlo Caione Cc: Kevin Hilman Cc: linux-amlo...@lists.infradead.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vg

Re: [PATCH 3.10 000/139] 3.10.108-stable review

2017-11-04 Thread Levin, Alexander (Sasha Levin)
On Thu, Nov 02, 2017 at 07:12:00AM +0100, Willy Tarreau wrote: >Hi Guenter, > >On Wed, Nov 01, 2017 at 06:21:13PM -0700, Guenter Roeck wrote: >> drivers/s390/scsi/zfcp_scsi.c: In function 'zfcp_task_mgmt_function': >> drivers/s390/scsi/zfcp_scsi.c:298:4: error: too many arguments to function >> 'z

Re: [PATCH v3] tty: serial: meson: allow baud-rates lower than 9600

2017-11-04 Thread V10lator
Am Samstag, 4. November 2017 14:13:52 CET schrieb Greg Kroah-Hartman: What changed from v2? Nothing. I just re-based the patch on a fresh git clone as you couldn't merge v2. And I need a real name as the author of the patch :( Damn, sorry about that. Will do a v4.

Re: [PATCH v3] scsi: require CAP_SYS_ADMIN to write to procfs interface

2017-11-04 Thread Aleksa Sarai
On 11/05/2017 01:56 PM, Aleksa Sarai wrote: Previously, the only capability effectively required to operate on the /proc/scsi interface was CAP_DAC_OVERRIDE (or for some other files, having an fsuid of GLOBAL_ROOT_UID was enough). This means that semi-privileged processes could interfere with cor

[PATCH] net/mlx5e/core/en_fs: fix pointer dereference after free in mlx5e_execute_l2_action

2017-11-04 Thread Gustavo A. R. Silva
hn is being kfree'd in mlx5e_del_l2_from_hash and then dereferenced by accessing hn->ai.addr Fix this by copying the MAC address into a local variable for its safe use in all possible execution paths within function mlx5e_execute_l2_action. Addresses-Coverity-ID: 1417789 Fixes: eeb66cdb6826 ("net

Re: [f2fs-dev] [PATCH 2/2] f2fs: stop all the operations by cp_error flag

2017-11-04 Thread Chao Yu
Hi Jaegeuk, On 2017/10/24 17:51, Chao Yu wrote: > On 2017/10/24 6:14, Jaegeuk Kim wrote: >> This patch replaces to use cp_error flag instead of RDONLY for quota off. We should convert error number with block_page_mkwrite_return in .page_mkwrite, otherwise generic/019 will cause a deadlock issue w

[PATCH 2/2] staging: greybus: loopback: convert loopback to use generic async operations

2017-11-04 Thread Bryan O'Donoghue
Loopback has its own internal method for tracking and timing out asynchronous operations however previous patches make it possible to use functionality provided by operation.c to do this instead. Using the code in operation.c means we can completely subtract the timer, the work-queue, the kref and

[PATCH 1/2] staging: greybus: operation: add private data with get/set accessors

2017-11-04 Thread Bryan O'Donoghue
Asynchronous operation completion handler's lives are made easier if there is a generic pointer that can store private data associated with the operation. This patch adds a pointer field to operation.h and get/set methods to access that pointer. Signed-off-by: Bryan O'Donoghue Cc: Johan Hovold C

[PATCH 0/2] Convert greybus loopback to core async API

2017-11-04 Thread Bryan O'Donoghue
dbec27298b0d ('staging: greybus: operation: add generic timeout support') gives the ability to remove lots of the asynchronous operation code in loopback. Kees is also doing a cleanup of timer code which for loopback will go away when converting to the core API. These two patches kill two birds w

[PATCH v4 0/1] XDP program for ip forward

2017-11-04 Thread Christina Jacob
From: Christina Jacob The patch below implements port to port forwarding through route table and arp table lookup for ipv4 packets using bpf_redirect helper function and lpm_trie map. This has an improved performance over the normal kernel stack ip forward. Implementation details. -

[PATCH v4 1/1] xdp: Sample xdp program implementing ip forward

2017-11-04 Thread Christina Jacob
From: Christina Jacob Implements port to port forwarding with route table and arp table lookup for ipv4 packets using bpf_redirect helper function and lpm_trie map. Signed-off-by: Christina Jacob --- samples/bpf/Makefile | 4 + samples/bpf/xdp_router_ipv4_kern.c | 186

Re: [PATCH] kbuild: Set KBUILD_CFLAGS before incl. arch Makefile

2017-11-04 Thread Masahiro Yamada
2017-11-03 6:26 GMT+09:00 Nick Desaulniers : > From: Chris Fries > > Set the clang KBUILD_CFLAGS up before including arch/ Makefiles, > so that ld-options (etc.) can work correctly. ld-option is only used for arch/{arm64,powerpc}/Makefile arch/arm64/Makefile: ifeq ($(call ld-option, --fix-cort

Re: [RFC -mm] mm, userfaultfd, THP: Avoid waiting when PMD under THP migration

2017-11-04 Thread huang ying
On Fri, Nov 3, 2017 at 11:00 PM, Zi Yan wrote: > On 3 Nov 2017, at 3:52, Huang, Ying wrote: > >> From: Huang Ying >> >> If THP migration is enabled, the following situation is possible, >> >> - A THP is mapped at source address >> - Migration is started to move the THP to another node >> - Page f

[PATCH v3] scsi: require CAP_SYS_ADMIN to write to procfs interface

2017-11-04 Thread Aleksa Sarai
Previously, the only capability effectively required to operate on the /proc/scsi interface was CAP_DAC_OVERRIDE (or for some other files, having an fsuid of GLOBAL_ROOT_UID was enough). This means that semi-privileged processes could interfere with core components of a system (such as causing a Do

Re: [PATCH V9 3/4] scsi: Align block queue to dma_get_cache_alignment()

2017-11-04 Thread kbuild test robot
Hi Huacai, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.14-rc7] [cannot apply to next-20171103] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.c

[PATCH] drivers/pcmcia: omap1: Fix error in automated timer conversion

2017-11-04 Thread Kees Cook
One part of automated timer conversion tools did not take into account void * variables when searching out prior direct timer callback usage, which resulted in an attempt to dereference the timer field without a proper type. Reported-by: kbuild test robot Signed-off-by: Kees Cook --- drivers/pcm

Re: linux-next: manual merge of the tip tree with the net-next tree

2017-11-04 Thread Stephen Rothwell
Hi Alexei, On Wed, 1 Nov 2017 09:27:14 -0700 Alexei Starovoitov wrote: > > Also what do you mean by "same patch != same commit" ? > Like if we had pushed to some 3rd tree first and then pulled > into tip and net-next it would have been better? Well, it would not have caused a conflict. -- Chee

Re: Request to add cpupower git to linux-next

2017-11-04 Thread Stephen Rothwell
Hi Shuah, On Fri, 3 Nov 2017 10:26:58 -0600 Shuah Khan wrote: > > Could you please add > > git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git cpupower > to linux-next > > I will be sending pull requests to Rafael Wysocki for cpupower to be > included in linux-pm starting soon for 4.1

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-04 Thread Rob Landley
On 11/03/2017 08:37 PM, Kees Cook wrote: > We don't. (In fact, arg copying happens before we've even figured out > which binfmt is involved.) I lifted it to just before the point of no > return, but moving it before arg copying looks very hard (which > contributed to why we went with the implementa

Re: [PATCH RFC 1/2] sched: Minimize the idle cpu selection race window.

2017-11-04 Thread Joel Fernandes
Hi Peter, On Tue, Oct 31, 2017 at 1:20 AM, Peter Zijlstra wrote: > On Tue, Oct 31, 2017 at 12:27:41AM -0500, Atish Patra wrote: >> Currently, multiple tasks can wakeup on same cpu from >> select_idle_sibiling() path in case they wakeup simulatenously >> and last ran on the same llc. This happens

Re: Regression: commit da029c11e6b1 broke toybox xargs.

2017-11-04 Thread Rob Landley
Correcting Elliot's email to google, not gmail. (Sorry, I'm in Tokyo for work this month, almost over the jetlag...) On 11/03/2017 08:07 PM, Linus Torvalds wrote: > On Fri, Nov 3, 2017 at 4:58 PM, Rob Landley wrote: >> On 11/02/2017 10:40 AM, Linus Torvalds wrote: >> >> But it boils down to "got

Re: [PATCH 1/2] shmem: drop lru_add_drain_all from shmem_wait_for_pins

2017-11-04 Thread Hugh Dickins
On Fri, 3 Nov 2017, Michal Hocko wrote: > On Fri 03-11-17 00:46:18, Hugh Dickins wrote: > > > > NAK. shmem_wait_for_pins() is waiting for temporary pins on the pages > > to go away, and using lru_add_drain_all() in the usual way, to lower > > the refcount of pages temporarily pinned in a pagevec

Re: [PATCH resend 2/2] userns: control capabilities of some user namespaces

2017-11-04 Thread Serge E. Hallyn
Quoting Mahesh Bandewar (mah...@bandewar.net): > Init-user-ns is always uncontrolled and a process that has SYS_ADMIN > that belongs to uncontrolled user-ns can create another (child) user- > namespace that is uncontrolled. Any other process (that either does > not have SYS_ADMIN or belongs to a co

Re: [PATCH] USB: core: Improve unlocking of a mutex in two functions

2017-11-04 Thread Geert Uytterhoeven
On Sat, Nov 4, 2017 at 9:12 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 4 Nov 2017 21:00:46 +0100 > > * Add jump targets so that a call of the function "mutex_unlock" is stored > only twice in these function implementations. > > * Replace five calls by goto statements. > >

Linux 3.10.108 (EOL)

2017-11-04 Thread Willy Tarreau
Linux 3.10.108 was just released. It is the last one in this branch and changes the status of the 3.10 branch to end of life. Thus for once I'm *not* suggesting to upgrade to this one, except if it's just to finish your migration to a newer branch (such as 4.4). For those interested, given that I'

Re: A test of the philosophical impact of what I have been talking about / Suggestion for changes in GNU Licence.

2017-11-04 Thread Ywe Cærlyn
Den 11/3/2017 07:46, skrev Ywe Cærlyn: Den 10/29/2017 17:21, skrev Ywe Cærlyn: Den 10/29/2017 17:00, skrev Ywe Cærlyn: Den 10/27/2017 23:28, skrev Ywe Cærlyn: Den 10/27/2017 23:01, skrev Ywe Cærlyn: Philosophical requantization of a (atm) theoretical linux distribution: Excellent Ubuntu, is

[PATCH] mm, mlock, vmscan: no more skipping pagevecs

2017-11-04 Thread Shakeel Butt
When a thread mlocks an address space backed by file, a new page is allocated (assuming file page is not in memory), added to the local pagevec (lru_add_pvec), I/O is triggered and the thread then sleeps on the page. On I/O completion, the thread can wake on a different CPU, the mlock syscall will

[tip:x86/urgent] Revert "x86/mm: Stop calling leave_mm() in idle code"

2017-11-04 Thread tip-bot for Andy Lutomirski
Commit-ID: 675357362aeba19688440eb1aaa7991067f73b12 Gitweb: https://git.kernel.org/tip/675357362aeba19688440eb1aaa7991067f73b12 Author: Andy Lutomirski AuthorDate: Sat, 4 Nov 2017 04:16:12 -0700 Committer: Ingo Molnar CommitDate: Sat, 4 Nov 2017 15:01:50 +0100 Revert "x86/mm: Stop call

[tip:core/urgent] objtool: Prevent GCC from merging annotate_unreachable(), take 2

2017-11-04 Thread tip-bot for Josh Poimboeuf
Commit-ID: ec1e1b6109171d1890a437481c35b2b56d2327b8 Gitweb: https://git.kernel.org/tip/ec1e1b6109171d1890a437481c35b2b56d2327b8 Author: Josh Poimboeuf AuthorDate: Fri, 3 Nov 2017 17:19:41 -0500 Committer: Ingo Molnar CommitDate: Sat, 4 Nov 2017 15:03:39 +0100 objtool: Prevent GCC from

Re: [PATCH] freezer: Fix typo in commnent to function freezable_schedule_timeout()

2017-11-04 Thread Pavel Machek
On Sun 2017-11-05 03:27:32, Himanshu Jha wrote: > Signed-off-by: Himanshu Jha ACK. But note you have typo in the subject ;-). Plus this kind of bug is usually called thinko. Pavel > diff --git a/include/linux/freezer.h b/include/

[PATCH] freezer: Fix typo in commnent to function freezable_schedule_timeout()

2017-11-04 Thread Himanshu Jha
Signed-off-by: Himanshu Jha --- include/linux/freezer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 3995df1..21f5aa0 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h @@ -182,7 +182,7 @@ static inline

[PATCH] scsi: Use vzalloc instead of vmalloc/memset

2017-11-04 Thread Himanshu Jha
Use vzalloc instead of vmalloc/memset to allocate memory filled with 0 value. Done using Coccinelle. Semantic patch used : @@ expression x,a; statement S; @@ - x = vmalloc(a); + x = vzalloc(a); if (x == NULL || ...) S - memset(x, 0, a); Signed-off-by: Himanshu Jha --- drivers/scsi/bfa/bfad.

[PATCH] [media] pulse8-cec: Eliminate use of time_t and time_to_tm

2017-11-04 Thread Himanshu Jha
Eliminate the use of time_t type and time_to_tm functions as they are deprecated due to y2038 problem. Use the 64-Bit type interface instead. Signed-off-by: Himanshu Jha --- drivers/media/usb/pulse8-cec/pulse8-cec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/

[PATCH] firmware: raspberrypi: Eliminate use of time_to_tm

2017-11-04 Thread Himanshu Jha
time_to_tm function is deprecated due to y2038 problem, therefore use time64_to_tm instead. Signed-off-by: Himanshu Jha --- drivers/firmware/raspberrypi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c index

Re: [PATCH 3/3] arm64: Add software workaround for Falkor erratum 1041

2017-11-04 Thread Shanker Donthineni
Hi Robin, Thanks for your review comments. On 11/03/2017 10:11 AM, Robin Murphy wrote: > On 03/11/17 03:27, Shanker Donthineni wrote: >> The ARM architecture defines the memory locations that are permitted >> to be accessed as the result of a speculative instruction fetch from >> an exception lev

Re: [PATCH 1/2] drivers: hwmon: Add W83773G driver

2017-11-04 Thread kbuild test robot
Hi Lei, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on hwmon/hwmon-next] [also build test WARNING on v4.14-rc7 next-20171103] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-c

[PATCH] powerpc: eeh: stop using do_gettimeofday()

2017-11-04 Thread Arnd Bergmann
This interface is inefficient and deprecated because of the y2038 overflow. ktime_get_seconds() is an appropriate replacement here, since it has sufficient granularity but is more efficient and uses monotonic time. Signed-off-by: Arnd Bergmann --- arch/powerpc/include/asm/eeh.h | 2 +- arch/p

[PATCH 2/3] sm501fb: unregister framebuffer only if registered

2017-11-04 Thread Sudip Mukherjee
There are cases when panel and crt both are not defined and only one of them is defined and initialized. In such cases, while removing the device, unregister the framebuffer only if it was registered. Signed-off-by: Sudip Mukherjee --- drivers/video/fbdev/sm501fb.c | 6 -- 1 file changed, 4

[PATCH 3/3] sm501fb: suspend and resume fb if it exists

2017-11-04 Thread Sudip Mukherjee
There are cases when panel and crt both are not defined and only one of them is defined and initialized. In such cases, suspend or resume it only if it is defined. Signed-off-by: Sudip Mukherjee --- drivers/video/fbdev/sm501fb.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/v

[PATCH 1/3] sm501fb: deallocate colormap only if allocated

2017-11-04 Thread Sudip Mukherjee
There are cases when panel and crt both are not defined and only one of them is defined and initialized. In such cases, while removing the device deallocate the colormap only if that particular fb is defined. Signed-off-by: Sudip Mukherjee --- drivers/video/fbdev/sm501fb.c | 3 +++ 1 file change

[PATCH] drm: via: use ktime_get() instead of do_gettimeofday

2017-11-04 Thread Arnd Bergmann
We want to remove uses of do_gettimeofday() from the kernel since the resulting timeval structure overflows in 2038. This is not a problem for this particular use, but do_gettimeofday() is also not an appropriate method for measuring time intervals, since it requires a conversion into microseconds

Re: mmotm 2017-11-03-13-00 uploaded

2017-11-04 Thread Stephen Rothwell
Hi Randy, On Fri, 3 Nov 2017 15:41:35 -0700 Randy Dunlap wrote: > > On 11/03/2017 01:01 PM, a...@linux-foundation.org wrote: > > > > This mmotm tree contains the following patches against 4.14-rc7: > > (patches marked "*" will be included in linux-next) > > > > origin.patch > origin.patch h

Re: [RFC PATCH] bpf: Add helpers to read useful task_struct members

2017-11-04 Thread Alexei Starovoitov
On 11/5/17 2:31 AM, Naveen N. Rao wrote: Hi Alexei, Alexei Starovoitov wrote: On 11/3/17 3:58 PM, Sandipan Das wrote: For added security, the layout of some structures can be randomized by enabling CONFIG_GCC_PLUGIN_RANDSTRUCT. One such structure is task_struct. To build BPF programs, we use C

[PATCH] usb: gadget: bcm63xx_udc: Use common error handling code in bcm63xx_udc_probe()

2017-11-04 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 4 Nov 2017 22:02:46 +0100 Add a jump target so that a specific error message is stored only once at the end of this function implementation. Replace two calls of the function "dev_err" by goto statements. This issue was detected by using the Coccinelle software.

Re: [PATCH v2] scsi: require CAP_SYS_ADMIN to write to procfs interface

2017-11-04 Thread Randy Dunlap
On 11/04/2017 01:26 PM, Aleksa Sarai wrote: > Previously, the only capability effectively required to operate on the > /proc/scsi interface was CAP_DAC_OVERRIDE (or for some other files, > having an fsuid of GLOBAL_ROOT_UID was enough). This means that > semi-privileged processes could interfere wi

Re: T20 Cpuidle Freeze

2017-11-04 Thread Marcel Ziswiler
On Fri, 2017-11-03 at 21:52 +0300, Dmitry Osipenko wrote: > I haven't seen any problems with the cpuidle on next and 4.14-rc7 > works fine. > > # cat /sys/devices/system/cpu/cpu[0-1]/cpuidle/state[0-1]/usage > 162283 > 32905 > 254669 > 32905 > > # cat /sys/devices/system/cpu/cpu[0-1]/cpuidle/stat

Re: [PATCH 3/5] dt-bindings: arm: Document Socionext MB86S71 and Fujitsu F-Cue

2017-11-04 Thread Ard Biesheuvel
On 4 November 2017 at 20:06, Andreas Färber wrote: > Am 04.11.2017 um 23:39 schrieb Ard Biesheuvel: >> On 4 November 2017 at 15:30, Andreas Färber wrote: >>> Am 04.11.2017 um 22:57 schrieb Ard Biesheuvel: On 4 November 2017 at 13:44, Andreas Färber wrote: > Hi everyone, > > The

[PATCH v2] scsi: require CAP_SYS_ADMIN to write to procfs interface

2017-11-04 Thread Aleksa Sarai
Previously, the only capability effectively required to operate on the /proc/scsi interface was CAP_DAC_OVERRIDE (or for some other files, having an fsuid of GLOBAL_ROOT_UID was enough). This means that semi-privileged processes could interfere with core components of a system (such as causing a Do

Re: [PATCH] scsi: require CAP_SYS_ADMIN to write to procfs interface

2017-11-04 Thread Aleksa Sarai
Previously, the only capability effectively required to operate on the /proc/scsi interface was CAP_DAC_OVERRIDE (or for some other files, having an fsuid of GLOBAL_ROOT_UID was enough). This means that semi-privileged processes could interfere with core components of a system (such as causing a D

Re: [PATCH] rtlwifi: remove redundant initialization to cfg_cmd

2017-11-04 Thread Larry Finger
On 11/04/2017 02:37 PM, Colin King wrote: From: Colin Ian King cfg_cmd is initialized to zero and this value is never read, instead it is over-written in the start of a do-while loop. Remove the redundant initialization. Cleans up clang warning: drivers/net/wireless/realtek/rtlwifi/core.c:1750

[PATCH v6 5/9] i2c: add i2c_master_{send|recv}_dmasafe

2017-11-04 Thread Wolfram Sang
Use the new helper to create variants of i2c_master_{send|recv} which mark their buffers as DMA safe. Signed-off-by: Wolfram Sang --- include/linux/i2c.h | 31 +++ 1 file changed, 31 insertions(+) diff --git a/include/linux/i2c.h b/include/linux/i2c.h index ef1a8791c

[PATCH v6 9/9] i2c: rcar: skip DMA if buffer is not safe

2017-11-04 Thread Wolfram Sang
This HW is prone to races, so it needs to setup new messages in irq context. That means we can't alloc bounce buffers if a message buffer is not DMA safe. So, in that case, simply fall back to PIO. Reviewed-by: Jonathan Cameron Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-rcar.c | 2 +

[PATCH v6 6/9] i2c: smbus: use DMA safe buffers for emulated SMBus transactions

2017-11-04 Thread Wolfram Sang
For all block commands, try to allocate a DMA safe buffer and mark it accordingly. Only use the stack, if the buffers cannot be allocated. Signed-off-by: Wolfram Sang --- drivers/i2c/i2c-core-smbus.c | 45 ++-- 1 file changed, 39 insertions(+), 6 deletions

[PATCH v6 7/9] i2c: add docs to clarify DMA handling

2017-11-04 Thread Wolfram Sang
Reviewed-by: Jonathan Cameron Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Wolfram Sang --- Documentation/i2c/DMA-considerations | 67 1 file changed, 67 insertions(+) create mode 100644 Documentation/i2c/DMA-considerations diff --git a/Documentation/

[PATCH v6 8/9] i2c: sh_mobile: use core helper to decide when to use DMA

2017-11-04 Thread Wolfram Sang
This ensures that we fall back to PIO if the message length is too small for DMA being useful. Otherwise, we use DMA. A bounce buffer might be applied by the helper if the original message buffer is not DMA safe. Reviewed-by: Jonathan Cameron Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i

[PATCH v6 1/9] i2c: add a message flag for DMA safe buffers

2017-11-04 Thread Wolfram Sang
I2C has no requirement that the buffer of a message needs to be DMA safe. In case it is, it can now be flagged, so drivers wishing to do DMA can use the buffer directly. Reviewed-by: Jonathan Cameron Signed-off-by: Wolfram Sang --- include/uapi/linux/i2c.h | 3 +++ 1 file changed, 3 insertions(

[PATCH v6 0/9] i2c: document DMA handling and add helpers for it

2017-11-04 Thread Wolfram Sang
So, after revisiting old mail threads, taking part in a similar discussion on the USB list, and implementing a not-convincing solution before, here is what I cooked up to document and ease DMA handling for I2C within Linux. Please have a look at the documentation introduced in patch 7 for details.

[PATCH v6 3/9] i2c: dev: mark RDWR buffers as DMA_SAFE

2017-11-04 Thread Wolfram Sang
Reviewed-by: Jonathan Cameron Signed-off-by: Wolfram Sang --- drivers/i2c/i2c-dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index 6f638bbc922db4..bbc7aadb4c899d 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@ -280,6 +2

Re: [PATCH] scsi: require CAP_SYS_ADMIN to write to procfs interface

2017-11-04 Thread Randy Dunlap
On 11/04/2017 11:59 AM, Aleksa Sarai wrote: > Previously, the only capability effectively required to operate on the > /proc/scsi interface was CAP_DAC_OVERRIDE (or for some other files, > having an fsuid of GLOBAL_ROOT_UID was enough). This means that > semi-privileged processes could interfere wi

[PATCH v6 4/9] i2c: refactor i2c_master_{send_recv}

2017-11-04 Thread Wolfram Sang
Those two functions are very similar, the only differences are that one needs the I2C_M_RD flag for its message while the other one needs the buffer casted to drop the const. Introduce a generic helper which allows to specify the flags (also needed later for DMA safe variants of these calls) and le

[PATCH v6 2/9] i2c: add helpers to ease DMA handling

2017-11-04 Thread Wolfram Sang
One helper checks if DMA is suitable and optionally creates a bounce buffer, if not. The other function returns the bounce buffer and makes sure the data is properly copied back to the message. Reviewed-by: Jonathan Cameron Signed-off-by: Wolfram Sang --- drivers/i2c/i2c-core-base.c | 46 ++

Re: [PATCH 07/12] hwrng: bcm2835-rng: Manage an optional clock

2017-11-04 Thread Andrew Lunn
> The clk API outside of DT doesn't have knowledge of when it's "complete" > to be able to determine whether the clock is not present or temporarily > missing. I've already NAK'd this suggestion. Hi Russell O.K, yes, makes sense. We do have of_clk_get_by_name() and of_clk_get(). Would optional

[PATCH] USB: core: Improve unlocking of a mutex in two functions

2017-11-04 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 4 Nov 2017 21:00:46 +0100 * Add jump targets so that a call of the function "mutex_unlock" is stored only twice in these function implementations. * Replace five calls by goto statements. This issue was detected by using the Coccinelle software. Signed-off-by:

Re: [PATCH 07/12] hwrng: bcm2835-rng: Manage an optional clock

2017-11-04 Thread Russell King - ARM Linux
On Sat, Nov 04, 2017 at 08:37:31PM +0100, Andrew Lunn wrote: > Hi Florian > > > > >> + /* Clock is optional on most platforms */ > > > >> + priv->clk = devm_clk_get(dev, NULL); > > > >> + if (IS_ERR(priv->clk)) > > > >> + priv->clk = NULL; > > > > > > > > at least in c

Re: [PATCH 3/5] dt-bindings: arm: Document Socionext MB86S71 and Fujitsu F-Cue

2017-11-04 Thread Andreas Färber
Am 04.11.2017 um 23:39 schrieb Ard Biesheuvel: > On 4 November 2017 at 15:30, Andreas Färber wrote: >> Am 04.11.2017 um 22:57 schrieb Ard Biesheuvel: >>> On 4 November 2017 at 13:44, Andreas Färber wrote: Hi everyone, The non-building clk driver has been removed for 4.14, but this

Re: [PATCH 07/12] hwrng: bcm2835-rng: Manage an optional clock

2017-11-04 Thread Andrew Lunn
Hi Florian > > >> +/* Clock is optional on most platforms */ > > >> +priv->clk = devm_clk_get(dev, NULL); > > >> +if (IS_ERR(priv->clk)) > > >> +priv->clk = NULL; > > > > > > at least in case of EPROBE_DEFERED this isn't the expected behavior. > > > Maybe

  1   2   3   >