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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B588C4332D for ; Wed, 18 Mar 2020 22:49:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 364A820752 for ; Wed, 18 Mar 2020 22:49:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 364A820752 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=SDF.ORG Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BBF5F6B00B0; Wed, 18 Mar 2020 18:49:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B70416B00B1; Wed, 18 Mar 2020 18:49:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A5F8F6B00B2; Wed, 18 Mar 2020 18:49:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0046.hostedemail.com [216.40.44.46]) by kanga.kvack.org (Postfix) with ESMTP id 88CB06B00B0 for ; Wed, 18 Mar 2020 18:49:43 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 4CDF08248047 for ; Wed, 18 Mar 2020 22:49:43 +0000 (UTC) X-FDA: 76609976646.11.soup04_71ef36a8f4438 X-HE-Tag: soup04_71ef36a8f4438 X-Filterd-Recvd-Size: 2105 Received: from mx.sdf.org (mx.sdf.org [205.166.94.20]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Wed, 18 Mar 2020 22:49:42 +0000 (UTC) Received: from sdf.org (IDENT:lkml@otaku.sdf.org [205.166.94.8]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 02IMnPvT019685 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Wed, 18 Mar 2020 22:49:25 GMT Received: (from lkml@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 02IMnOIU017909; Wed, 18 Mar 2020 22:49:24 GMT Date: Wed, 18 Mar 2020 22:49:24 +0000 From: George Spelvin To: Alexander Duyck Cc: Kees Cook , Dan Williams , linux-mm , Andrew Morton , Randy Dunlap , lkml@sdf.org Subject: Re: [PATCH v3] mm/shuffle.c: Fix races in add_to_free_area_random() Message-ID: <20200318224924.GC16083@SDF.ORG> References: <20200317135035.GA19442@SDF.ORG> <202003171435.41F7F0DF9@keescook> <20200317230612.GB19442@SDF.ORG> <202003171619.23210A7E0@keescook> <20200318014410.GA2281@SDF.ORG> <20200318203914.GA16083@SDF.ORG> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Mar 18, 2020 at 02:34:04PM -0700, Alexander Duyck wrote: > What kernel is this based on? You might want to rebase on the latest > linux-next as it occurs to me that this function was renamed to > shuffle_pick_tail as I had incorporated a few bits of it into the > logic for placing buddy pages and reported pages on the tail of the > list. 5.5.8. I didn't realize it made much difference, but I see it does. Due to the different return type, the best variant has probably changed and I'll have to re-check. Since there's only one call site, should the function be moved to page_alloc.c and inlined?