From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, PDS_RDNS_DYNAMIC_FP,RCVD_IN_DNSWL_MED,RDNS_DYNAMIC,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 dcvr.yhbt.net (Postfix) with ESMTPS id 5CBE41F4C1 for ; Wed, 30 Nov 2022 13:53:57 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="xFCZpdLp"; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 83BBC3858C3A for ; Wed, 30 Nov 2022 13:53:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83BBC3858C3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669816436; bh=BaQ5IGeAgf+mLiNZ78gpVMBRtc3K/+LQZymK8h8I0nU=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=xFCZpdLpZF9e+xKEd+0xEof8CtGkSubtf5H98jAy9pUaZAWF0PyE6SBaCf13s0kDU OHG4bA79rIY1pCOehpn0/88tF130WVZccqmk6P+Rs54BTrpf9IO0/zyZFKh0WksMBq uPs+h+nGbSQdVwyjMul83AjKZOEYZvB3tvP1Nfrg= Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id 08BDC3858D1E for ; Wed, 30 Nov 2022 13:53:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 08BDC3858D1E Received: by mail-ot1-x336.google.com with SMTP id w26-20020a056830061a00b0066c320f5b49so11224144oti.5 for ; Wed, 30 Nov 2022 05:53:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BaQ5IGeAgf+mLiNZ78gpVMBRtc3K/+LQZymK8h8I0nU=; b=cijDNht/GT0Kc8lTeFz/pH+T61nmQy/eQ6r9vSNjc5udXMjp/sFSMl8CQq8+uCBWY8 agdNq5cNf0Ueq/5SHeaUliH8OMYsWnOlx8dCHBKwJwnYswgYslzrN2/6sH9iH73eorBI N1Fo5li5cdRSZuSLodBnTuS/dlc2M+tCrKtn3JydGvf695FvhKiaPLEZswoRNX8TbUeI aIa2wz0uakzz7mUBpcSwvoEyLRxGBgql/CU/GVGX1huMtvrqpqXpQC1CwxxM/VJSTEcO dM90T5LIBZ9/vYIc5SdQlB4kIeMqqPwBpm+CbANUzqTnN+6FVFxPdXga2WwevKvB5Upx jYrQ== X-Gm-Message-State: ANoB5pnF4WlTCsMasnNNhGTivIOoQ51FCWeGQo5+QDbAKfjVbuo4zF2n w7bEvoqv46+h8P9+2L1K6c4SLykFRo54Rung X-Google-Smtp-Source: AA0mqf4RQGgAOuFHUQDP7AB5M/LiCEF/FrIgmPGadde3huRjd6InTn6N67POJ1lOxaneHgcxm4Dk8A== X-Received: by 2002:a9d:4f03:0:b0:66e:6f16:8bb1 with SMTP id d3-20020a9d4f03000000b0066e6f168bb1mr507938otl.203.1669816416308; Wed, 30 Nov 2022 05:53:36 -0800 (PST) Received: from ?IPV6:2804:1b3:a7c1:f215:2982:53e8:7f84:95db? ([2804:1b3:a7c1:f215:2982:53e8:7f84:95db]) by smtp.gmail.com with ESMTPSA id fo12-20020a0568709a0c00b001431bf4e5a0sm1178821oab.38.2022.11.30.05.53.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Nov 2022 05:53:35 -0800 (PST) Message-ID: <7fb959d8-1636-d731-ef6f-4d779ca6226e@linaro.org> Date: Wed, 30 Nov 2022 10:53:32 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH] linux: Use long int for syscall return value Content-Language: en-US To: XingLi Cc: libc-alpha@sourceware.org, i.swmail@xen0n.name, xry111@xry111.site, caiyinyu@loongson.cn, wanghongliang@loongson.cn, hejinyang@loongson.cn, szabolcs.nagy@arm.com References: <20221129112443.2325486-1-lixing@loongson.cn> Organization: Linaro In-Reply-To: <20221129112443.2325486-1-lixing@loongson.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: , From: Adhemerval Zanella Netto via Libc-alpha Reply-To: Adhemerval Zanella Netto Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 29/11/22 08:24, XingLi wrote: > From: Xing Li > > The linux syscall ABI returns long, so the generic syscall code for > linux should use long for the return value. > > This fixes the truncation of the return value of the syscall function > when that does not fit into an int. > --- > sysdeps/unix/sysv/linux/syscall.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sysdeps/unix/sysv/linux/syscall.c b/sysdeps/unix/sysv/linux/syscall.c > index 7303ba7188..8cb0b66b1c 100644 > --- a/sysdeps/unix/sysv/linux/syscall.c > +++ b/sysdeps/unix/sysv/linux/syscall.c > @@ -33,7 +33,7 @@ syscall (long int number, ...) > long int a5 = va_arg (args, long int); > va_end (args); > > - int r = INTERNAL_SYSCALL_NCS_CALL (number, a0, a1, a2, a3, a4, a5); > + long int r = INTERNAL_SYSCALL_NCS_CALL (number, a0, a1, a2, a3, a4, a5); > if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (r))) > { > __set_errno (-r); LGTM, thanks. Reviewed-by: Adhemerval Zanella