linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: bvanassche@acm.org, ooo@electrozaur.com,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Nathan Chancellor <natechancellor@gmail.com>,
	hch@infradead.org, Kees Cook <keescook@google.com>
Subject: Re: [PATCH] libosd: Remove ignored __weak attribute
Date: Fri, 26 Oct 2018 13:05:51 -0700	[thread overview]
Message-ID: <CAKwvOd=c9RG2s3f-PgM1T84sHc5N9zcjrVpG5is+mGbTOxvtrQ@mail.gmail.com> (raw)
In-Reply-To: <CAHk-=wh0LsuM+kAZGbDaogDdSbdCk3GvXmjYVAMkpmLj2=VF=g@mail.gmail.com>

On Fri, Oct 26, 2018 at 12:22 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Fri, Oct 26, 2018 at 11:32 AM Nick Desaulniers
> <ndesaulniers@google.com> wrote:
> >
> > + Linus
> > I'm not about the process of removing code from the kernel.  Doesn't
> > that violate the "thou shalt not break userspace" rule?
>
> The only thing that breaks the "thou shalt not break userspace" rule
> is fairly simple: things that break user space.

Is removing a filesystem considered a userspace breakage?  If you have
an exofs mount, and you upgrade to a kernel with the RFC patch, you
will no longer be able to mount that type of FS.  Userspace code that
expects to mount an exofs FS would now always fail.  Maybe this is
equivalent to removing a previously supported mount option.
/proc/filesystems might have one less option.

So I guess this is different than dropping support for an architecture
since you cannot produce an updated kernel image, as opposed to this
RFC which would make existing drives fail to mount?

>
> Does removing the code break for somebody? If so we don't do it. But
> if nobody notices because nobody uses, it's fine.

Right, but it seems like a catch 22; it's not possible to prove that
nobody will notice because they are not using it.

Like the expression:
If a tree falls in a forest and no one is around to hear it, does it
make a sound?

If no one is using a kernel feature and its removed, will anyone notice?

If the maintainer would like to remove support for their subsystem,
should it continue to remain in the tree?  Code is never truly
deleted, and is relatively painless to resurrect with git.

Solutions that come to mind immediately:
* Just land the small fix discussed earlier in the thread. These
subsystems continue to exist.  Maybe this question comes up again for
this subsystem in a few years.  Christoph alludes to my question not
being the first time this was asked of this subsystem.
* Put out some kind of intent to deprecate, hoping to get feedback on
possible users that would be affected. Land the deletion patches in
-next.  This approach always runs the risk of not posting in the right
venue; and users can't be bothered to check for intent to deprecate
notices.
* Just delete it. Resurrect if users report use of this FS.

What are your thoughts?

>
> Basically, there is no "theoretical" rule about what breaks user space
> or not. In particular, the rule is *not* that you can't change ABI.
> You can do any change you want that changes a kernel exported ABI,
> just as long as nobody actually notices the change.
>
> But in practice, it's often _much_ more work to try to figure out
> whether something breaks somebody than it is to just say "don't change
> behavior", so 99% of the time, the rule ends up being just "try to
> avoid intentionally changing behavior, because you'll likely get it
> wrong".

I agree semantic changes to an existing API are problematic (not just
within the kernel), but do you consider deletion or removal of
parameters in the same category?

Thank you for your insight on this.
-- 
Thanks,
~Nick Desaulniers

  reply	other threads:[~2018-10-26 20:06 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-30 20:54 [PATCH] libosd: Remove ignored __weak attribute Nathan Chancellor
2018-10-01 22:47 ` Nick Desaulniers
2018-10-02  1:16 ` Bart Van Assche
2018-10-02  6:55   ` Nathan Chancellor
2018-10-02 14:56   ` Christoph Hellwig
2018-10-02 16:59     ` Boaz Harrosh
2018-10-02 17:24   ` Nick Desaulniers
2018-10-02 17:57     ` Bart Van Assche
2018-10-02 22:33       ` Nick Desaulniers
2018-10-02 23:06         ` Bart Van Assche
2018-10-25 21:31           ` Nathan Chancellor
2018-10-25 22:02             ` Nick Desaulniers
2018-10-25 22:55               ` Nathan Chancellor
2018-10-26 17:54                 ` Nick Desaulniers
2018-10-26 18:01                   ` Bart Van Assche
2018-10-26 18:05                     ` Nathan Chancellor
2018-10-26 18:31                       ` Nick Desaulniers
2018-10-26 19:22                         ` Linus Torvalds
2018-10-26 20:05                           ` Nick Desaulniers [this message]
2018-10-26 20:42                             ` Linus Torvalds
2018-10-26 21:02                               ` Nick Desaulniers
2018-10-26 21:00                     ` Nick Desaulniers
2018-10-26 21:30                       ` Bart Van Assche
2018-10-26 21:36                         ` Nick Desaulniers
2018-10-26 21:59                           ` Bart Van Assche
2018-10-26 22:07                             ` Nick Desaulniers
2018-10-26 22:24                               ` Bart Van Assche
2018-10-27 13:28                                 ` Martin K. Petersen
2018-10-28 15:44                                   ` Christoph Hellwig
2018-11-01  1:05                                   ` Boaz Harrosh
2018-10-27  3:35                               ` Theodore Y. Ts'o
2018-10-27  6:15                                 ` Bart Van Assche
2018-10-27  6:25                                   ` Nathan Chancellor
2018-11-01  1:15                   ` Boaz Harrosh
2018-11-01  1:39             ` Boaz Harrosh
2018-11-01  1:44               ` Nathan Chancellor
2019-01-26  6:47 ` [PATCH RESEND] " Nathan Chancellor

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='CAKwvOd=c9RG2s3f-PgM1T84sHc5N9zcjrVpG5is+mGbTOxvtrQ@mail.gmail.com' \
    --to=ndesaulniers@google.com \
    --cc=bvanassche@acm.org \
    --cc=hch@infradead.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=keescook@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=natechancellor@gmail.com \
    --cc=ooo@electrozaur.com \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).