Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755130AbeAIGbI (ORCPT + 1 other); Tue, 9 Jan 2018 01:31:08 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:34634 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752222AbeAIGbH (ORCPT ); Tue, 9 Jan 2018 01:31:07 -0500 From: Mike Rapoport To: Andrew Morton , Alexander Viro Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, criu@openvz.org, gdb@sourceware.org, devel@lists.open-mpi.org, rr-dev@mozilla.org, Arnd Bergmann , Pavel Emelyanov , Michael Kerrisk , Thomas Gleixner , Josh Triplett , Jann Horn , Greg KH , Andrei Vagin , Mike Rapoport Subject: [PATCH v5 0/4] vm: add a syscall to map a process memory into a pipe Date: Tue, 9 Jan 2018 08:30:49 +0200 X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 x-cbid: 18010906-0040-0000-0000-000004027161 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18010906-0041-0000-0000-00002605C559 Message-Id: <1515479453-14672-1-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-09_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801090091 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi, This patches introduces new process_vmsplice system call that combines functionality of process_vm_read and vmsplice. It allows to map the memory of another process into a pipe, similarly to what vmsplice does for its own address space. The patch 2/4 ("vm: add a syscall to map a process memory into a pipe") actually adds the new system call and provides its elaborate description. The patchset is against -mm tree. v5: update changelog with more elaborate usecase description v4: skip test when process_vmsplice syscall is not available v3: minor refactoring to reduce code duplication v2: move this syscall under CONFIG_CROSS_MEMORY_ATTACH give correct flags to get_user_pages_remote() Andrei Vagin (3): vm: add a syscall to map a process memory into a pipe x86: wire up the process_vmsplice syscall test: add a test for the process_vmsplice syscall Mike Rapoport (1): fs/splice: introduce pages_to_pipe helper arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 2 + fs/splice.c | 262 +++++++++++++++++++-- include/linux/compat.h | 3 + include/linux/syscalls.h | 4 + include/uapi/asm-generic/unistd.h | 5 +- kernel/sys_ni.c | 2 + tools/testing/selftests/process_vmsplice/Makefile | 5 + .../process_vmsplice/process_vmsplice_test.c | 196 +++++++++++++++ 9 files changed, 458 insertions(+), 22 deletions(-) create mode 100644 tools/testing/selftests/process_vmsplice/Makefile create mode 100644 tools/testing/selftests/process_vmsplice/process_vmsplice_test.c -- 2.7.4