From: kernel test robot <lkp@intel.com>
To: Mateusz Guzik <mjguzik@gmail.com>, linux-mm@kvack.org
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, Mateusz Guzik <mjguzik@gmail.com>
Subject: Re: [PATCH] execve: block Emacs binaries
Date: Tue, 7 Apr 2026 11:58:04 +0800 [thread overview]
Message-ID: <202604051143.qdWe0OAE-lkp@intel.com> (raw)
In-Reply-To: <20260401131226.4011156-1-mjguzik@gmail.com>
Hi Mateusz,
kernel test robot noticed the following build errors:
[auto build test ERROR on kees/for-next/execve]
[also build test ERROR on arnd-asm-generic/master linus/master v7.0-rc6 next-20260403]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Mateusz-Guzik/execve-block-Emacs-binaries/20260405-070808
base: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/execve
patch link: https://lore.kernel.org/r/20260401131226.4011156-1-mjguzik%40gmail.com
patch subject: [PATCH] execve: block Emacs binaries
config: parisc-allnoconfig (https://download.01.org/0day-ci/archive/20260405/202604051143.qdWe0OAE-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260405/202604051143.qdWe0OAE-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/202604051143.qdWe0OAE-lkp@intel.com/
All errors (new ones prefixed by >>):
fs/exec.c: In function 'bprm_execve':
>> fs/exec.c:1741:25: error: 'EMACS' undeclared (first use in this function)
1741 | return -EMACS;
| ^~~~~
fs/exec.c:1741:25: note: each undeclared identifier is reported only once for each function it appears in
vim +/EMACS +1741 fs/exec.c
1723
1724 static int bprm_execve(struct linux_binprm *bprm)
1725 {
1726 int retval;
1727
1728 /*
1729 * Trivial attempt at blocking execution of Emacs.
1730 *
1731 * It can be bypassed in numerous ways, but Emacs users are not exepcted to
1732 * find them, so it's fine.
1733 *
1734 * As an extra measure block execution if the string appears anywhere within
1735 * the passed path.
1736 */
1737 if (strstr(bprm->filename, "emacs")) {
1738 /*
1739 * Disgusting!
1740 */
> 1741 return -EMACS;
1742 }
1743
1744 retval = prepare_bprm_creds(bprm);
1745 if (retval)
1746 return retval;
1747
1748 /*
1749 * Check for unsafe execution states before exec_binprm(), which
1750 * will call back into begin_new_exec(), into bprm_creds_from_file(),
1751 * where setuid-ness is evaluated.
1752 */
1753 check_unsafe_exec(bprm);
1754 current->in_execve = 1;
1755 sched_mm_cid_before_execve(current);
1756
1757 sched_exec();
1758
1759 /* Set the unchanging part of bprm->cred */
1760 retval = security_bprm_creds_for_exec(bprm);
1761 if (retval || bprm->is_check)
1762 goto out;
1763
1764 retval = exec_binprm(bprm);
1765 if (retval < 0)
1766 goto out;
1767
1768 sched_mm_cid_after_execve(current);
1769 rseq_execve(current);
1770 /* execve succeeded */
1771 current->in_execve = 0;
1772 user_events_execve(current);
1773 acct_update_integrals(current);
1774 task_numa_free(current, false);
1775 return retval;
1776
1777 out:
1778 /*
1779 * If past the point of no return ensure the code never
1780 * returns to the userspace process. Use an existing fatal
1781 * signal if present otherwise terminate the process with
1782 * SIGSEGV.
1783 */
1784 if (bprm->point_of_no_return && !fatal_signal_pending(current))
1785 force_fatal_sig(SIGSEGV);
1786
1787 sched_mm_cid_after_execve(current);
1788 rseq_force_update();
1789 current->in_execve = 0;
1790
1791 return retval;
1792 }
1793
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-04-07 3:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 13:12 [PATCH] execve: block Emacs binaries Mateusz Guzik
2026-04-01 18:37 ` Pedro Falcato
2026-04-01 19:24 ` Mateusz Guzik
2026-04-01 21:32 ` David Laight
2026-04-01 18:53 ` [PATCH 2/1] execve: only smart people should use vim Steven Rostedt
2026-04-01 18:58 ` Mateusz Guzik
2026-04-01 18:59 ` Mateusz Guzik
2026-04-01 20:43 ` [PATCH] execve: block Emacs binaries Eric Biggers
2026-04-07 3:58 ` kernel test robot [this message]
2026-04-07 3:58 ` kernel test robot
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=202604051143.qdWe0OAE-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mjguzik@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox