Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp517812pxv; Thu, 22 Jul 2021 06:02:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwT3clULo9h9TS7j5ldwURzuHjU7i8OPn36pOVOVIKUw1FUJs+Ye7wMIL6Ku/xcxFycEqgt X-Received: by 2002:a05:6402:424e:: with SMTP id g14mr37245775edb.364.1626958946773; Thu, 22 Jul 2021 06:02:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626958946; cv=none; d=google.com; s=arc-20160816; b=o49rOFrE6nUcWQFWFmo1yMmRyI8RB/H81epmFSmPvyvstUe/NgDpkQvtxKrFGEbE4v JAzw6+ygg3kWtLYlS7EAKEWTwtRdhIypo0okAG9tVB2+9N70eeL+QST/YveIn9c3KxJa Lea7hM68cNRGRh5K/Xv4gCP/V1mIOx9IcXLp+WHXxPwe25BF9E4EI3Kg166j6QuhE4OE Y38QN8ozGyUjHMqOy+nNXbEAXugbskDmRjMvabNwB0TwjOxnpTigUifyFLgAuIR+bKM5 /yddgRPmv4xNYSLGnxsn3QqRhhQC7w6iAe5tKgfWKnWkfgOZ9j6wd2EgvFVksX4SGovn 0Ycw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=QPnsEv7GwPCSWVmN4zg1vwMMdtVy3+IFHkXaDeCcuTc=; b=bVmbTz3LNMEx6xuhKIJ/N5kdMas1gXK4EnIkHuOj8aanAL8RUQNcJryBAi/AqpZ4A1 2MbpXnKn7tmoklMq4ATHdHQKxuB86dZjTnmEYjR6nduluVla3VLTBURPRg1Bhhw0VAzW E8ujesChoHhHe17cnZjdQoHx1oj5PKQhhSA2pxyZDdTzyMXpAgqXFbzCeq4ryDuGaxs7 jn9u0470Ew4SHnWZhoy0gn2FW/mzyXnCI5NFbP7bP34D+rpLTKJnaXNaZcRtGissWi4N WQ+ZLuho+u8vavYw5lI+KqCrDWzl2J510M+A3/h6H8+HkP8mE0vYVy1CH9pK20QIvmI2 S+eA== 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 p13si3518143eja.744.2021.07.22.06.02.03; Thu, 22 Jul 2021 06:02:26 -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 S231381AbhGVMTv (ORCPT + 99 others); Thu, 22 Jul 2021 08:19:51 -0400 Received: from verein.lst.de ([213.95.11.211]:34032 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231840AbhGVMTu (ORCPT ); Thu, 22 Jul 2021 08:19:50 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 7EA5168B05; Thu, 22 Jul 2021 15:00:22 +0200 (CEST) Date: Thu, 22 Jul 2021 15:00:22 +0200 From: Christoph Hellwig To: Arnd Bergmann Cc: linux-arch@vger.kernel.org, Arnd Bergmann , "James E.J. Bottomley" , Al Viro , Anton Ivanov , Brian Cain , Chris Zankel , Christian Borntraeger , Christoph Hellwig , Guo Ren , Heiko Carstens , Helge Deller , Jeff Dike , Linus Walleij , Max Filippov , Michal Simek , Richard Weinberger , Thomas Bogendoerfer , Vasily Gorbik , Vineet Gupta , Yoshinori Sato , linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linux-s390@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, uclinux-h8-devel@lists.sourceforge.jp Subject: Re: [PATCH v3 3/9] hexagon: use generic strncpy/strnlen from_user Message-ID: <20210722130022.GC26225@lst.de> References: <20210722124814.778059-1-arnd@kernel.org> <20210722124814.778059-4-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210722124814.778059-4-arnd@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 22, 2021 at 02:48:08PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > Remove the hexagon implementation of strncpy/strnlen and instead use > the generic version. The hexagon version reads the data twice for > strncpy() by doing an extra strnlen(), and it apparently lacks a check > for user_addr_max(). > > Signed-off-by: Arnd Bergmann Looks good, Reviewed-by: Christoph Hellwig