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] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 12 Nov 2022 06:06:22 +0800
From:   kernel test robot <lkp@...el.com>
To:     Peter Xu <peterx@...hat.com>, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org
Cc:     oe-kbuild-all@...ts.linux.dev, peterx@...hat.com,
        Andrea Arcangeli <aarcange@...hat.com>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Ives van Hoorne <ives@...esandbox.io>,
        Nadav Amit <nadav.amit@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>,
        Mike Rapoport <rppt@...ux.vnet.ibm.com>
Subject: Re: [PATCH v2 2/2] mm/uffd: Sanity check write bit for uffd-wp
 protected ptes

Hi Peter,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on akpm-mm/mm-everything]

url:    https://github.com/intel-lab-lkp/linux/commits/Peter-Xu/mm-migrate-Fix-writable-pte-for-read-migration-entry/20221111-043302
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20221110203132.1498183-3-peterx%40redhat.com
patch subject: [PATCH v2 2/2] mm/uffd: Sanity check write bit for uffd-wp protected ptes
config: x86_64-randconfig-a015
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/b103eae2926a263a15e262611524ca9efa8b969e
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Peter-Xu/mm-migrate-Fix-writable-pte-for-read-migration-entry/20221111-043302
        git checkout b103eae2926a263a15e262611524ca9efa8b969e
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/pgtable.h:6,
                    from mm/hugetlb_vmemmap.c:13:
   arch/x86/include/asm/pgtable.h: In function 'pte_uffd_wp':
>> arch/x86/include/asm/pgtable.h:306:9: error: implicit declaration of function 'VM_WARN_ON_ONCE'; did you mean 'WARN_ON_ONCE'? [-Werror=implicit-function-declaration]
     306 |         VM_WARN_ON_ONCE(wp && pte_write(pte));
         |         ^~~~~~~~~~~~~~~
         |         WARN_ON_ONCE
   cc1: some warnings being treated as errors


vim +306 arch/x86/include/asm/pgtable.h

   290	
   291	#ifdef CONFIG_HAVE_ARCH_USERFAULTFD_WP
   292	static inline int pte_uffd_wp(pte_t pte)
   293	{
   294		bool wp = pte_flags(pte) & _PAGE_UFFD_WP;
   295	
   296		/*
   297		 * Having write bit for wr-protect-marked present ptes is fatal,
   298		 * because it means the uffd-wp bit will be ignored and write will
   299		 * just go through.
   300		 *
   301		 * Use any chance of pgtable walking to verify this (e.g., when
   302		 * page swapped out or being migrated for all purposes). It means
   303		 * something is already wrong.  Tell the admin even before the
   304		 * process crashes. We also nail it with wrong pgtable setup.
   305		 */
 > 306		VM_WARN_ON_ONCE(wp && pte_write(pte));
   307	
   308		return wp;
   309	}
   310	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (136093 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ