Received: by 10.223.164.202 with SMTP id h10csp1252074wrb; Sun, 26 Nov 2017 23:21:21 -0800 (PST) X-Google-Smtp-Source: AGs4zMalK76H0kxtSD7MHHB6egQOukwZYH0/gamm3+CaNjYoM/LadoK39BiegdpE0HKd5SX5J+7h X-Received: by 10.159.240.138 with SMTP id p10mr37150687plr.360.1511767281575; Sun, 26 Nov 2017 23:21:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511767281; cv=none; d=google.com; s=arc-20160816; b=bHzfVCkaJ2z1Y4MNATjKIyw1celTgGCr40iMFizxrHU9Lq0zkhF0eL6b1jI8DFg8lu dW3jX7cDvF0qJB9mNi8Trq7PYW4uwIRIAH2BTkVQnYdSE9humY9dRjZr4F50q4lmt+qx BJBJOI4XNEVKpqSkyL3wxcbsZl1jfsfbBuvMM4is30jkkmRkQqrdTL7vySE/FZ4DZR5b uYdKQhVbnZTsbIEsTzc2a4xF2765ZaPSjdSO5VCnOv9QwR2kAglbE482NZkGAmSMuTXf kfNgtXjvEQ1ccB5cOyAFWVt9bypcC1mnnwcyNfHSmJsxf4L4pxtMbX7IYkCyyAy7eX64 6Wgw== 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=ZDLBCqq7FiVPpvxT3CqmP4e9CH2BvfMt/AvbTHK4WYo=; b=L1lUxPxt0t1kl/Usb9kNdX5/+17ihPaHeJAPWgPqEfiRF9+cT0jdZu1g+hX09MQDnm bUqnGkDSrsnu6Y2rawDshUhrFwLQe8mKU72qnOUW+XTlv3C7WloIW28Tg0rirMjUdnE7 Yv5XHN+BttWbc43cLLgffb1hMQFY4vD7qOrh3X7jsfvz3qddNc0rNjGZEA7oO+6adJ6q lLcE7N8treL+qbLKx3QiChNs1g9Pb+z2jc6KVjl3LDfVHlsNOaaTmdGeobPyxXw7TwTH h2oTlBufTojUIV8VE8dp4Mzbw+eWOwMwYlyKFzjDNPO4z8KPdHvKw4HJZVEfr1MHq/d2 jmxA== 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 m12si22410460pgs.784.2017.11.26.23.21.09; Sun, 26 Nov 2017 23:21:21 -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 S1751497AbdK0HTz (ORCPT + 78 others); Mon, 27 Nov 2017 02:19:55 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52674 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751266AbdK0HTx (ORCPT ); Mon, 27 Nov 2017 02:19:53 -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 vAR7J5Y3018535 for ; Mon, 27 Nov 2017 02:19:52 -0500 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 2egccam6vv-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 27 Nov 2017 02:19:52 -0500 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 27 Nov 2017 07:19:50 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 27 Nov 2017 07:19:46 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vAR7JjlL32047324; Mon, 27 Nov 2017 07:19:45 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 203514C04E; Mon, 27 Nov 2017 07:14:45 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0A2BE4C044; Mon, 27 Nov 2017 07:14:43 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.8.170]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 27 Nov 2017 07:14:42 +0000 (GMT) Received: by rapoport-lnx (sSMTP sendmail emulation); Mon, 27 Nov 2017 09:19:42 +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 , Greg KH , Andrei Vagin , Mike Rapoport Subject: [PATCH v4 0/4] vm: add a syscall to map a process memory into a pipe Date: Mon, 27 Nov 2017 09:19:37 +0200 X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 x-cbid: 17112707-0040-0000-0000-000003F2D7BF X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17112707-0041-0000-0000-000025F5AFC8 Message-Id: <1511767181-22793-1-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-27_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=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711270102 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 From 1585398963365723070@xxx Wed Nov 29 11:17:52 +0000 2017 X-GM-THRID: 1585398963365723070 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread