Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp804098pxp; Fri, 11 Mar 2022 15:35:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJycfYF1YvsLZ0drkdMvNIawVjx/UJQPLY3x7p7DHWdFezwwGB8P694YTEcl5ts8RMBfLkpp X-Received: by 2002:a63:185c:0:b0:381:10:2843 with SMTP id 28-20020a63185c000000b0038100102843mr6344335pgy.433.1647041741286; Fri, 11 Mar 2022 15:35:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647041741; cv=none; d=google.com; s=arc-20160816; b=vAvMbgRdK7eZmZ0zsBdhWZqvoD5HAacPWB/gGOPItQweWrgrf0GVqub0HPenegqiym KnLv/3eBSJwKycPD/a9D7E3nEz5q/QEQlrFNDMP4d1zfIuQJpbWMZkXWNWLjuhdB7SGY tPPU/6V75DjFFogO0pFvED99aQme611hmW1Q2WTSL00ho6PaXJsMkyzNnqs0HSqL/+Rd 88Z5gU3OwYlEX1OkMyHBTlhEsjCFPWfkylVQCx+xytRC1QgodGJ/Ada0D8u2TAcjBmjT 0Ke1vLNg8PPRNd78reJnD2pYZZrc9tmqJCGFKxAwiRoKdgw6aCfG1wAElyohdQxVUYRw /tyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=SRoXsNIaSkUzqvUA048GL6Rto/NOevz1ouIc/mVrK70=; b=lauyMiceOwqdp+lvwHu6KJgp+uwWDAWyKaTQ2EZsYkVcQ1+LOWjkN2378LF9ns2PPM N611CNH488AGDLxR1MILZxzwr3GTdf1VFhSa0kuO4/2IiDcrCD3Q+otknlsUjq1ipgju sdKBVnbxFGoI+DZeqsY/mKcTkB00YTQ10WqTzx/7dgUcOrHwp0VWMEFcFO3PRV14rDqo fZcUFTv1BrQv8dtTL4tjWDTyLbVYQt2tRsR35RvPXe54iXmREpJrNRgNL14rztnhbHqq f9FIkn1a5Hv0EmCydwxSIUUnKqKitGAI7gn/3TlwEn0yO/BeeK441AObX4Fzc5F/WtgQ 03cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=T+BedQfj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 18-20020a631252000000b003743ee6c635si8746113pgs.543.2022.03.11.15.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 15:35:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=T+BedQfj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C024828CF9A; Fri, 11 Mar 2022 14:46:13 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229654AbiCKWrH (ORCPT + 99 others); Fri, 11 Mar 2022 17:47:07 -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 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.