Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7401502imu; Thu, 31 Jan 2019 09:29:30 -0800 (PST) X-Google-Smtp-Source: ALg8bN5JCRsmp5w6dEXcBv52UpLvJIIXeiXAZPB7t2YglnMhJmmj5f2mXI0Qphpror8RJYahbdEl X-Received: by 2002:a62:44d8:: with SMTP id m85mr36098789pfi.164.1548955770212; Thu, 31 Jan 2019 09:29:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548955770; cv=none; d=google.com; s=arc-20160816; b=XuvppM9eE/lbd/Iy/w+I0IRyh8TulXkC0lKjp1mGajhoQoJFfOrMSfgy/cyJHju5DW DzKOUoekowe1l84VHINk8vj/6BHnTlDBmm1a1TM0k53qAeL+5uauu10dL8J3i+8R7if0 MFdmyPPSzvsNGqowIMk4OniO+PJZ12ioNmz4Zw3oW6AwEGVySi5Gfldgvb11K8CEw1dt xew6h0vRaiMuFS/BbwjybmZxk+cSjGis8vO1YUPLv4k/BAy+C8i4qZ3BRJdsyeBC2QOB 2U39EAeIm53T0AXt1ZDAZ/8/9965GzUx66LEm64grFMB4LE0gQBWMMSUv9Bmg93+exvK EHpA== 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=/TyHWmziK1+f0ypIloY32NPNYmiETwsNtjHvLnAdTd0=; b=FFZLXa4F/ajk4N/sRqcIywgGOcaTXO+ibaXHYKYt6dOjzqR5r2u2A+aF4EB5ARs5B1 43vfSohAllTXgR1AHA0K5/z4i8u7Zl+6E6o242GXshco8GdUSuhmInKzfklX2Xjn0jDf rntouUCkOWEvp4jlFV6cOGWwMz6AAEZNI3qPX3iBZXhtR8DDs1O2MFvLy6lVSVdaAhgv JZPc9a5RUBagCWCiX+KBaxGs5+eER1mq7Z3XV/G1zpBjbAfFrF75RrGqFRV601898cY7 9h4fT0kbyzB4A+NR1D5zrmIy2e2UN/6LhTJRYOGZIrtooRhCfb6GJnrUcp1aF8Eeit0d q9qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=Cb40sEyO; 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 j29si4732962pga.550.2019.01.31.09.29.14; Thu, 31 Jan 2019 09:29:30 -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=Cb40sEyO; 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 S2388726AbfAaQxg (ORCPT + 99 others); Thu, 31 Jan 2019 11:53:36 -0500 Received: from mail.efficios.com ([167.114.142.138]:50760 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388687AbfAaQxe (ORCPT ); Thu, 31 Jan 2019 11:53:34 -0500 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 84EE7B8CF7; Thu, 31 Jan 2019 11:53:33 -0500 (EST) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id s-pNhXHjcasT; Thu, 31 Jan 2019 11:53:33 -0500 (EST) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 0C0BBB8CEF; Thu, 31 Jan 2019 11:53:33 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 0C0BBB8CEF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1548953613; bh=/TyHWmziK1+f0ypIloY32NPNYmiETwsNtjHvLnAdTd0=; h=Date:From:To:Message-ID:MIME-Version; b=Cb40sEyO+Gl4xl0tXZNPXwgJkzKNhVDeXUA1XC6t2fdvtZ4D6t15vD5FP3C1nZ1A7 wkbwIPvnoD96WBXMBW+vWzzw/ecxGMVz5IIBtCGAzpW5kJu7Vqy5+n1A0+RgSAf+Eb 5vk50qCjW6onbIALPvSMjMVuIa7cnYFcDgcnLsU6sv4t2vdIF2z6n/9jzwf7zK6uJf OJ6Q76c6mY+zHz8RPElfovwvZauqVCbQw0Q9eHUHXJBJ0vqorbTo87cHpcd/tqM0lw cLbR7BeDlGXQDTj+iNC4TOVdzgq/MYiJa4XtJv+2BCXHKLzJ1wDvLJ4kbBbqk7cYNW ufAbJSutk1JbQ== 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 jFsbIUyWmGK8; Thu, 31 Jan 2019 11:53:32 -0500 (EST) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id E2D9EB8CE8; Thu, 31 Jan 2019 11:53:32 -0500 (EST) Date: Thu, 31 Jan 2019 11:53:32 -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: <492954632.538.1548953612856.JavaMail.zimbra@efficios.com> In-Reply-To: <19276261.499.1548952628477.JavaMail.zimbra@efficios.com> 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> <19276261.499.1548952628477.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: Ob38kFgOPgYUZJdpZaND7zVYh0vhH41UU4uh Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Jan 31, 2019, at 11:37 AM, Mathieu Desnoyers mathieu.desnoyers@efficios.com wrote: > ----- 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. Just to clarify a point: the "success criterion" I'm aiming for here is to provide a rseq integration that does not cause foreseeable user crashes on upgrade. I'm all for taking into account the maintenance burden on glibc maintainers as a metric in the implementation choices made, but at this point, I don't see how we can achieve success without introducing architecture headers for the RSEQ_SIG signature. If you have ideas on how to further minimize the maintenance burden for glibc maintainers while still meeting the success criterion, I'm all ears. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com