From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from erelay6.ox.registrar-servers.com ([192.64.117.97]:38709 "EHLO erelay6.ox.registrar-servers.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755085AbcB1XjS (ORCPT ); Sun, 28 Feb 2016 18:39:18 -0500 Date: Sun, 28 Feb 2016 15:39:08 -0800 From: Amber Thrall To: Al Viro Cc: linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 1/1] fs: strncmp() for user space buffers Message-ID: <20160228233908.GA1982@ARCH> References: <1456699822-2924-1-git-send-email-amber@thrall.me> <20160228230303.GQ17997@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160228230303.GQ17997@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 02/28, Al Viro wrote: > On Sun, Feb 28, 2016 at 02:50:22PM -0800, Amber Thrall wrote: > > The simple_strncmp_to_buffer() function provides an easier method for > > developers to compare a kernel space buffer against user space data. This > > process is done in a few drivers and may be simplified to a single function. > > *blink* > > The name is rather confusing and I would say that semantics is unexpected > as well. I would like to see proposed users of that primitive... Apologies for the confusing name, struggled to find an appropriate name while staying consistent with the naming schemes of simple_read/write_to_buffer() functions, as it based off of them. I'd love to hear alternative names. I saw possible uses for this proposed function being an easy way to interact with debugfs, via their write file operation. For example in the function xenvif_write_io_ring() the string "kick" is checked for against a user space buffer. Thanks for the fast reply.