From patchwork Fri May 8 13:16:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1286130 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=sourceware.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=jP3lfLJL; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49JW806ytHz9sVl for ; Fri, 8 May 2020 23:17:04 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 85596396E463; Fri, 8 May 2020 13:17:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85596396E463 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1588943822; bh=Vq8uXr2EZ2+7TAAc53b/9egHE14ZDWT07hM46oNWmK0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=jP3lfLJLsAr+tnJMFsN8Xpb/jFQETmFmF0HV1SGYUCmjOrtYsjlkMYewSqLDyldqp tNCiEtdyNWjJWf6VHdV5yNXc2Yxa0ZF2wnJyU/3395xOGJ8zcPsmtG/UedSjQddEnb L2R5261zi24ArK5XQL2HN2RergcsdZ3pWwMj0kcU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) by sourceware.org (Postfix) with ESMTPS id 3D5A0385DC1B for ; Fri, 8 May 2020 13:16:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3D5A0385DC1B Received: by mail-qv1-xf44.google.com with SMTP id r3so688898qvm.1 for ; Fri, 08 May 2020 06:16:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Vq8uXr2EZ2+7TAAc53b/9egHE14ZDWT07hM46oNWmK0=; b=U7P3WQT5pBxZLr90IVm6/Fu5WKL6bBRA/UR9pSiplYSUAERSsuRpVZm6fGTqgwRsuy ssDtLmETKNMpUlKrKpTijA8ZsL+YYEsciUJnNJA+qXROvAO29HD53SW0UJkloTsqYxQe M63HCaJBLT7f9qwBUpYcS1feGN3QipY32Itmt7mpGvEGepoLPqcAUTl7XSsmOUGydooR ho0bSUupQH0C3AjaprjWFrkBIbAVTLbsXxqxCCI+F89DMHKD3Jx1jdGRJ/487p3VArDC pNUN65T3GKmGWyiZKKqPzhb17NKoHByjBzuBxMFVrrgRtxyIYOLrve4ZC0CQo4rf5/O2 bF0Q== X-Gm-Message-State: AGi0PubDqcvobbG5xslTV8ME+HtJr7WBSBgO8LCVu4lzkp9q1jA/sTJ6 6rUluNew1gr3gNQSuiOz5Pd2GtBpajc= X-Google-Smtp-Source: APiQypKcXyXYePQK4yKUgGtk0VaVxw58JUuGowsnNtz8zX4DbgNkT2gSAWrhS7I9iaU5vvOvJrKdUQ== X-Received: by 2002:a05:6214:192d:: with SMTP id es13mr2720868qvb.248.1588943809443; Fri, 08 May 2020 06:16:49 -0700 (PDT) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id i59sm1424419qtb.58.2020.05.08.06.16.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 06:16:48 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH] linux: Remove assembly umount2 implementation Date: Fri, 8 May 2020 10:16:43 -0300 Message-Id: <20200508131643.2554924-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-16.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Only alpha and ia64 do not support __NR_umount2 (defined as __NR_umount), but recent kernel fixes (74cd2184833f for ia64, and 12b57c5c70f39 for alpha) add the required alias. Checked with a build against all affected ABIs. --- sysdeps/unix/sysv/linux/Makefile | 2 +- sysdeps/unix/sysv/linux/ia64/syscalls.list | 2 -- sysdeps/unix/sysv/linux/umount.c | 13 +++++++++---- sysdeps/unix/sysv/linux/umount2.S | 13 ------------- 4 files changed, 10 insertions(+), 20 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/umount2.S diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 0326f92c40..62ac921e8f 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -54,7 +54,7 @@ CFLAGS-malloc.c += -DMORECORE_CLEARS=2 endif ifeq ($(subdir),misc) -sysdep_routines += adjtimex clone umount umount2 readahead sysctl \ +sysdep_routines += adjtimex clone umount readahead sysctl \ setfsuid setfsgid epoll_pwait signalfd \ eventfd eventfd_read eventfd_write prlimit \ personality epoll_wait tee vmsplice splice \ diff --git a/sysdeps/unix/sysv/linux/ia64/syscalls.list b/sysdeps/unix/sysv/linux/ia64/syscalls.list index 56f4138c43..bd39441d3c 100644 --- a/sysdeps/unix/sysv/linux/ia64/syscalls.list +++ b/sysdeps/unix/sysv/linux/ia64/syscalls.list @@ -1,7 +1,5 @@ # File name Caller Syscall name # args Strong name Weak names -umount2 - umount 2 __umount2 umount2 - getpriority - getpriority i:ii __getpriority getpriority # proper socket implementations: diff --git a/sysdeps/unix/sysv/linux/umount.c b/sysdeps/unix/sysv/linux/umount.c index ab6a20f596..cdc8759118 100644 --- a/sysdeps/unix/sysv/linux/umount.c +++ b/sysdeps/unix/sysv/linux/umount.c @@ -16,12 +16,17 @@ License along with the GNU C Library. If not, see . */ -/* Since the generic Linux syscall ABI doesn't have an oldumount system call, - do what the kernel does down here. */ +#include +#include -extern long int __umount2 (const char *name, int flags); +int +__umount2 (const char *special_file, int flags) +{ + return INLINE_SYSCALL_CALL (umount2, special_file, flags); +} +weak_alias (__umount2, umount2) -long int +int __umount (const char *name) { return __umount2 (name, 0); diff --git a/sysdeps/unix/sysv/linux/umount2.S b/sysdeps/unix/sysv/linux/umount2.S deleted file mode 100644 index 92241bbf97..0000000000 --- a/sysdeps/unix/sysv/linux/umount2.S +++ /dev/null @@ -1,13 +0,0 @@ -/* umount system call with two parameters. */ - -#include -#if defined __NR_oldumount || defined __NR_umount2 -#ifdef __NR_oldumount -PSEUDO (__umount2, umount, 2) -#else -PSEUDO (__umount2, umount2, 2) -#endif - ret -PSEUDO_END(__umount2) -weak_alias (__umount2, umount2) -#endif