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: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B8B141F45E for ; Tue, 11 Feb 2020 11:23:00 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=il3XkTXoS0Gr4OnZ2/X6dUXXCYqS3B+sLjs58RpwJQs B1PJDqd1OdOmMSBUiCnDH4v4dxdV2uMSP/hQcMNGjc445Vs6K7BsMFwOQ4dqtLI5 Ky3cU7qJk7FrfLYcak4CerZl3lWYsKE7rPkqCAzd2/9K8EUCgMFRvh88vNCfUWpY = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type:content-transfer-encoding; s=default; bh=YgWn082fJJOI8yZDtaQq/VI8lCU=; b=ShrhhE9ByILFF7b61 mzHFE7Zg0GL7XccQTacXVrFruaslrXkw+bHs2Hb7Vlh3ac0j2DNqdgqaxrvw9GfT cZmJmqlh0vFLq/Rff35waqtYfw91lZgbicC2QhLSh2uR42tPjg5CIdB+1eUVOPvz V2i5mNbbDR6z9p6XI4mzlKQQXA= Received: (qmail 124517 invoked by alias); 11 Feb 2020 11:22:58 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 124509 invoked by uid 89); 11 Feb 2020 11:22:58 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: us-smtp-delivery-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581420175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SgBcINcCpXYHR8Ddn9A2WfiGX5cEp/1d4chAcOlGVRw=; b=WFk1fun9XIUSm05bx6vSbT3BGDmi4GTstvjKMkU+TbdhpmKorC347427Vq6P8ZbjB5sKol 20+l2AIz+HYuqauy5jThRYWgYj3Pw3KrQ/CfWhUa2e8oKy/wB/ogOXeTRguZOirfnXJ9XU okxBdOhI/bwWdyfrvFRKS/PQWGYIM1g= From: Florian Weimer To: Adhemerval Zanella Cc: libc-alpha@sourceware.org Subject: Re: [PATCH 12/15] sparc: Avoid clobbering register parameters in syscall References: <20200210192038.23588-1-adhemerval.zanella@linaro.org> <20200210192038.23588-12-adhemerval.zanella@linaro.org> Date: Tue, 11 Feb 2020 12:22:50 +0100 In-Reply-To: <20200210192038.23588-12-adhemerval.zanella@linaro.org> (Adhemerval Zanella's message of "Mon, 10 Feb 2020 16:20:35 -0300") Message-ID: <87r1z1nzat.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * Adhemerval Zanella: > The sparc INTERNAL_SYSCALL macro might clobber the register > parameter if the argument itself might clobber any register (a function > call for instance). > > This patch fixes it by using temporary variables for the expressions > between the register assignments (as indicated by GCC documentation, > 6.47.5.2 Specifying Registers for Local Variables). > > It is similar to the fix done for MIPS (BZ#25523). (bug 25523) for the bug reference. You may also consider switching to long int instead of long, given that you change most of the code anyway. Otherwise looks good. Thanks, Florian