From patchwork Thu Oct 15 12:19:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 530632 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 586FF1402B7 for ; Thu, 15 Oct 2015 23:19:33 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=f9lg3Y3b; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=oGSjdSakWz4ZbZHKtHbi8q7urMYbI NDe2WbHhs/nZ22beaEtdpN9eIf1Mr2GdEMHeYX/TvfTarAjiuvvujvdAxJr7ea0h q7lJusKQ/bqDqdt4SGGln8KiHYt7aumWpY5vDXvfsLmTGndGgdLW9H5dBVDr4e84 jbPAoAq5evi59E= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=zTIqMca06X3B1HmqPeKo7cIvQ9I=; b=f9l g3Y3bdDd3YXer6ZVZZBxBnIt8s/bqcx9Hkq9tE71tjI1CStKILHwXcJvJJ/f3sMV BVCvD3rQzZrq4FvCgXcUYPzgp88iQE3abMMfoUNJhdLTE+ZeMbXuhqHNqkQdV/aB LKBAn7+GTJdHXs39UaIKgZjvGT/2MNEc0oAk0reE= Received: (qmail 30294 invoked by alias); 15 Oct 2015 12:19:27 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 30284 invoked by uid 89); 15 Oct 2015 12:19:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f49.google.com X-Received: by 10.66.102.97 with SMTP id fn1mr9652510pab.97.1444911563281; Thu, 15 Oct 2015 05:19:23 -0700 (PDT) Date: Thu, 15 Oct 2015 05:19:22 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] [BZ #19137] i386/epoll_pwait.S doesn't support cancellation Message-ID: <20151015121922.GA22544@gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Only i386 implements epoll_pwait in assembly code withot cancellation support. All other architectures implement epoll_pwait in epoll_pwait.c with int epoll_pwait (int epfd, struct epoll_event *events, int maxevents, int timeout, const sigset_t *set) { return SYSCALL_CANCEL (epoll_pwait, epfd, events, maxevents, timeout, set, _NSIG / 8); } Although there is no test for epoll_pwait in glibc, since SYSCALL_CANCEL works on i386 and epoll_pwait.c works for other architectures, it is safe to assume that epoll_pwait.c with SYSCALL_CANCEL also works on i386. Tested on i686. OK for master? H.J. --- [BZ #19137] * sysdeps/unix/sysv/linux/i386/Makefile (CFLAGS-epoll_pwait.c): Add -fomit-frame-pointer. * sysdeps/unix/sysv/linux/i386/epoll_pwait.S: Remove file. --- sysdeps/unix/sysv/linux/i386/Makefile | 1 + sysdeps/unix/sysv/linux/i386/epoll_pwait.S | 78 ------------------------------ 2 files changed, 1 insertion(+), 78 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/i386/epoll_pwait.S diff --git a/sysdeps/unix/sysv/linux/i386/Makefile b/sysdeps/unix/sysv/linux/i386/Makefile index 49ccf3e..b484217 100644 --- a/sysdeps/unix/sysv/linux/i386/Makefile +++ b/sysdeps/unix/sysv/linux/i386/Makefile @@ -4,6 +4,7 @@ default-abi := 32 ifeq ($(subdir),misc) sysdep_routines += ioperm iopl vm86 # %ebp may be used to pass the 6th argument to syscall. +CFLAGS-epoll_pwait.c += -fomit-frame-pointer CFLAGS-mmap.c += -fomit-frame-pointer CFLAGS-mmap64.c += -fomit-frame-pointer endif diff --git a/sysdeps/unix/sysv/linux/i386/epoll_pwait.S b/sysdeps/unix/sysv/linux/i386/epoll_pwait.S deleted file mode 100644 index 65cfb98..0000000 --- a/sysdeps/unix/sysv/linux/i386/epoll_pwait.S +++ /dev/null @@ -1,78 +0,0 @@ -/* Copyright (C) 2007-2015 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#define _ERRNO_H -#include -#define _SIGNAL_H -#include - - - .text -ENTRY (epoll_pwait) - -#ifdef __NR_epoll_pwait - - /* Save registers. */ - pushl %ebp - cfi_adjust_cfa_offset (4) - pushl %ebx - cfi_adjust_cfa_offset (4) - pushl %esi - cfi_adjust_cfa_offset (4) - pushl %edi - cfi_adjust_cfa_offset (4) - cfi_rel_offset (edi, 0) - cfi_rel_offset (esi, 4) - cfi_rel_offset (ebx, 8) - cfi_rel_offset (ebp, 12) - - movl 20(%esp), %ebx - movl 24(%esp), %ecx - movl 28(%esp), %edx - movl 32(%esp), %esi - movl 36(%esp), %edi - movl $_NSIG/8, %ebp - movl $__NR_epoll_pwait, %eax - - ENTER_KERNEL - - /* Restore registers. */ - popl %edi - cfi_adjust_cfa_offset (-4) - cfi_restore (edi) - popl %esi - cfi_adjust_cfa_offset (-4) - cfi_restore (esi) - popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - popl %ebp - cfi_adjust_cfa_offset (-4) - cfi_restore (ebp) - - /* If 0 > %eax > -4096 there was an error. */ - cmpl $-4096, %eax - ja SYSCALL_ERROR_LABEL - - /* Successful; return the syscall's value. */ -#else - movl $-ENOSYS, %eax - jmp SYSCALL_ERROR_LABEL -#endif - ret -PSEUDO_END (epoll_pwait)