From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9FD99198005 for ; Mon, 25 Feb 2013 04:12:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5D346E06F3; Mon, 25 Feb 2013 04:12:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EF203E06F3 for ; Mon, 25 Feb 2013 04:12:08 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C362033DC27 for ; Mon, 25 Feb 2013 04:12:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 59C44E4075 for ; Mon, 25 Feb 2013 04:12:06 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1361765497.63e816ad7731e40e34a7c766d895a6c6c9e8138f.vapier@gentoo> Subject: [gentoo-commits] proj/sandbox:master commit in: libsandbox/ X-VCS-Repository: proj/sandbox X-VCS-Files: libsandbox/trace.c X-VCS-Directories: libsandbox/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 63e816ad7731e40e34a7c766d895a6c6c9e8138f X-VCS-Branch: master Date: Mon, 25 Feb 2013 04:12:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9630604a-8965-40ff-9dea-33b705cbb2b3 X-Archives-Hash: 9f36f24c332970ea4de3ff0ff7002b8b commit: 63e816ad7731e40e34a7c766d895a6c6c9e8138f Author: Mike Frysinger gentoo org> AuthorDate: Sat Feb 23 02:29:49 2013 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Feb 25 04:11:37 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sandbox.git;a=commit;h=63e816ad libsandbox: handle ENOSYS w/process_vm_readv If we have a newer glibc built against/running on an older kernel, the func return ENOSYS at runtime. Handle that. Signed-off-by: Mike Frysinger gentoo.org> --- libsandbox/trace.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/libsandbox/trace.c b/libsandbox/trace.c index c38ea12..32ad2d6 100644 --- a/libsandbox/trace.c +++ b/libsandbox/trace.c @@ -103,7 +103,12 @@ static char *do_peekstr(unsigned long lptr) riov.iov_len = liov.iov_len = len; while (1) { - process_vm_readv(trace_pid, &liov, 1, &riov, 1, 0); + if (process_vm_readv(trace_pid, &liov, 1, &riov, 1, 0) == -1) { + if (errno == ENOSYS) + break; + sb_ebort("ISE:do_peekstr: process_vm_readv() hates us: %s\n", + strerror(errno)); + } for (i = 0; i < liov.iov_len; ++i) if (!((char *)liov.iov_base)[i])