Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp521089imm; Mon, 2 Jul 2018 16:23:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLYKZVrwzG30jUmd17OB7Akkb+uAffy9BTB1bKhZTVBhF/p9SB+IBj3NR9rM6fXje6fMosv X-Received: by 2002:a17:902:7248:: with SMTP id c8-v6mr27835060pll.128.1530573801070; Mon, 02 Jul 2018 16:23:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530573801; cv=none; d=google.com; s=arc-20160816; b=XKNcQZKT1Ae1lNRCv+AriDCVsRxMjU3Gcs13ZeklWCj+TvRajxcdTfdWERltzLWG6n ULEh7ba/fXZ1mWU6zMXdEA4uhjdvSsRwnfRhHFCV7xXVUh8tUoeeQI95JyKQTqGkySKS ATJXKvv2rWJKxUzFCime1gw7HBJ8PgM87q+Ks2SEFqdJNjrbtpXaX4WANzYrtBmfSS2L UTlWbm7N2XXXC9UVobVFTvMgGS/LjYkzE7kISYVDyP34IK5GucF7fQPoUNXaoUaUb1OI 5Lwev94fQ1+y2l6ffYyYFR8BmCigFYWLBewepfuUEnM7rLzOxwZDMt0XN2xrn41KFwsJ QiLw== 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=Kt0+beNA65xbcW4blsNCxlHLj1zSU8x2dO8PGgWTA/s=; b=lqNp01PhKesz2D076UgEx8VY4wApGdflQj067Vzz/NZodjHJFnHVNxWg/J/ujA3Luh Fe3XqbJeOlKkFiK+RUyS6k9nVgOHtkrj0EgQLTC7Yj0ExR5K0ci3OIXZqU/Tvl/Olces b3W3I2YMCNl0m9/q4cyxLMNUt/g4J1SMqJhc+hoHJ0hGHFOEE4fpNKuCWOx7Y+ChFfN0 diGABR5oyNFxUipRLB5LiupAw+WqENpkw8CvlrEgvIi8DyKO6v3ag/0nv4KxwkD5RpXi c8KHYGiDI6xNTS3Q3RS0vea9vN+MqG6TR8DFOS5cqlPthXpLzzEWYwO2gisKuo/MsWo5 0WSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="dV/DOwc5"; 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 o12-v6si17050686plg.154.2018.07.02.16.23.06; Mon, 02 Jul 2018 16:23:21 -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="dV/DOwc5"; 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 S1753612AbeGBXW2 (ORCPT + 99 others); Mon, 2 Jul 2018 19:22:28 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:35609 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753384AbeGBXWY (ORCPT ); Mon, 2 Jul 2018 19:22:24 -0400 Received: by mail-io0-f195.google.com with SMTP id q4-v6so78817iob.2; Mon, 02 Jul 2018 16:22:23 -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=Kt0+beNA65xbcW4blsNCxlHLj1zSU8x2dO8PGgWTA/s=; b=dV/DOwc5CMce5MAshmhbZeE/o6q8Og5RcuniWddGzA4b8Adf9A4A4WYT7v1dAM/LaW Lo9Nepo31SCQxLMx8fDroFOBcfzT+ao9mCWTuYbF0aQ+pJic8pyTPsWyPwGES6iSPB9j tQ6pcmg+hO+uQklG7Ia6EJlrbLZqmwaTVMK68= 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=Kt0+beNA65xbcW4blsNCxlHLj1zSU8x2dO8PGgWTA/s=; b=oKFfztZJOvG7A9mEJXTrAFBxinLQgGv0TGANvT+k1YQhsf+40hxKp2hxK7ltDEB1iw 3kHj6ibqofRsugGWmnhWo9Or3xp24H5HOhr2xo/6X4Vku+546rQFK/V1IIiru0+7WAun WjacOUw7eFBzxeZubK6D7uBildFL/UqATQBFYrXpwuwuuVhGZwv28lGM9er9AV+kxkzE pPVFAp3ZLv7h0bmazDuZYnX7LzwPocCip+7c7nnDfEKh8MAvkj9Ra3zbOXc9jRDyGgaz 7Eezc8Wm49PehQws9gHFvGOdo4xkNBsGe/R/gPb/mAMB7RG9eUaVw+YWU+uWbPe5pdcg K9kw== X-Gm-Message-State: APt69E0XoglaSQcqYY8uo4HT4HCLQZfeyMWikSS1YrU5HazlWTN421rd eLYS0Zx/7CuHZ5XA8X04MED21p94h/hhL4TXuag= X-Received: by 2002:a6b:1502:: with SMTP id 2-v6mr23981458iov.203.1530573743364; Mon, 02 Jul 2018 16:22:23 -0700 (PDT) MIME-Version: 1.0 References: <20180702223143.4663-1-mathieu.desnoyers@efficios.com> <415287289.10831.1530572418907.JavaMail.zimbra@efficios.com> <825871008.10839.1530573419561.JavaMail.zimbra@efficios.com> In-Reply-To: <825871008.10839.1530573419561.JavaMail.zimbra@efficios.com> From: Linus Torvalds Date: Mon, 2 Jul 2018 16:22:12 -0700 Message-ID: Subject: Re: [RFC PATCH for 4.18] rseq: use __u64 for rseq_cs fields, validate user inputs To: Mathieu Desnoyers Cc: Thomas Gleixner , Linux Kernel Mailing List , Linux API , Peter Zijlstra , Paul McKenney , Boqun Feng , Andy Lutomirski , 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 4:17 PM Mathieu Desnoyers wrote: > > Are there any kind of guarantees that a __u64 update on a 32-bit architecture > won't be torn into something daft like byte-per-byte stores when performed > from C code ? Guarantees? No. Not that there are any guarantees that the same won't happen for a plain 32-bit value either. Will compilers generate that kind of code? I guess some crazy compiler could simply be really bad at handling 64-bit values, and just happen to handle 32-bit values better. So in that sense a 64-bit entity is certainly a bit riskier. But that would be a really bad compiler, I have to say. Linus