From patchwork Sat Mar 13 19:25:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1452538 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=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) 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=hbojLsM2; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4DyXjJ6ycpz9sRR for ; Sun, 14 Mar 2021 06:26:12 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BE5F4388C013; Sat, 13 Mar 2021 19:25:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE5F4388C013 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615663555; bh=z3NNryk1ci9eYbs78Jt/UvIKKs9jNRVOVbWS8ChqMqc=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=hbojLsM2g/b6M7GTGJBXoubCmx3X26fSArydAxG6cqOj5Xbolrr6SueWM0dufCabK 9aUdthSqPA7RPC8iE9e0VjC3QuzbPhsrVeqmWOyJc5zXA+IBHXVnNyvFPGmpwKuP5r L1Eq/tAnINPIGJkrJQYggh8R4063ZurMX5csGbGE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id 4242C3854801 for ; Sat, 13 Mar 2021 19:25:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4242C3854801 Received: by mail-wm1-x32e.google.com with SMTP id g25so5728294wmh.0 for ; Sat, 13 Mar 2021 11:25:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z3NNryk1ci9eYbs78Jt/UvIKKs9jNRVOVbWS8ChqMqc=; b=nihS/BugE8BjjfRhwzlH2BPy7NFPZBK+QqnRBlPKSJU8Xu6s62hOggI0ryO/I/jfKE MyFFMBPR1uOp+WwbUZIb9hJEVCfleZKb1eIl8ZmCWssX3nJUp5+TvGVzqsvzcnqZJ7/X Q/0JP7Q0NzimFLUtWR9l+NRebVXjtQadIXK1bLiOYrxkk7LuQnErskZALrPMPZcawx+D +ECJYnykP7lcqoikT5pB33VVhNiOQ9pUvawM7e8re84mzhKcWvbhWpAyvpsm3H6rT6he AHEq00o2G7EI98PBSZBTbfCBZ7QvBQN32dXKty0jCkiX4PtTMcoJgpXCLHcAjo/2Dbkl wQiw== X-Gm-Message-State: AOAM530aoMSIbImu5wqMWLqqZElwPc+2ZbC+M+CNS6d4yAow1KuG+cEU FUf9q3QTac0zP7LTGWV6SxA= X-Google-Smtp-Source: ABdhPJx8XH+GI14ambLJs44HFKtFSLjhMYB43uahxuH3zsK3nJ3aAR44vwc7rLp3W9uyMvAta7r7PA== X-Received: by 2002:a1c:1bc7:: with SMTP id b190mr19148407wmb.115.1615663551362; Sat, 13 Mar 2021 11:25:51 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id j136sm7670964wmj.35.2021.03.13.11.25.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Mar 2021 11:25:51 -0800 (PST) To: mtk.manpages@gmail.com Subject: [RFC v3 03/17] arch_prctl.2: Use syscall(SYS_...); for system calls without a wrapper Date: Sat, 13 Mar 2021 20:25:13 +0100 Message-Id: <20210313192526.350200-4-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210214133907.157320-1-alx.manpages@gmail.com> References: <20210214133907.157320-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, 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: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org, linux-kernel@vger.kernel.org, Florian Weimer Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man2/arch_prctl.2 | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/man2/arch_prctl.2 b/man2/arch_prctl.2 index f9a9dc39d..8706cd1ec 100644 --- a/man2/arch_prctl.2 +++ b/man2/arch_prctl.2 @@ -27,15 +27,14 @@ arch_prctl \- set architecture-specific thread state .SH SYNOPSIS .nf -.B #include +.BR "#include " " /* Definition of " ARCH_* " constants */" .B #include +.BR "#include " " /* Definition of " SYS_* " constants */" +.B #include .PP -.BI "int arch_prctl(int " code ", unsigned long " addr ); -.BI "int arch_prctl(int " code ", unsigned long *" addr ); +.BI "int syscall(SYS_arch_prctl, int " code ", unsigned long " addr ); +.BI "int syscall(SYS_arch_prctl, int " code ", unsigned long *" addr ); .fi -.PP -.IR Note : -There is no glibc wrapper for this system call; see NOTES. .SH DESCRIPTION .BR arch_prctl () sets architecture-specific process or thread state. @@ -177,9 +176,6 @@ and in the same thread is dangerous, as they may overwrite each other's TLS entries. .PP -Glibc does not provide a wrapper for this system call; call it using -.BR syscall (2). -.PP .I FS may be already used by the threading library. Programs that use