Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1607792yba; Thu, 4 Apr 2019 14:20:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwaPP7VzIzI8i/9jCs5q4qw5IDu4CSb1gd2Vscjv/GZJHaET1yDiiCkuin78y6rDJxYe/yv X-Received: by 2002:aa7:928d:: with SMTP id j13mr8312994pfa.112.1554412850061; Thu, 04 Apr 2019 14:20:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554412850; cv=none; d=google.com; s=arc-20160816; b=DCjbj6B+p/rO3Oc+cjdwHefFmGVS4iTcUcVdhfOcB7cNDtXZ7bcAhfqITw/IFg4Z2h 9L3NWrlYdKiPrz5c6OMGbrmIaJ5crJYK/PXP435+evYq/yy1/ONi3fUrWzbEFgMYAHp3 pxAzYhN0jDGd/YEzYszCZzKZNJc8EdNQdXJYgoUQZrUwUIc9Ll08CWvApEINzik4paq5 YfH4a9b1ON2p9WmvXN7SKPPvDTIG1zPBuZYGqWiJvlj8S8LpKCHiNXjcwXp00WYj9OHR CsToN/2rzwvR2zNXzHtuC7PsWY6icH4LkI1pmYbMK48prYlhUCSGRbdPXT2P0t8culAN mAcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Qd5Qz/L4RJIuJje79jaJ+hi5IZTEPZF8lGl4Vo7whcI=; b=TsgrFt2drXP1ezdFwzPphNIj1h7sNITrvQw4Ff9Aegq5JImGqYBa2Xk2ZtwbWxUTh8 0hBKTTxnD7F43tzFp8givt5j3UdLFrDoVcae/hatnQrCirt/7xQPHSidLmaSSWI0oTTi abQLeqght2uqRPbc5HL10TaeYS1gMJnACONJuyTCfAQGgVUyu+3N68HVfVhDex6j9tqz Oli9ZaatVsxaCs212meESQjOC/qsHp62MQyqezzLEkuXlcCQrzZAsqTJz+6s9Wip3KLt XLgWFf731h946yt6f1cmJWQsiuO1P8t6Yf013M0+vmTl/w+gIBg9iyLjuDi+LaUvCyW5 xcuQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d14si17927597pln.404.2019.04.04.14.20.34; Thu, 04 Apr 2019 14:20:50 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730058AbfDDUdA (ORCPT + 99 others); Thu, 4 Apr 2019 16:33:00 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:38472 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726418AbfDDUdA (ORCPT ); Thu, 4 Apr 2019 16:33:00 -0400 Received: by mail-qt1-f194.google.com with SMTP id d13so4920940qth.5 for ; Thu, 04 Apr 2019 13:32:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Qd5Qz/L4RJIuJje79jaJ+hi5IZTEPZF8lGl4Vo7whcI=; b=jfgeUxgmrbti1Pep2R6RIz4A82sP0TcmXU0ZDhH6c2OH0iYq5rypR4FWdpqeXY4ivj SEAsLptJTAx0ePE47geLqh9z1evX4bFiPqzy5itt4Ibg/tHqAXSUWqKxDO3pNt0FJnne HMJ4mHLUYw0ws4/xIkR/VLU2Sp84AFeovHBaWmTmQaWqCrIeDk4pLrXMzjkSo7zMBMyo y+K1kO4Gf+QGRO3wHPLcc7Zi9ii6GYQ+A62IIZETWP6I9gR7ubUTNSyDVJ+nWsH5U2Cw n24pq3pftgHueFXZA4vgiogSDh2Q18y+5/7LLu3MO39SzUPkKahC4K8r3ydNABC/N1dJ rCHg== X-Gm-Message-State: APjAAAXOqc1nwN9IgTyG5Tq4I57K8V+uwFL8sOJrulPHSmMGK0/TRZ1n ZaOp2SG56elBLcJB6Xz1XyQeTw== X-Received: by 2002:ac8:14c:: with SMTP id f12mr7739066qtg.138.1554409979358; Thu, 04 Apr 2019 13:32:59 -0700 (PDT) Received: from [10.150.73.190] (214.sub-174-240-132.myvzw.com. [174.240.132.214]) by smtp.gmail.com with ESMTPSA id o50sm12943268qtc.23.2019.04.04.13.32.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Apr 2019 13:32:58 -0700 (PDT) Subject: Re: [PATCH 1/4] glibc: Perform rseq(2) registration at C startup and thread creation (v7) To: Florian Weimer , Michael Ellerman Cc: Mathieu Desnoyers , Paul Burton , Will Deacon , Boqun Feng , Heiko Carstens , Vasily Gorbik , Martin Schwidefsky , Russell King , Benjamin Herrenschmidt , Paul Mackerras , carlos , Joseph Myers , Szabolcs Nagy , libc-alpha , Thomas Gleixner , Ben Maurer , Peter Zijlstra , "Paul E. McKenney" , Dave Watson , Paul Turner , Rich Felker , linux-kernel , linux-api References: <20190212194253.1951-1-mathieu.desnoyers@efficios.com> <20190212194253.1951-2-mathieu.desnoyers@efficios.com> <5166fbe9-cfe0-8554-abc7-4fc844cf2765@redhat.com> <1965431879.7576.1553529272844.JavaMail.zimbra@efficios.com> <87lg0tosfz.fsf@concordia.ellerman.id.au> <87pnq4zxyj.fsf@oldenburg2.str.redhat.com> From: Carlos O'Donell Message-ID: Date: Thu, 4 Apr 2019 16:32:53 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <87pnq4zxyj.fsf@oldenburg2.str.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/2/19 3:08 AM, Florian Weimer wrote: > * Michael Ellerman: > >> I'm a bit vague on what we're trying to do here. >> >> But it seems like you want some sort of "eye catcher" prior to the branch? >> >> That value is a valid instruction on current CPUs (rlwimi. >> r5,r24,6,1,9), and even if it wasn't it could become one in future. >> >> If you change it to 0x8053530 that is both a valid instruction and is a >> nop (conditional trap immediate but with no conditions set). > > I think we need something that is very unlikely to appear in the > instruction stream. It's just a marker. The instruction will never be > executed, and it does not have to be a trap, either (I believe that a > standard trap instruction would be a bad choice). I assume you want to avoid a standard trap instruction because it would be common, and so not meet the intent of the RSEQ_SIG choice as being something that is *uncommon* right? It is valuable that it be a trap, particularly for constant pools because it means that a jump into the constant pool will trap. -- Cheers, Carlos.