Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1356620imm; Tue, 3 Jul 2018 09:42:14 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcBMtDIIHJrIZPy2UhTwHRuHFiJsdEaRLGjsBPxvYuJ4VFwPuyJciqZGbKTjNeF2J7TAs3D X-Received: by 2002:a17:902:5481:: with SMTP id e1-v6mr24394761pli.7.1530636134340; Tue, 03 Jul 2018 09:42:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530636134; cv=none; d=google.com; s=arc-20160816; b=GA+JkKI8pl+ezLXj4CGBKYRfUQUxsLvO0snK8SDPl7BgDMjGwk6J2+X5703wPMJytp u3FNxeZT3e09wUKvNBhi4uj7MIKNj0mIVFJ+oSzXvi8FUGgVoR4zzRvwqUDAtOW6qoZV fykRpOMirWMjGHdiRmUZwKXIWZGfurlyLQyh0oBgY7JcgvPaUR0PGenkWUd/S6jocaM5 LQrVyHPmhAULCiYrn+lELZBExNPUCKSVn/K2gZfm/R/TCUqVp/w0RGLPDc6bWyzLs+EV qcqAiFoEZoV5Ywa1obIU8rRd2Gue9TKPtGGuvdLWPloywD+EYyx5Np7C/Xr/ouEBU+M/ eubg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=pp6bGwrTGk+SR112oWqoMNfx9iMi4wzTtlZYdAWAn64=; b=xszebpOm5gWQfIrWqgvfSQa9tGHMc7B7UgM+wysknwyvs4SNN/8SvRE5qKc3OMXq/i c/tBb8RnweKMVfoaXVUhYW12im3Qf0EpwxDXgkJS9JWZ0mlUKcrTDXCWClkUP+jfqhpA tEW8U57gy1qbgyINX94G6WNbd2f3txySln8n+u3Gf3AQ1jiIQvza8AzuAyb0A/DxRZBk TLSnxMtM+lTVhdotThRdusLMDAcHY5Zd7kBu93oFIVqaiTSDFsADJz/5M940lzDymJzF k5BCSmCo0dIrNpJzTiVelTt2xaWqfRWv71RCcv2AdRRymh+YdKYTheM/8t7i4Ek2mUxb YNmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@firstfloor.org header.s=mail header.b=AxPZ2dNk; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w65-v6si1344852pgb.377.2018.07.03.09.42.00; Tue, 03 Jul 2018 09:42:14 -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=@firstfloor.org header.s=mail header.b=AxPZ2dNk; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934173AbeGCQk4 (ORCPT + 99 others); Tue, 3 Jul 2018 12:40:56 -0400 Received: from one.firstfloor.org ([193.170.194.197]:36778 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932759AbeGCQkw (ORCPT ); Tue, 3 Jul 2018 12:40:52 -0400 Received: by one.firstfloor.org (Postfix, from userid 503) id 268EF868EF; Tue, 3 Jul 2018 18:40:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=firstfloor.org; s=mail; t=1530636049; bh=5LQr+57Yn86zrNpVPZWygKxAhfwY0IKnbLsc5r5PQVA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AxPZ2dNk9RObD8Mmz7v2Q79DdiZzhlPLZ2fFrm51TyaG2xuq+uqJFK5nbx44p0I++ FpxjJVRAgmExBZNzhXCSfkEo0XjiPcZLrW7gl21qzhphO9/bOQCqsU00kVUB6hHtPt e61x8YPWMjJfNSLGxhRCK5qrVGMU9egN0V5brx8A= Date: Tue, 3 Jul 2018 09:40:48 -0700 From: Andi Kleen To: Peter Zijlstra Cc: Heiko Carstens , Mathieu Desnoyers , Linus Torvalds , Andy Lutomirski , Thomas Gleixner , linux-kernel , linux-api , "Paul E. McKenney" , Boqun Feng , Dave Watson , Paul Turner , Andrew Morton , Russell King , Ingo Molnar , "H. Peter Anvin" , Andi Kleen , Chris Lameter , Ben Maurer , rostedt , Josh Triplett , Catalin Marinas , Will Deacon , Michael Kerrisk , Joel Fernandes , michal.simek@xilinx.com, Martin Schwidefsky , Vasily Gorbik Subject: Re: [RFC PATCH for 4.18] rseq: use __u64 for rseq_cs fields, validate user inputs Message-ID: <20180703164048.i2te5gjemcafqzwf@two.firstfloor.org> References: <8B2E4CEB-3080-4602-8B62-774E400892EB@amacapital.net> <459661281.10865.1530580742205.JavaMail.zimbra@efficios.com> <858886246.10882.1530583291379.JavaMail.zimbra@efficios.com> <1776351430.10902.1530585009519.JavaMail.zimbra@efficios.com> <20180703081449.GT2494@hirez.programming.kicks-ass.net> <20180703082955.GH3704@osiris> <20180703084312.GU2494@hirez.programming.kicks-ass.net> <20180703085546.GJ3704@osiris> <20180703092113.GV2494@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180703092113.GV2494@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > So I think you're good... But yes, you raise an interresting point. So it sounds like architectures that don't have an instruction atomic u64 *_user need to disable interrupts during the access, and somehow handle that case when a page fault happens? -Andi