From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 228473858CDB for ; Fri, 26 May 2023 12:59:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 228473858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685105992; 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: in-reply-to:in-reply-to:references:references; bh=oTnPNcVDndldXzvEncE4g3rWBDVYA/XmDNo0xKJ6OxM=; b=MIab8jiROWfhWmuMr2SUwmQyriXHxy804eR/8JRttvG324jWcKx/q+y+QFWmwOzoC7qx8G gFeVtKWMiRccl3Wcy1CYSf8w8nWCxXO5pc48GGr5emRBWVQPJK71xVtWD/ZAFyUKZVBWdj teUKQsikp/4x8kVI0qCljokws/4/d4A= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-173-CI2YXtoXNTOHvccHahN7yw-1; Fri, 26 May 2023 08:59:49 -0400 X-MC-Unique: CI2YXtoXNTOHvccHahN7yw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5DC883C0F19D; Fri, 26 May 2023 12:59:49 +0000 (UTC) Received: from oak (unknown [10.22.10.124]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3D5C3C154D1; Fri, 26 May 2023 12:59:49 +0000 (UTC) Date: Fri, 26 May 2023 08:59:47 -0400 From: Joe Simmons-Talbott To: Florian Weimer Cc: Noah Goldstein via Libc-alpha , Noah Goldstein Subject: Re: [PATCH v6 1/3] x86_64: Set the syscall register right before doing the syscall. Message-ID: <20230526125947.GP176347@oak> References: <20230424150353.1469397-1-josimmon@redhat.com> <20230424150353.1469397-2-josimmon@redhat.com> <20230525180743.GN176347@oak> <877csvk1zt.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 In-Reply-To: <877csvk1zt.fsf@oldenburg.str.redhat.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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 Fri, May 26, 2023 at 09:04:06AM +0200, Florian Weimer wrote: > * Noah Goldstein via Libc-alpha: > > > I'm minorly opposed to this patch. Even if GLIBC guarantees all > > syscalls will set the number the instruction before, that's no guarantee > > for the entire program. Furthermore in the event of: > > `movl $VAL, %eax; syscall` > > It's still not safe to *always* assume that `VAL` correspond to the > > syscall number as a jump (direct or indirect) could still go between > > the instructions (i.e there is no guarantee in the assembly that the > > `mov` dominates the `syscall). > > So at the end of the day, we are bloating the library without, AFAICT, > > providing any real guarantee. Maybe I'm missing something? > > Joe, is there a size change to libc.so.6 as the result of this change? No, the size is the same with and with out this patchset on x86_64. Thanks, Joe