All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Johannes Berg <johannes.berg@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [uml:next 29/44] arch/um/os-Linux/main.c:117:12: error: use of undeclared identifier 'PATH_MAX'
Date: Thu, 24 Oct 2024 05:14:45 +0800	[thread overview]
Message-ID: <202410240553.gYNIXN8i-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/uml/linux next
head:   3f17fed2149192c7d3b76a45a6a87b4ff22cd586
commit: 031acdcfb566ba18ffb57d51abf357a5e350424b [29/44] um: restore process name
config: um-allnoconfig (https://download.01.org/0day-ci/archive/20241024/202410240553.gYNIXN8i-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241024/202410240553.gYNIXN8i-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410240553.gYNIXN8i-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/um/os-Linux/main.c:117:12: error: use of undeclared identifier 'PATH_MAX'
     117 |                 char buf[PATH_MAX] = {};
         |                          ^
   1 error generated.


vim +/PATH_MAX +117 arch/um/os-Linux/main.c

   107	
   108	int __init main(int argc, char **argv, char **envp)
   109	{
   110		char **new_argv;
   111		int ret, i, err;
   112	
   113		/* Disable randomization and re-exec if it was changed successfully */
   114		ret = personality(PER_LINUX | ADDR_NO_RANDOMIZE);
   115		if (ret >= 0 && (ret & (PER_LINUX | ADDR_NO_RANDOMIZE)) !=
   116				 (PER_LINUX | ADDR_NO_RANDOMIZE)) {
 > 117			char buf[PATH_MAX] = {};
   118			ssize_t ret;
   119	
   120			ret = readlink("/proc/self/exe", buf, sizeof(buf));
   121			if (ret < 0 || ret >= sizeof(buf)) {
   122				perror("readlink failure");
   123				exit(1);
   124			}
   125			execve(buf, argv, envp);
   126		}
   127	
   128		set_stklim();
   129	
   130		setup_env_path();
   131	
   132		setsid();
   133	
   134		new_argv = malloc((argc + 1) * sizeof(char *));
   135		if (new_argv == NULL) {
   136			perror("Mallocing argv");
   137			exit(1);
   138		}
   139		for (i = 0; i < argc; i++) {
   140			new_argv[i] = strdup(argv[i]);
   141			if (new_argv[i] == NULL) {
   142				perror("Mallocing an arg");
   143				exit(1);
   144			}
   145		}
   146		new_argv[argc] = NULL;
   147	
   148		/*
   149		 * Allow these signals to bring down a UML if all other
   150		 * methods of control fail.
   151		 */
   152		install_fatal_handler(SIGINT);
   153		install_fatal_handler(SIGTERM);
   154	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-10-23 21:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202410240553.gYNIXN8i-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.