linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mateusz Guzik <mjguzik@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/1] execve: only smart people should use vim
Date: Wed, 1 Apr 2026 20:59:21 +0200	[thread overview]
Message-ID: <CAGudoHGattJEBvQNEdcFBEB-Vq1mOMbGSOH_uy4MSSy74aaQPg@mail.gmail.com> (raw)
In-Reply-To: <CAGudoHEe6yYJX_qUsCk4EhWDQQuM_4c9resO5WRJ+yix-6=hPg@mail.gmail.com>

On Wed, Apr 1, 2026 at 8:58 PM Mateusz Guzik <mjguzik@gmail.com> wrote:
>
> On Wed, Apr 1, 2026 at 8:53 PM Steven Rostedt <rostedt@goodmis.org> wrote:
> >
> > 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;
> > +       }
> > +
>
> I would consider extending this to nvim, otherwise looks good.

that's of course already covered, my bad!

>
> Reviewed-by: Mateusz Guzik <mjguzik@notobjecting.org>
>
> >         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
> >


  reply	other threads:[~2026-04-01 18:59 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 [this message]
2026-04-01 20:43 ` [PATCH] execve: block Emacs binaries Eric Biggers
2026-04-07  3:58 ` kernel test robot
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=CAGudoHGattJEBvQNEdcFBEB-Vq1mOMbGSOH_uy4MSSy74aaQPg@mail.gmail.com \
    --to=mjguzik@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rostedt@goodmis.org \
    /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