On 2023/12/05 0:04, Alexander Gordeev wrote:
+static bool is_read_proc_kcore(void)
+{
+ struct stat kcore_stat, fd_stat;
+ int fd;
+ int rc;
+
+ rc = stat("/proc/kcore", &kcore_stat);
+ if (rc)
+ return false;
+
+ fd = REMOTE_MEMSRC() ? pc->sockfd : (ACTIVE() ? pc->mfd : pc->dfd);
+ rc = fstat(fd, &fd_stat);
+ if (rc)
+ return false;
+
+ return (fd_stat.st_ino == kcore_stat.st_ino) &&
+ (fd_stat.st_dev == kcore_stat.st_dev);
+}
+
+static bool s390x_init_vm(void)
+{
+ struct vm_info vm_info;
+
+ if (is_read_proc_kcore()) {
Just to clarify, does this mean that "pc->flags & PROC_KCORE" cannot be
used here?
Thanks,
Kazu