From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by sourceware.org (Postfix) with ESMTPS id 33A653858D32 for ; Mon, 8 Apr 2024 11:44:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 33A653858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=ispras.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ispras.ru ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 33A653858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=83.149.199.84 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712576684; cv=none; b=T1Cm3Y+GqvDhBOKLXqJncjjyPn4cnlZuz4KyqJWLJi3UIzd9NMf9QdSuTWFaXcQR4OwJrZo30w1xzeQOkLrsKX2Sf9eoObakcpyDPQ5MTYgjjhqLBsJkyH4RNWdz25/aXbzYVxgMx6JQ9XZyTTPG8DvFkgV3aKYuIj4DMZe1ZqM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712576684; c=relaxed/simple; bh=Z8zUKUTVE2aG+5LluUTSOaPkIB/cFNY695Nl6qNZK0g=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=p9fz4R0K3WG0jX79j8TYtNEmPWV7Cq5YZX3catYsFIdivlgM7GdmRw5qV2SNKqS4NdNCquvRqdvML/asJ92HkYszb6fTdX43l02zyBuvRBg8w2vtpmtWsoP7vj0ah3eKLK3+1OMv65WZbw9bxZmBna92WLGTDtpdj1GYisrtmCg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from [10.10.3.121] (unknown [10.10.3.121]) by mail.ispras.ru (Postfix) with ESMTPS id 7617040737A7; Mon, 8 Apr 2024 11:44:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru 7617040737A7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru; s=default; t=1712576681; bh=AfFFDupss2zPJNd35fqunR4nkgcvC0POuECewzjciUE=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=XtrsOWGuGzeaVNGjsjT7WbZ0l4sAwjy3RkAJ66nEArihuC3h+/OIOpja4kasIqllr bAKr/akKhcHUBYloPssHY6qrsJOX+H4Arj4sdjBoJehLh0DwxPVLQneD3fOBC5d4Iu lWY52KHo5B3yrKeH7L10k/PrChKrJNStLvubpOI8= Date: Mon, 8 Apr 2024 14:44:41 +0300 (MSK) From: Alexander Monakov To: Florian Weimer cc: Matheus Afonso Martins Moreira via Gcc , Matheus Afonso Martins Moreira Subject: Re: [RFC] Linux system call builtins In-Reply-To: <87plv0w10k.fsf@oldenburg.str.redhat.com> Message-ID: <5a5b1c2c-6feb-3bf5-cf08-aa93a1b181b8@ispras.ru> References: <2d2f1e405361d2b36dd513e3fabd1fe0@gmail.com> <87plv0w10k.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 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. Unlike i386, where the vdso (as well as vsyscall I guess) provides the __kernel_vsyscall entrypoint, which provides whichever of { int 0x80, sysenter, syscall } methods is available and fastest. Or am I missing something? Alexander