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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 125C1C433F5 for ; Fri, 1 Oct 2021 21:52:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7E6A761247 for ; Fri, 1 Oct 2021 21:52:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7E6A761247 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 02C2794014E; Fri, 1 Oct 2021 17:52:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F1CF5940121; Fri, 1 Oct 2021 17:52:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E0B4D94014E; Fri, 1 Oct 2021 17:52:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0100.hostedemail.com [216.40.44.100]) by kanga.kvack.org (Postfix) with ESMTP id D1950940121 for ; Fri, 1 Oct 2021 17:52:48 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 8FC123A8D7 for ; Fri, 1 Oct 2021 21:52:48 +0000 (UTC) X-FDA: 78649218816.05.D13D547 Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) by imf29.hostedemail.com (Postfix) with ESMTP id 4E9F79002582 for ; Fri, 1 Oct 2021 21:52:48 +0000 (UTC) Received: by mail-yb1-f182.google.com with SMTP id z5so23472925ybj.2 for ; Fri, 01 Oct 2021 14:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fUylDIFdqokzCQr3QgCrf8/eFiZ45GiE2mI3tefbDeQ=; b=ZJbXVtrVx1+vhc7mBd0qN5Xd5q6LK7Vcw2ejOLJuYeHZkg8Uf9NmaiFk+kSOmregLl RwXVFN1UPzojCkQ+NsGn1pVsapfHU7z+CMAOyJIHR4CCIyjaF4Sr6gNmRdkQzHDZrF3i kOaecF61AgI5DpOMWZAHeE/AaoI9OaXWFL/VO9+KYou19aiJEVqMpDeMPTFTQVXzLDQX xlfww7Rwzxks7/bY/YarJsTKJj2/q+d5Iyldlvh9nGLz2nYsKlGwPIy3PZMlF39Okvf3 z1KWTlj5yLIiAdz65eijOShGudzElUmtq8pVVyp2gE/VweYdutDf2cL5YIost+wyVtn0 mQ2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fUylDIFdqokzCQr3QgCrf8/eFiZ45GiE2mI3tefbDeQ=; b=fAkNfdbmqwD4I7oy+pLaccG7t2Y+P816HI3v8q9DHcSSy0wIhMuEeRwHu6D0VJZZ96 OgajzLkiA5+rh36jSkzHwCXhlMHhW31X7Y+xS3jwo2DqsxSsaMN9NqqEICuAWTBhPAuS sIB1gKjk5LON5AsFJ0eI7GwSoR/TcfxhTIeOBk6Zi+FWrBR3uKz9ThDESfcIGmSwXow1 BLGFOgoV3oPeJFCXweNmsn+TVm5898Fwm8SIZuSq5RLXj9J1ifdO8n54625qAnJCXRcg pdJofE/egyWkHgNJrOAyqVRjbKyb9RU6PGODcpXAUQDSvwRAr7wF74ouXXjKkWFJH3Ho 8XVA== X-Gm-Message-State: AOAM530fef9D5VTt1/lMUspNBYhZthXow+Ll1xz48aLGpLw6JQ7ypf/f y0ThaFViXuATyXSdzJNe4wbzKQ4cSbExQpFRlw/aJQ== X-Google-Smtp-Source: ABdhPJyohC349WYU3R2zBwR9Bnq2k+HBcT3yiniMni8C00NhTk/xBO89G0OaBzslokDNt81Qp6UdKI2GORSUNo/tMIo= X-Received: by 2002:a25:7307:: with SMTP id o7mr194738ybc.291.1633125167093; Fri, 01 Oct 2021 14:52:47 -0700 (PDT) MIME-Version: 1.0 References: <20211001174947.135123-1-eric.dumazet@gmail.com> <202110020437.tn6NOlcO-lkp@intel.com> In-Reply-To: <202110020437.tn6NOlcO-lkp@intel.com> From: Eric Dumazet Date: Fri, 1 Oct 2021 14:52:35 -0700 Message-ID: Subject: Re: [PATCH] mm/mempolicy: do not allow illegal MPOL_F_NUMA_BALANCING | MPOL_LOCAL in mbind() To: kernel test robot Cc: Eric Dumazet , Andrew Morton , kbuild-all@lists.01.org, Linux Memory Management List , linux-kernel , syzbot , "Huang, Ying" , Mel Gorman Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 4E9F79002582 X-Stat-Signature: akxxjmxecykq19pztbusj8ba7foxrswj Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=ZJbXVtrV; spf=pass (imf29.hostedemail.com: domain of edumazet@google.com designates 209.85.219.182 as permitted sender) smtp.mailfrom=edumazet@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1633125168-102320 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 Fri, Oct 1, 2021 at 1:25 PM kernel test robot wrote: > > Hi Eric, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on hnaz-mm/master] > > url: https://github.com/0day-ci/linux/commits/Eric-Dumazet/mm-mempolicy-do-not-allow-illegal-MPOL_F_NUMA_BALANCING-MPOL_LOCAL-in-mbind/20211002-015054 > base: https://github.com/hnaz/linux-mm master > config: ia64-defconfig (attached as .config) > compiler: ia64-linux-gcc (GCC) 11.2.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://github.com/0day-ci/linux/commit/fe87354835a4bf5cad6d885f0ba558c767fee6f1 > git remote add linux-review https://github.com/0day-ci/linux > git fetch --no-tags linux-review Eric-Dumazet/mm-mempolicy-do-not-allow-illegal-MPOL_F_NUMA_BALANCING-MPOL_LOCAL-in-mbind/20211002-015054 > git checkout fe87354835a4bf5cad6d885f0ba558c767fee6f1 > # save the attached .config to linux build tree > mkdir build_dir > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > All warnings (new ones prefixed by >>): > > mm/mempolicy.c: In function 'sanitize_mpol_flags': > >> mm/mempolicy.c:1452:26: warning: comparison between pointer and integer > 1452 | if (mode != MPOL_BIND) > | ^~ Oh well, last minute changes, and indeed my compiler warned me while I was away :/ mm/mempolicy.c:1452:12: warning: comparison between pointer and integer ('int *' and 'int') [-Wpointer-integer-compare] if (mode != MPOL_BIND) ~~~~ ^ ~~~~~~~~~ I am sending a v2, thanks. > > > vim +1452 mm/mempolicy.c > > 1440 > 1441 /* Basic parameter sanity check used by both mbind() and set_mempolicy() */ > 1442 static inline int sanitize_mpol_flags(int *mode, unsigned short *flags) > 1443 { > 1444 *flags = *mode & MPOL_MODE_FLAGS; > 1445 *mode &= ~MPOL_MODE_FLAGS; > 1446 > 1447 if ((unsigned int)(*mode) >= MPOL_MAX) > 1448 return -EINVAL; > 1449 if ((*flags & MPOL_F_STATIC_NODES) && (*flags & MPOL_F_RELATIVE_NODES)) > 1450 return -EINVAL; > 1451 if (*flags & MPOL_F_NUMA_BALANCING) { > > 1452 if (mode != MPOL_BIND) > 1453 return -EINVAL; > 1454 *flags |= (MPOL_F_MOF | MPOL_F_MORON); > 1455 } > 1456 return 0; > 1457 } > 1458 > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org