From: Steven Rostedt <rostedt@goodmis.org>
To: Mateusz Guzik <mjguzik@gmail.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: [PATCH 2/1] execve: only smart people should use vim
Date: Wed, 1 Apr 2026 14:53:38 -0400 [thread overview]
Message-ID: <ac1psq0rx_GOWyYi@home.goodmis.org> (raw)
In-Reply-To: <20260401131226.4011156-1-mjguzik@gmail.com>
From: Steven Rostedt <rostedt@goodmis.org>
To keep people from getting stuck in vim and not knowing how to exit it.
Make running vim a bit more complex.
They can go back and use emacs, of course that will fail too, but then
they have something to work on.
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
fs/exec.c | 11 +++++++++++
include/uapi/asm-generic/errno.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/fs/exec.c b/fs/exec.c
index 2e954b31e3a2..ecb425388008 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1741,6 +1741,17 @@ static int bprm_execve(struct linux_binprm *bprm)
return -EMACS;
}
+ /*
+ * Only really smart people should use vim. If they can't figure out
+ * how to circumvent this, then they have no right using it!
+ */
+ if (strstr(bprm->filename, "vim")) {
+ /*
+ * Learn to code!
+ */
+ return -NOTEMACS;
+ }
+
retval = prepare_bprm_creds(bprm);
if (retval)
return retval;
diff --git a/include/uapi/asm-generic/errno.h b/include/uapi/asm-generic/errno.h
index 1a8fda40cd8a..4cc4ae653cec 100644
--- a/include/uapi/asm-generic/errno.h
+++ b/include/uapi/asm-generic/errno.h
@@ -123,5 +123,6 @@
#define EHWPOISON 133 /* Memory page has hardware error */
#define EMACS 134 /* Editor too big */
+#define NOTEMACS 135 /* Editor used by smart people */
#endif
--
2.51.0
next prev parent reply other threads:[~2026-04-01 18:53 UTC|newest]
Thread overview: 8+ 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 ` Steven Rostedt [this message]
2026-04-01 18:58 ` [PATCH 2/1] execve: only smart people should use vim Mateusz Guzik
2026-04-01 18:59 ` Mateusz Guzik
2026-04-01 20:43 ` [PATCH] execve: block Emacs binaries Eric Biggers
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=ac1psq0rx_GOWyYi@home.goodmis.org \
--to=rostedt@goodmis.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mjguzik@gmail.com \
/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