Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1509145pxk; Fri, 4 Sep 2020 11:07:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUHBSv99ULMyafpSRQt0rpyr4H8ssLPMN+sOcZ4Lf2tyfZ4EFoweIP6AaWMZIu6zaagAFb X-Received: by 2002:a17:906:d18c:: with SMTP id c12mr8530314ejz.151.1599242871817; Fri, 04 Sep 2020 11:07:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599242871; cv=none; d=google.com; s=arc-20160816; b=xJbyMpXN/EHxYm3yAejMpSwWd0BiZuRt6CXXB3CRutHqW5P8M4FYqx4ExSdmg687Eh NyHmnAXPODf8jT8x1NVsyYIBRfWegJXvKY/tPaPO3ilav4A2CVyYU9qVUk/zs3e+OgHZ RsGR5p9ZGCUlFRpP2R/TtnW9JkD6DA41Sc/8dUPP44wN7Ktiw7urhzVNnf+UQ4+kKjn6 sOcFT2tphYd0hY8hmUj7Wzfkg1ohPOCTgRbW+KYLCRkrdJSRDhQ7jIlI7QtW/u/XgieK 5IxFW61rwKQrGd/HV+SA7d2o+h/OA81jZvu9ingdUwDsF2IJy1L6pj5jY2cb8xjM7NsS wdnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=1wj6adjOj65SjjUkVArgdhpuR/QhNLB5f1UXVBirv5s=; b=OPEYnHgJSrOKfa1agPXhC/nil8XNkXS9WeyG1BCN11Niw0ASRbmyj2MpIxg9Agijny aakCZW8v6Dp8L5eL987Cljk0Y2AoYuR7JTUip/bLspiar2JQUnj2VFKinDv0mVQ6JU5N W5Ki6fghJd1c9nnvlxUVsyR88EBEzXgtRAs4Z5PnNPbLd9Qrz5JNVIzkBjVGlUDva79c 8cI0/Yk6/yudd9ZzyVHrXIXJCQWYUQ5xO1naRFE0VXwfUnGoPjujx6wgtzna14uCYJfM OVViMFhNIDmlDBJftS7EqfgahEbOuBMu4iVXyFdZifB72UuGK3Mw9iGYfATf5wRErqV8 T9Ng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k26si5199581eds.443.2020.09.04.11.07.29; Fri, 04 Sep 2020 11:07:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726426AbgIDSGY (ORCPT + 99 others); Fri, 4 Sep 2020 14:06:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbgIDSGY (ORCPT ); Fri, 4 Sep 2020 14:06:24 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2578AC061244; Fri, 4 Sep 2020 11:06:24 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEG6L-00ATnC-Uh; Fri, 04 Sep 2020 18:06:18 +0000 Date: Fri, 4 Sep 2020 19:06:17 +0100 From: Al Viro To: Christoph Hellwig Cc: Paul Walmsley , Palmer Dabbelt , Arnd Bergmann , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH 3/8] asm-generic: fix unaligned access hamdling in raw_copy_{from,to}_user Message-ID: <20200904180617.GQ1236603@ZenIV.linux.org.uk> References: <20200904165216.1799796-1-hch@lst.de> <20200904165216.1799796-4-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200904165216.1799796-4-hch@lst.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 04, 2020 at 06:52:11PM +0200, Christoph Hellwig wrote: > Use get_unaligned and put_unaligned for the small constant size cases > in the generic uaccess routines. This ensures they can be used for > architectures that do not support unaligned loads and stores, while > being a no-op for those that do. Frankly, I would rather get rid of those constant-sized cases entirely; sure, we'd need to adjust asm-generic/uaccess.h defaults for __get_user(), but there that kind of stuff would make sense; in raw_copy_from_user() it really doesn't.