From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) by sourceware.org (Postfix) with ESMTPS id 602723858D1E for ; Thu, 10 Nov 2022 19:56:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 602723858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-13b103a3e5dso3346280fac.2 for ; Thu, 10 Nov 2022 11:56:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ztQ3455mxIsvIMeAap1IGVwO+Jp1LAUEKu2fXa/4GW8=; b=FtKH261eEns+danZJe5BKwcHTkduQna6cXdQc+SxVPRD3qw7oy8WU9iGKjPlpzt9+J x4c5+3I/gR6S6HJr7igAC5jYhC6dDfL/OR9plc9p6sowFzLHear2p8qVpRsPTwxQWqNi SZo/yPl93wFagRcBHjfdWIyKxB5zghgnz6xHKdd/ntd2VaGRdfSqbnMlLxCCJVis6fr9 zsvFliCAS2eODHVidhvgqeUhBxJcAYw99NTu4VstMH27cCKlL+340Z0ipsTmnJTUpZqR 8eT9NpV+SfaC7hZQG90X86Dx5PfoP7RxTA6ez+TSfvkUjLUYmbH+pozQVHp68JojRxQ3 Ob9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ztQ3455mxIsvIMeAap1IGVwO+Jp1LAUEKu2fXa/4GW8=; b=uyQnvzDr4CwenLG1lCsIjvdk9bniijMPqDjoj90nULf5C0nLVSoNbfLPp4cpdrQSr7 vBWj1xKkXcqLof+p8gPsYqRm6ipBc9nO3s3Tgf4Dw7TnCp1vrlKSA5bDLL0nGV0D+Enk DdzcbHWPxCapZkVRn9ZvuEBKV7ywRhrMP8Q/BD7ZWuGiZgMUZRdQFk+vUHocLWjJvmZ2 5vOVyLYBzraozk0Akhyz+y4xp7VduFiWwv3OzzyYNaUfnGE5hRTlWAtwjcG3IviCb/0i DaiPuXP/kuMBOhHU/yAOlYSOvewYOyNvI9WwIFzQeyxt2V2LD3DimcBnTktqvhM/Rvyt f8Sw== X-Gm-Message-State: ACrzQf3y2lhcltuBHzqz0uHuvKjpbwqjjKbK7EFYlmuWB9wNPTNPGHnN 5XWjGy6JyEzwkBK3q5DwCzu4FM4S3kwjDyQ44q0= X-Google-Smtp-Source: AMsMyM7n8E69LLIK0ka8O1rrFe2OSquosZV2kZIP/xR3BMai828uLJ0jGaEKUnQTxXpzSqg0ChoPzkv8GYHNJgI8BB4= X-Received: by 2002:a05:6871:8a9:b0:13c:5da4:7229 with SMTP id r41-20020a05687108a900b0013c5da47229mr2048043oaq.266.1668110159481; Thu, 10 Nov 2022 11:55:59 -0800 (PST) MIME-Version: 1.0 References: <878rkiu72f.fsf@oldenburg.str.redhat.com> <87cz9usjn3.fsf@oldenburg.str.redhat.com> In-Reply-To: <87cz9usjn3.fsf@oldenburg.str.redhat.com> From: "H.J. Lu" Date: Thu, 10 Nov 2022 11:55:22 -0800 Message-ID: Subject: Re: [PATCH] Linux: Support non-variadic calls to prctl (bug 29770) To: Florian Weimer Cc: libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3017.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Nov 10, 2022 at 11:18 AM Florian Weimer wrote: > > * H. J. Lu: > > > prctl is an exported variadic function. Do we need to keep it? > > Do you mean whether we should keep it as a variadic function or turn it > into a function with a fixed argument list? Yes. > Unfortunately the types and number of arguments vary between the > sub-operations. Pretty much any application calling prctl would have to > be changed. It's just syscall by another name (and with a fixed number > of course). > has extern int prctl (int __option, ...) __THROW; Your change works for int prctl(int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5); prtcl (...); But it breaks #include prctl (...); H.J. -- H.J.