From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 079BCC54F4E for ; Fri, 4 Sep 2020 18:10:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC8F22544D for ; Fri, 4 Sep 2020 18:06:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726530AbgIDSGY (ORCPT ); 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.