lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b478e564-fa10-79de-f9df-5b55b211e85d@suse.cz>
Date:   Wed, 10 May 2017 15:09:37 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     SeongJae Park <sj38.park@...il.com>, akpm@...ux-foundation.org,
        kirill.shutemov@...ux.intel.com
Cc:     hannes@...xchg.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/khugepaged: Add missed tracepoint for
 collapse_huge_page_swapin

On 05/07/2017 12:18 PM, SeongJae Park wrote:
> One return case of `__collapse_huge_page_swapin()` does not invoke
> tracepoint while every other return case does.  This commit adds a
> tracepoint invocation for the case.
> 
> Signed-off-by: SeongJae Park <sj38.park@...il.com>

Right. But extra points by turning all of the "trace+return false"
instances into some kind of "goto out".

> ---
>  mm/khugepaged.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index ba40b7f673f4..9aad377c67a8 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -909,8 +909,10 @@ static bool __collapse_huge_page_swapin(struct mm_struct *mm,
>  				return false;
>  			}
>  			/* check if the pmd is still valid */
> -			if (mm_find_pmd(mm, address) != pmd)
> +			if (mm_find_pmd(mm, address) != pmd) {
> +				trace_mm_collapse_huge_page_swapin(mm, swapped_in, referenced, 0);
>  				return false;
> +			}
>  		}
>  		if (ret & VM_FAULT_ERROR) {
>  			trace_mm_collapse_huge_page_swapin(mm, swapped_in, referenced, 0);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ