Received: by 10.223.164.202 with SMTP id h10csp571399wrb; Wed, 22 Nov 2017 11:37:39 -0800 (PST) X-Google-Smtp-Source: AGs4zMZIlPTv0xE/3JS3QzQIommybMR93rs9yyuHfWirjiEkzKPYPWWluFINOqFez4fv81e3fq74 X-Received: by 10.84.242.76 with SMTP id c12mr22784073pll.445.1511379459434; Wed, 22 Nov 2017 11:37:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511379459; cv=none; d=google.com; s=arc-20160816; b=IXA8DSl40bN+BhO8o78MtsTyrG3p9mFBWT5QurzegAXpqn0Q7Fu8zi3llHepsuujQN ibYr53EMbniGBYsDYUTJ0zoTRTaFKbh9NkimFEFRbMlr0Zb8ihbgXRsAN+dQCq5ZUIdm kRoVQpoxT5PVvKQTeJGdsPuRV5yPx+WBkpipAos7vYj6K537nxGffG/Fob19Ze/vr5w9 tudd0hLmIfdJI2E1K/kHiF0/ofbvX8OUlmleuRFdZAn7ix7sDmmH7TMJzlU459e8km/6 jm1yoRFPDclZytUz/ePDakerxBNwijO9GPnap7EwyzvwKssqF9Q78eT0ep145z+CoyAv 1WRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=zUDH0iavrLkqMeSXaI11u4vW8ocgdLYixJOhZzBbERs=; b=rce8nXjQOVDUNNOL5Db8Key35bAnbd18y9Fg9/igBHYMnsmdIiALUEfwWhIN0UPUsI IcUlkYAoJBO6c82wEbzaGiOZSdJ2Sy/yjnKHHrP8BlpI0H+OkddrOs5wDNd3enG4Zdju XbFeS+IYzMUkJACeSYJOW4gIh9ZvzyfFsWCh3D6kBht1UfeqF8tYa/V2ElrrBSCLr7Zx n1iE+H3c73fzm57Q/UdmkZ3f3zMqwTw8VUvCwLooSjI6u+RkKFRzCmGwqsKbpzt2va85 sSKyJIPccIMstp28nKdbMTDAyMROvLOfYwwXAY5/01Y2FtvMrrAlLJDWHE9dHwSQCW/u KuAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3si6227002plk.702.2017.11.22.11.37.27; Wed, 22 Nov 2017 11:37:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751477AbdKVTgs (ORCPT + 77 others); Wed, 22 Nov 2017 14:36:48 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50104 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751273AbdKVTgr (ORCPT ); Wed, 22 Nov 2017 14:36:47 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAMJYXvZ093550 for ; Wed, 22 Nov 2017 14:36:46 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 2edc9qksew-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 22 Nov 2017 14:36:46 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 22 Nov 2017 19:36:41 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 22 Nov 2017 19:36:37 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vAMJaaqc36372528; Wed, 22 Nov 2017 19:36:36 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ADDC6A4053; Wed, 22 Nov 2017 19:31:16 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3D7DAA4040; Wed, 22 Nov 2017 19:31:14 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.204.194]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 22 Nov 2017 19:31:14 +0000 (GMT) Received: by rapoport-lnx (sSMTP sendmail emulation); Wed, 22 Nov 2017 21:36:33 +0200 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, Arnd Bergmann , Pavel Emelyanov , Michael Kerrisk , Thomas Gleixner , Josh Triplett , Jann Horn , Yossi Kuperman Subject: [PATCH v3 0/4] vm: add a syscall to map a process memory into a pipe Date: Wed, 22 Nov 2017 21:36:27 +0200 X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 x-cbid: 17112219-0012-0000-0000-000005907E0F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17112219-0013-0000-0000-0000190B5324 Message-Id: <1511379391-988-1-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-22_05:,, 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-1711220258 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yossi Kuperman 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. 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 | 188 +++++++++++++++ 9 files changed, 450 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 From 1584802797611025361@xxx Wed Nov 22 21:22:04 +0000 2017 X-GM-THRID: 1584802797611025361 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread