From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 3F34E3987C34 for ; Mon, 10 May 2021 17:56:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3F34E3987C34 Received: by mail-wr1-x436.google.com with SMTP id l2so17529064wrm.9 for ; Mon, 10 May 2021 10:56:52 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dmqohYzMvS72z6Y99XXcG7umHP0lMiI/AKNyIBd/i9M=; b=LgMy5a+IIFLEPAQazLwK96WqkAYA5HLrqr0OkJSpjBSukcHpPcH7/rR+jW0GcC8pfq /0xHFwelipjZ1AbaGkK28Fj1WoWqQ3qsIBIXl2gRceLLHJ+EcceBVpfmzAxDXU+RFZGV kR4d47xT5KXcNYP3Cm2T9VMDE0B1C8jfrtIfi8i9vm82DloxW/vQvUZv3dfnmgr57POW MmfSM0mV74eE+i7Ka32zaXe6zlWYclI7XdmJvAfpMBn/an4DANGke4udo9Qh8FyKp0aL ka1HL97yQ+nnhqCYMI/ZfpkssJssMtKo08ELuxKP0OAjG8qg2q7HWjkfMfV2Adx4JR7i Q26g== X-Gm-Message-State: AOAM531+ASEkmgNm713fhjq/2pUEHEH64XWAmiLtb/O+HtJkX3STQN5j k4qg8+UKWFeQPP8UnhyrHh4= X-Google-Smtp-Source: ABdhPJzmJXhuQ2+bC7lZLyzLU+ekt4IebYMEfohKC1ZLMkkRT40T28NewhprM8X6kS9BYskuVqEfVw== X-Received: by 2002:adf:f1d2:: with SMTP id z18mr32446793wro.245.1620669411379; Mon, 10 May 2021 10:56:51 -0700 (PDT) Received: from sqli.sqli.com ([195.53.121.100]) by smtp.googlemail.com with ESMTPSA id m13sm24318830wrw.86.2021.05.10.10.56.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 10:56:51 -0700 (PDT) From: Alejandro Colomar To: mtk.manpages@gmail.com Cc: Florian Weimer , Jakub Wilk , Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Subject: [PATCH 23/39] modify_ldt.2: Use syscall(SYS_...); for system calls without a wrapper Date: Mon, 10 May 2021 19:55:32 +0200 Message-Id: <20210510175546.28445-24-alx.manpages@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510175546.28445-1-alx.manpages@gmail.com> References: <20210510175546.28445-1-alx.manpages@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.3 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-List-Received-Date: Mon, 10 May 2021 17:56:53 -0000 Signed-off-by: Alejandro Colomar --- man2/modify_ldt.2 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/man2/modify_ldt.2 b/man2/modify_ldt.2 index 8ce9ed252..b67a67690 100644 --- a/man2/modify_ldt.2 +++ b/man2/modify_ldt.2 @@ -27,11 +27,19 @@ modify_ldt \- get or set a per-process LDT entry .SH SYNOPSIS .nf -.BI "int modify_ldt(int " func ", void *" ptr ", unsigned long " bytecount ); +.BR "#include " " /* Definition of " "struct user_desc" " */" +.BR "#include " " /* Definition of " SYS_* " constants */" +.B #include +.PP +.BI "int syscall(SYS_modify_ldt, int " func ", void *" ptr , +.BI " unsigned long " bytecount ); .fi .PP .IR Note : -There is no glibc wrapper for this system call; see NOTES. +glibc provides no wrapper for +.BR modify_ldt (), +necessitating the use of +.BR syscall (2). .SH DESCRIPTION .BR modify_ldt () reads or writes the local descriptor table (LDT) for a process. @@ -168,9 +176,6 @@ is neither 0, 1, 2, nor 0x11. This call is Linux-specific and should not be used in programs intended to be portable. .SH NOTES -Glibc does not provide a wrapper for this system call; call it using -.BR syscall (2). -.PP .BR modify_ldt () should not be used for thread-local storage, as it slows down context switches and only supports a limited number of threads. -- 2.31.1