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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15E52C433F5 for ; Fri, 11 Mar 2022 22:46:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229778AbiCKWrI (ORCPT ); Fri, 11 Mar 2022 17:47:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229641AbiCKWqq (ORCPT ); Fri, 11 Mar 2022 17:46:46 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63D4B2DBB8E for ; Fri, 11 Mar 2022 14:37:04 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 46AEF61FC4 for ; Fri, 11 Mar 2022 21:42:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36602C340E9; Fri, 11 Mar 2022 21:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1647034924; bh=qYfEAZ0lsjy7MH3vIWERStb/38N/rSLHEbynoNRnN90=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=T+BedQfjTitAebQLVHdLEuxFWCeDg456J/YOKYAJy+r4JfiUXNrHLcQk752BoqJYr Ddl2hrxWOVGOcpNSI/HgRRJ9SnGOWnOUk9jkQ72RImApbuMJTyVKkF86gP38daa+rb TopL/+yqxfB5oTV48rzyF69ybCQi0rkhWT33VSYY= Date: Fri, 11 Mar 2022 13:42:03 -0800 From: Andrew Morton To: Charan Teja Kalla Cc: , , , , , , , , , Subject: Re: [PATCH V2,0/2]mm: madvise: return correct bytes processed with process_madvise Message-Id: <20220311134203.47cbeab087b731bada12d0f1@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 11 Mar 2022 20:59:04 +0530 Charan Teja Kalla wrote: > With the process_madvise(), always choose to return non zero processed > bytes over an error. This can help the user to know on which VMA, passed > in the 'struct iovec' vector list, is failed to advise thus can take the > decission of retrying/skipping on that VMA. Thanks, this is not good. We should have added userspace tests for process_madvise() along with the syscall itself. But evidently that was omitted. If someone decides to contribute such tests, hopefully they will include checks for these return values.