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.133.124]) by sourceware.org (Postfix) with ESMTPS id 728C53858D20 for ; Mon, 8 Apr 2024 11:51:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 728C53858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 728C53858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712577067; cv=none; b=mRXEouft4YCaYkTHcuSMROrKwoOS5MFd2DgYJk7KSb2Tng/5XnuwtqlKUGABRuv4aC0jyPrEymJOlmeU7cdjKHXsRdieKYsG3cR+XCuC50h51C+hfGaoEoq13AFNDnwQyLHOZ15bKhNmZQ8onfEEcBTtH9CUSGZTv53JJyeDzQM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712577067; c=relaxed/simple; bh=gmRur4bnP8xAc4CgTjFKiwKoMlquPSVZROmyU0jlJso=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=q36MUsoXRaHXdJfrxdih32dLXVEHFKjbZutjEYDlwMQoHUqRPXJiIww73OiXV8N1bu7xIz99KDh2dMo3tyirW33MkuXlFGg0UF2E4aMmEpUBIUoZVKKlDnJ5ih8uszUMrI8Dr307CBMko/mP4qbyMC0ljTYJJCTSR/4lSs/bxYE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712577064; 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=dPrjWuAUxBD+6HK3cnGV7yE4WvQqgqZoFjZcdGvWj70=; b=UUidfacaOVUx29eHDX96GrdikYrN6qyNTCw2PqOKzyunBItl3imOQ294DGOl4SK8AA4XLy HvqzviHpg2IRR+BOCEZiMhupmWAKsTNQNFSh9Hrb9spQqRN1oGSUIXfLd6+3tcgZegA48a /yVFpZpG0YNEcYl7+MykGSsvI8VqulE= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-14-mdMS16qaOmqoXXRK-CLv-w-1; Mon, 08 Apr 2024 07:51:00 -0400 X-MC-Unique: mdMS16qaOmqoXXRK-CLv-w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A4CE13806712; Mon, 8 Apr 2024 11:51:00 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C813F47E; Mon, 8 Apr 2024 11:50:59 +0000 (UTC) From: Florian Weimer To: Alexander Monakov Cc: Matheus Afonso Martins Moreira via Gcc , Matheus Afonso Martins Moreira Subject: Re: [RFC] Linux system call builtins In-Reply-To: <5a5b1c2c-6feb-3bf5-cf08-aa93a1b181b8@ispras.ru> (Alexander Monakov's message of "Mon, 8 Apr 2024 14:44:41 +0300 (MSK)") References: <2d2f1e405361d2b36dd513e3fabd1fe0@gmail.com> <87plv0w10k.fsf@oldenburg.str.redhat.com> <5a5b1c2c-6feb-3bf5-cf08-aa93a1b181b8@ispras.ru> Date: Mon, 08 Apr 2024 13:50:43 +0200 Message-ID: <87h6gcvzsc.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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: * Alexander Monakov: > On Mon, 8 Apr 2024, Florian Weimer via Gcc wrote: > >> * Matheus Afonso Martins Moreira via Gcc: >> >> > + It's stable >> > >> > This is one of the things which makes Linux unique >> > in the operating system landscape: applications >> > can target the kernel directly. Unlike in virtually >> > every other operating system out there, the Linux kernel >> > to user space binary interface is documented[2] as stable. >> > Breaking it is considered a regression in the kernel. >> > Therefore it makes sense for a compiler to target it. >> > The same is not true for any other operating system. >> >> There is quite a bit of variance in how the kernel is entered. On >> x86-64, one once popular mechanism is longer present in widely-used >> kernels. > > I assume you're implicitly referencing the vsyscall mechanism, but on > amd64 it's not useful to *enter the kernel*, right? It was useful for > obtaining the result of certain syscalls without actually entering > the kernel, like with vdso. The implementation performed a standard system call if a pure userspace implementation wasn't possible. It wasn't intended as a general-purpose way to enter the kernel (although it could be used as such, hence the desire to remove it in some cases). Thanks, Florian