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=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 52CE3C433ED for ; Mon, 17 May 2021 06:19:12 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1D1DD6121F for ; Mon, 17 May 2021 06:19:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D1DD6121F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dhqKLT8u5fR7oDRC/EPIk01nNx01vhFvy5tfGXsdgwI=; b=kLhBYoR+PSCUWZql2TkZgtlgy dVb3H9AjPvjmR4Y0c/8+Cx25wzkFPvTCAAEwWszt3zT34AnBFq8MEFu8I4b/QMiX/EqsoPSrkhGRQ ZHgB4J7RNu4E3Gp8YBa77dZw5tOISZaqHocpQEOr0lGNYZ+1mb10YaaL8CMoqTqsoMhXzrbmVMNw8 Iu//+1Ar2XU4+RJw8T0MnR88RCmxCGfX1wMoqGv12uTR6UwoWHj3H6qCg5uLoZyREWKog3v21VNQq qiZUmbm/MYgncIqi7SzQRZTIQNerGl5uwKvgvIuZHxVAeiZFxu9LYJsRbgFL1+dEJ9qhY+FVTLFrW MVXdpXkyg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liWZv-00DqV8-7Y; Mon, 17 May 2021 06:18:11 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liWYa-00DqLW-Up; Mon, 17 May 2021 06:16:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=dXg2FSOjoO0+r986FnHHsj9nMRxMBnZb7jO3kfUaz8s=; b=rDzyjwUQwb952II8EiAAksjv8F ME0B7HE1NsaKi75/FQP0Ysymg8UNyqhF+NZgzzc1+7w3lDeW6PRT58oq1nyBjNFfHCFtefn0IbgEd Wy8DIZJRvWpgwcWWEw0zJrXzCG8jWbO1Jv7mkh209S5BeiwbeTXhbhp+hGIr1lFrPVTGdDIU2AQjA W088xJv6q00LzLCEM3VfoCyd7m5agyZB35+3ZfFzuhdx9Aiiu2eXZ9CBAInWRo6oharWEniaV5IXz FJI8wFok+oGS+CtbZCPpam6OX3vELm2TW1nu5WBtHHmZAC/NFCSzvIHtRUMh5M8/ikARSblZk0Eu3 ajUw+IVQ==; Received: from verein.lst.de ([213.95.11.211]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liWYX-00DVHb-W8; Mon, 17 May 2021 06:16:47 +0000 Received: by verein.lst.de (Postfix, from userid 2407) id E9B8E6736F; Mon, 17 May 2021 08:16:35 +0200 (CEST) Date: Mon, 17 May 2021 08:16:35 +0200 From: Christoph Hellwig To: Arnd Bergmann Cc: linux-arch@vger.kernel.org, Arnd Bergmann , Christoph Hellwig , Al Viro , Vineet Gupta , Yoshinori Sato , Brian Cain , Geert Uytterhoeven , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jeff Dike , Richard Weinberger , Anton Ivanov , Sid Manning , Andrew Morton , Mike Rapoport , linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, linux-hexagon@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-riscv@lists.infradead.org, linux-um@lists.infradead.org Subject: Re: [PATCH 3/6] [v2] hexagon: use generic strncpy/strnlen from_user Message-ID: <20210517061635.GA23581@lst.de> References: <20210515101803.924427-1-arnd@kernel.org> <20210515101803.924427-4-arnd@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210515101803.924427-4-arnd@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210516_231646_200680_E3F998CF X-CRM114-Status: GOOD ( 13.55 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Sat, May 15, 2021 at 12:18:00PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > Most per-architecture versions of these functions are broken in some form, > and they are almost certainly slower than the generic code as well. > > Remove the ones for hexagon and instead use the generic version. > This custom version reads the data twice for strncpy() by doing an extra > strnlen(), and it apparently lacks a check for user_addr_max(). I'd be tempted to just remove the first paragraph and reword the second as: Remove the hexagon implementation of strncpy/strnlen and instead use the generic versions. The hexago version of strncpy reads the data twice by doing an extra strnlen(), and it apparently lacks a check for user_addr_max(). _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv