Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7342898imu; Thu, 31 Jan 2019 08:38:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN5ZiKHBbEE9xvvD39dYIu/OooSAziXV1WBRfOrT1/LACDiFA2U8eoqBagFvJc3rHk55TSkW X-Received: by 2002:a62:7042:: with SMTP id l63mr36956313pfc.89.1548952701800; Thu, 31 Jan 2019 08:38:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548952701; cv=none; d=google.com; s=arc-20160816; b=Jg/Es9AhXgNbLwikkZGgLXFCPEP7BPtMEzmRALzngvt0KQ10x0FYJROShi582fTene L85yoKReyPWwRmx9NSaRh3NM7pTAAyoxZxfoqmCSjlVicj1Hv9BIBpAKhR3/iKAgHaso UY8jmJVPyENzSWOLOVIg8kQrwjyBxcNxWkoeVxwlswTyVY9N3qCO0WH1A37CBdaIbbql UnursW7fv8/YyAw8AgOLy6MrDezazqGkyfpriwtMxAnb8ddxSf1sXrzB9YOUSQ35pWRH zTLPc4fV45kjulmuMYLcmrkAmeKabaMYdPsRHzaG/qA6HmtetdRfM4dA1DwGov/LTGDX uL6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter; bh=MuyUdN5+9nCwqgF5JdlYlas8dNCA60Xn7ZDEGE162hY=; b=VfcskIeREgmwB+Rsd4RJmcQY3Zdz/UYrkKVg1/9vBPX5s+DCxSKSESJfy7sXuN2Prr qzQh8eRs/IGBBTDGcMJ9wNhDPqvESpxMUv/aM8CFSIuYOVK7ou4C9Uml7KoxA1TjKc3D pl8Jj2T6P0T2s018LTec/YHLftbBWM3Zkt0Hs6FleY3Sftbdvm4qUT8R2zt4IDXN3GPv uibNqy4VGDav6hvjpHUe7G0ImNk0EGJFBkS+3Rp78c4qNhlNxsge3lf+FPNiBylGKgLH dGjPmzbxo/oz3dfk7cxlf7FkSChzFzYhcUR5HKr3+Fxkh8FSIStmQdEzHPWuNJxIoy6l 1R6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=JGVYB5xE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b63si4770626pfa.250.2019.01.31.08.38.05; Thu, 31 Jan 2019 08:38:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=JGVYB5xE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388568AbfAaQhL (ORCPT + 99 others); Thu, 31 Jan 2019 11:37:11 -0500 Received: from mail.efficios.com ([167.114.142.138]:39648 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388493AbfAaQhL (ORCPT ); Thu, 31 Jan 2019 11:37:11 -0500 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 87841B8940; Thu, 31 Jan 2019 11:37:09 -0500 (EST) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id ktlY2zq3mSRe; Thu, 31 Jan 2019 11:37:08 -0500 (EST) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id ACB2AB8938; Thu, 31 Jan 2019 11:37:08 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com ACB2AB8938 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1548952628; bh=MuyUdN5+9nCwqgF5JdlYlas8dNCA60Xn7ZDEGE162hY=; h=Date:From:To:Message-ID:MIME-Version; b=JGVYB5xEkP4q4QMXl6qiqRDEFOTMRbDSt+Lcr9k7UOkAk1uFFcaeoZDlWv/R+VG4v mWTctBDZmqu9+yNz/SI9yondoE889+Qu8UhX6BKKwG2j1z3PHk50FQdQ6dj0fjniXP nQ1D7O4I9mD6H86n6bn3WcGAsydFUSoO0YVkxXjCjStxZkJeF04BgRhhVhnkx7MAJs djYMUVoDZQ72wystMmQvuNtM7HL+VFURuEogRgC8SCIcpdABl3TSiT5yKrhAPezna7 aU6JkL//MVS3AO+kw+prVo84lRoNMa2/1Wp8Gow3ryY2WV4WeOUQmo9CO3k2JuKoQN pbyLNRZvCJFvQ== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id npWBaDQJqV7U; Thu, 31 Jan 2019 11:37:08 -0500 (EST) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id 8D809B8931; Thu, 31 Jan 2019 11:37:08 -0500 (EST) Date: Thu, 31 Jan 2019 11:37:08 -0500 (EST) From: Mathieu Desnoyers To: Joseph Myers Cc: carlos , Florian Weimer , Szabolcs Nagy , libc-alpha , Thomas Gleixner , Ben Maurer , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Will Deacon , Dave Watson , Paul Turner , Rich Felker , linux-kernel , linux-api Message-ID: <19276261.499.1548952628477.JavaMail.zimbra@efficios.com> In-Reply-To: References: <20190121213530.23803-1-mathieu.desnoyers@efficios.com> <632671842.3079.1548781059601.JavaMail.zimbra@efficios.com> <596949707.3888.1548812359874.JavaMail.zimbra@efficios.com> <1832200535.4162.1548871426959.JavaMail.zimbra@efficios.com> Subject: Re: [RFC PATCH glibc 1/4] glibc: Perform rseq(2) registration at C startup and thread creation (v6) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.142.138] X-Mailer: Zimbra 8.8.10_GA_3716 (ZimbraWebClient - FF65 (Linux)/8.8.10_GA_3745) Thread-Topic: glibc: Perform rseq(2) registration at C startup and thread creation (v6) Thread-Index: Ob38kFgOPgYUZJdpZaND7zVYh0vhHw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Jan 30, 2019, at 4:10 PM, Joseph Myers joseph@codesourcery.com wrote: > On Wed, 30 Jan 2019, Mathieu Desnoyers wrote: > >> #if defined (__NR_rseq) && !defined (RSEQ_SIG) >> # error "UAPI headers support rseq system call, but glibc does not define >> RSEQ_SIG." >> #endif >> >> Would that take care of your concerns ? > > That would of course need appropriate conditionals based on the most > recent kernel version for which a given glibc version has been updated, so > that using new kernel headers with an existing glibc release does not make > the build fail (cf. the test of syscall-names.list). The test I hint at above would not be for the glibc build per se. It would be for a check that glibc implements support for all the system calls available in the kernel headers (if such a test target currently exists). > And being able to > write such a test only solves one half of the problem - it needs to be > easy to determine what value to put in that header in glibc for an > architecture that's newly gained support in the kernel, *without* needing > any architecture expertise. I'm afraid this requirement is incompatible with the nature of the RSEQ signature. This signature may be required to be a specific trap instruction by the architecture, so deciding on its value without architecture expertise is not possible. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com