Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp650798imm; Mon, 2 Jul 2018 19:45:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJrH6b7BT7W7mrg3Ep4H9ZuKB9hXZXr8AhdwdhCJ6h2wtTewpxlFo9tXgUcqkYmOXXdHjgx X-Received: by 2002:a17:902:46e:: with SMTP id 101-v6mr28595776ple.39.1530585930414; Mon, 02 Jul 2018 19:45:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530585930; cv=none; d=google.com; s=arc-20160816; b=V1vMIaZ9cJ/5C5+xz8YxGbPv6p/NZhSVX4NR0vUIGh8TzVCn4CdOLyTimUIspF0sK9 rsMBXk/HKq36MVjBjYv7SPrC//NbGAT6kgAuE99r9dX8fu9bnWP5WS/wNkipmRBjQPKH fFIAdQUeIr91fe609/7Rjmv9Ty3CUJZdZp/hR7o1nkDgBSuhIhYNt3MW32eb6D1NUATK Zjb26u7+i4JmDvOhGNfc9z3oWaDcEjMu6ps22OBmNv1TQR5y5QNIXtGxxCC2I/5XbBjo 4qoI8hq2syxrWEa9kWl5lh2R149LaKEIb/ItesS/0rEOjbccvmqxa3hJi9Dad5tGHH3U A9jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=tWufW4CXMCA2e8nqe8Z2uXnWilwGXlAVpEl0VpSkwDQ=; b=l3rMaCBGxAexm3aV+7xalmWRujJjdioMYgAEkpQmqL253Q2nzSF5QIMSnTx34K/osC D0kg+fYpWk0OP15IJudsprfZfVLDEyrU+wrfIRKlk33PpfjkH9SuJwaeukxiBUrRpAsj RztNKN5PipjPmXP/uiP5ijyo2fhBtXqDGq1udvpvT7BJIEzy5w13jrTIf5zmkR2F8gvH zEkmy2MCjm7pWhr93NttmRqSI2AbtZGUjBJjxid+SqaFI54FlCxGJ/itU3PSmVHaz7Re epohux+11Xe0cgV5LysWbWVcY5U50DxSs6I8o+jI4uCNl7M4QPJJdJjVDNvA6Xhtg2FT hX1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=boO3KxJJ; 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 n5-v6si45289plk.352.2018.07.02.19.45.16; Mon, 02 Jul 2018 19:45:30 -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=@linux-foundation.org header.s=google header.b=boO3KxJJ; 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 S932460AbeGCCog (ORCPT + 99 others); Mon, 2 Jul 2018 22:44:36 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:53638 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932120AbeGCCoe (ORCPT ); Mon, 2 Jul 2018 22:44:34 -0400 Received: by mail-it0-f65.google.com with SMTP id a195-v6so1060139itd.3; Mon, 02 Jul 2018 19:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tWufW4CXMCA2e8nqe8Z2uXnWilwGXlAVpEl0VpSkwDQ=; b=boO3KxJJbXLNpbCKoC4t7w3BKzrOMP2AJQbspmQ5u85ziLUIXe1RzeTcnXXdhF8kuO J8SiexzQWPxHpBPIR+w5WpGEzx+sn6fZriD1KAuJg7dxU3+79NGk+/j9rowGhupHqECU perJ2rzyBU1eUBLSvhWWwIoIWWzm5Jry30bDc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tWufW4CXMCA2e8nqe8Z2uXnWilwGXlAVpEl0VpSkwDQ=; b=h7NqNZMeZ5A2P+d8iFs/f1Kgb2PDwGGgQow1ih1RMBhkAmMrHnAh1cOtbyNIy9DTef dLOGsGsKH0EoY3IQrARKNcgJm6o4lhqPIAgKriu9oL8ZRL82+H+w/2Cf2xPmq8c0iCWs e35tp5DddK/PHxXYiTJnVHeS73BTfkKPQkOu0miBjGLCuo2QkpGLV8OE/JUSw+FGPr2e lUjk2TNe9yxk8Vs1D7E5u1+h9AkwajNIe5csscWLYf4bJZHAtNxkKpa1+GD7325WnXg/ 9AkFihL1K16n5HwuFeUSLYGqWmhvjNyxbWuWHckMg1q+TUh42oRDZXvupQsJva7uq1YD KhlQ== X-Gm-Message-State: APt69E3VmOh0CBsBK1v8IzLDtXENly91ANv1HvlAlbpcnjNT5ZPw/KMk OBaK9CGfiEPx/nkp0T+IHvqpVU1fVx4tyonDgwWWsA== X-Received: by 2002:a24:8046:: with SMTP id g67-v6mr7703018itd.16.1530585874095; Mon, 02 Jul 2018 19:44:34 -0700 (PDT) MIME-Version: 1.0 References: <20180702223143.4663-1-mathieu.desnoyers@efficios.com> <825871008.10839.1530573419561.JavaMail.zimbra@efficios.com> <1959930320.10843.1530573742647.JavaMail.zimbra@efficios.com> <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> In-Reply-To: <1776351430.10902.1530585009519.JavaMail.zimbra@efficios.com> From: Linus Torvalds Date: Mon, 2 Jul 2018 19:44:23 -0700 Message-ID: Subject: Re: [RFC PATCH for 4.18] rseq: use __u64 for rseq_cs fields, validate user inputs To: Mathieu Desnoyers Cc: Andy Lutomirski , Thomas Gleixner , Linux Kernel Mailing List , Linux API , Peter Zijlstra , Paul McKenney , Boqun Feng , Dave Watson , Paul Turner , Andrew Morton , Russell King - ARM Linux , Ingo Molnar , Peter Anvin , Andi Kleen , Christoph Lameter , Ben Maurer , Steven Rostedt , Josh Triplett , Catalin Marinas , Will Deacon , Michael Kerrisk , Joel Fernandes Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 2, 2018 at 7:30 PM Mathieu Desnoyers wrote: > > > Is it really ? Last time we had this discussion, not all architectures > guaranteed that reading a 64-bit integer would happen in two atomic > 32-bit sub-parts. All architectures that matter do. Please don't overdesign this, or try to make a problem out of something that isn't a problem. Sure, maybe some toy architecture does a 8-byte "get_user()" as a "copy_from_user()" one byte at a time, because that's the best way to do unaligned accesses. But nobody will ever care about rseq on such a thing anyway. Let it go. Linus