Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp129528imm; Tue, 7 Aug 2018 15:24:25 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyZgiBC4azctTYeM0ibLOd9T6LSbopoBGqX9fcC0NdMMxrpJbCpDrF75PXLXlh7a9BYEpim X-Received: by 2002:a17:902:bc8b:: with SMTP id bb11-v6mr199924plb.112.1533680665472; Tue, 07 Aug 2018 15:24:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533680665; cv=none; d=google.com; s=arc-20160816; b=QmCKoBxDwnDbURvG1aqyhBBK8hgoVWCHcfLmhae+dRZyAz71Omq5ZxrEy0MSNLhF3S b7oElBp3tq61A8sNdxmv7JjcxGydgTu3TXua8oFgWql1KCp+UhILlIvBIQIKVdIKDr3C fV+tGqik/05ftqqmEbDPsAOTHZ8ohVFvM4Zqc/BqUq6OT8xF5C5QjAQ2p9eqhn+6hYy1 IPAwYlTsZl6sIclT8ut2xoRQELLLEqO+YVNnIkuZyotP3PDa4lr6W0N1DNRAZaVHKfux 4bHj3DBcNiUAHZRayZZSXouFlj+GBoyDF4ZXTxUKYJK9D4I3YJMZ1Vh/bKm2HZ9uG5sR ChsA== 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 :arc-authentication-results; bh=mxFg3A7hUcY/XmaQ7QkY7n0L8dWpc+D4m/2jWHdL63U=; b=oByz8qiUuoBzAQceNsLwyBxkdf1lzYVvfpiuNhKVx8UJvhBeITNUGPyJXtuiPQ5Zsq VGqRareVyo7pqoDi2qLTRqPX1pzNBYCvHZLW0KR1dTkNEBBzpyA498WHxyuNJRzQNpZ5 yBvpM96RB4UZ9KgHJKY38CbYkmo2ROAHG6tIkEA9IBvmAs3XWtOIr6LmBgKLT4YR4wIz rdE7kx2CRQof6zV7+EtBlDRDc5AluMMf78eN7Lhr7l6yy3j7CFouK5GylWUBK71ioqVR b4N79ILhYFAXn7oreBZ2mhuXRl75ZpGkw8+FSXR/5FaFyr/lju8ywXdCJ+LEsb5a5UWg GEGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=ZbIdM6L2; 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 t67-v6si2156668pfd.364.2018.08.07.15.24.09; Tue, 07 Aug 2018 15:24:25 -0700 (PDT) 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=ZbIdM6L2; 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 S1726893AbeHHAjP (ORCPT + 99 others); Tue, 7 Aug 2018 20:39:15 -0400 Received: from mail.efficios.com ([167.114.142.138]:35400 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726579AbeHHAjP (ORCPT ); Tue, 7 Aug 2018 20:39:15 -0400 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 22CB9238CF7; Tue, 7 Aug 2018 18:22:43 -0400 (EDT) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id FxEfqq6g4DCd; Tue, 7 Aug 2018 18:22:42 -0400 (EDT) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 4CCDE238CF4; Tue, 7 Aug 2018 18:22:42 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 4CCDE238CF4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1533680562; bh=mxFg3A7hUcY/XmaQ7QkY7n0L8dWpc+D4m/2jWHdL63U=; h=Date:From:To:Message-ID:MIME-Version; b=ZbIdM6L2lVUH/EdVAG47zQDMoqNAaZuXNmCQP0sZsnJGyVwMRlL1ydn2H8o1vw83n EAT9LPIczUsan6Vv5+tG161kvTtYjVZdSZ61WRdpWVgzbrh61PUiSkb8JTy5nHClkU 8XMvvYCd31Pj/+24fVBY2Y7ZC/8DhMAfGhtrxB/EZAwVNPLmLDraI56t3QEZhcEBaL Tm5ZVSleoA5kjjASfC12MxKbLAC3YuwNWebbohn4DDcTy3iVKqALYD1ZIRp89z850V Y/KsoC/Dr/4tjI0jnZ5Bpzg4PMEcvWTv9q6GZAMIkI3N8VuJoM635eUwEweA6EwwqP ZloBAEz//USow== 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 Ya-tUWzruBJl; Tue, 7 Aug 2018 18:22:42 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id 34A46238CED; Tue, 7 Aug 2018 18:22:42 -0400 (EDT) Date: Tue, 7 Aug 2018 18:22:41 -0400 (EDT) From: Mathieu Desnoyers To: gor , Linus Torvalds Cc: shuah , Thomas Gleixner , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , linux-kernel , linux-kselftest Message-ID: <1178149993.10208.1533680561904.JavaMail.zimbra@efficios.com> In-Reply-To: References: Subject: Re: [PATCH 0/1] rseq/selftests: add __rseq_abi misalignment check 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.9_GA_2055 (ZimbraWebClient - FF52 (Linux)/8.8.9_GA_2055) Thread-Topic: rseq/selftests: add __rseq_abi misalignment check Thread-Index: 0yARQxuK9A/6exDzFDG4cc57QxVFwA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Aug 6, 2018, at 7:47 AM, gor gor@linux.ibm.com wrote: > While implementing rseq selftest for s390 a glibc problem with tls > variables alignment has been discovered. It turned out to be a general > problem affecting several architectures. The bug opened for this problem: > > https://sourceware.org/bugzilla/show_bug.cgi?id=23403 > > There is no fix yet. On s390 __rseq_abi ends up aligned to 0x10 instead > of 0x20 which makes rseq selftest fail every time. > > The change proposed adds __rseq_abi misalignment check, produces user > friendly message and skips the test. That's a very unfortunate situation. I'm concerned about adding glibc-specific error messages in rseq selftests though. I'm curious to hear what others think about this. I would have thought simply improving rseq registration error handling from having the test program return nonzero to add a perror() in there would be a more generic way to handle this. Regarding the message printed by your check: "you need a fixed version of glibc to run this test". I disagree with it. Someone can effectively run the test on a bogus glibc and it serves its purpose: it reports that glibc is buggy. I would understand adding this kind of test in an user-facing application or library to detect bogus glibc (in fact I've used similar approaches in lttng-ust to detect bogus compilers), but why add this to skip a selftest program, which sole purpose is to test the stack underneath it ? Thanks, Mathieu > > Vasily Gorbik (1): > rseq/selftests: add __rseq_abi misalignment check > > tools/testing/selftests/rseq/rseq.c | 19 +++++++++++++++++++ > .../testing/selftests/rseq/run_param_test.sh | 4 ++-- > 2 files changed, 21 insertions(+), 2 deletions(-) > > -- > 2.18.0.13.gd42ae10 -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com