init/Kconfig: make CHECKPOINT_RESTORE select PROC_PAGE_MONITOR

Submitted by Mike Rapoport on Feb. 27, 2018, 6:55 a.m.

Details

Message ID 1519714504-28894-1-git-send-email-rppt@linux.vnet.ibm.com
State New
Series "init/Kconfig: make CHECKPOINT_RESTORE select PROC_PAGE_MONITOR"
Headers show

Commit Message

Mike Rapoport Feb. 27, 2018, 6:55 a.m.
Checkpointing a process requires knowledge about the process memory layout
which is obtained from /proc/<pid>/smaps, /proc/<pid>/pagemap etc.
Make sure these interfaces are available only when
CONFIG_CHECKPOINT_RESTORE=y

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
---
 init/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/init/Kconfig b/init/Kconfig
index e37f4b2a6445..63c1fd5bc360 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1328,6 +1328,7 @@  config MEMBARRIER
 config CHECKPOINT_RESTORE
 	bool "Checkpoint/restore support" if EXPERT
 	select PROC_CHILDREN
+	select PROC_PAGE_MONITOR
 	default n
 	help
 	  Enables additional kernel features in a sake of checkpoint/restore.

Comments

kbuild test robot Feb. 28, 2018, 6:30 a.m.
Hi Mike,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc3 next-20180227]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Mike-Rapoport/init-Kconfig-make-CHECKPOINT_RESTORE-select-PROC_PAGE_MONITOR/20180228-112508
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sh 

All error/warnings (new ones prefixed by >>):

warning: (CHECKPOINT_RESTORE && HWPOISON_INJECT && MEM_SOFT_DIRTY) selects PROC_PAGE_MONITOR which has unmet direct dependencies (PROC_FS && MMU)
   fs/proc/page.c: In function 'stable_page_flags':
>> fs/proc/page.c:182:36: error: 'PG_mlocked' undeclared (first use in this function); did you mean 'PG_locked'?
     u |= kpf_copy_bit(k, KPF_MLOCKED, PG_mlocked);
                                       ^~~~~~~~~~
                                       PG_locked
   fs/proc/page.c:182:36: note: each undeclared identifier is reported only once for each function it appears in

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation