Re: [git patches] two warning fixes



Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> writes:

So let's make a new rule:

We absolutely NEVER add things like "must_check" unless not checking
causes a real and obvious SECURITY ISSUE.

Oh, come on, almost every kernel bug is a potential security issue.

IMHO, if the function can only fail due to a kernel bug, it should
return void and, in case of bug, explode with BUG_ON() or something
like that. Sure, must_check doesn't apply too well to void.

But, if I have functions which can fail for legitimate (not kernel
bug) reasons, and I know ignoring their return values would always
be a bug, then must_check seems an obvious best and simple defense
against that.
--
Krzysztof Halasa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [stable] Linux 2.6.25.10 (resume)
    ... -Linux kernel developers take security very seriously. ... security bug is found so that it can be fixed as soon as possible. ... In the meantime you might want to define "disclose" as ...
    (Linux-Kernel)
  • Re: [Full-disclosure] Linux Kernel CIFS Vulnerability
    ... As for the ASLR component of PageExec: in kernel space, ... soon to issue from the varied and sundry organisations who bundle the Linux ... the reason is intersintg too; linus considers security ... lot of bug classes from the start, ...
    (Full-Disclosure)
  • Re: secure computing for 2.6.7
    ... we make sure they're obviously safe in security terms before applying so ... But let's assume there's a real seccomp relevant bug in a RH kernel, ...
    (Linux-Kernel)
  • Re: [stable] Linux 2.6.25.10
    ... It costs time and effort to classify bugs as ... security related, ... the task refcount leak bug fixed in 2.6.25.10. ... MAC by exploiting a kernel bug that you 'experts' didn't deem important ...
    (Linux-Kernel)
  • Re: [PATCH 1/2] LogFS proper
    ... Please comment the structure with kernel doc comments and avoid the tail ... Do enums have a significant ... Also the BUG itself will give you enough clue where it happened, ... which leaves only the prepared filesystem image to worry about. ...
    (Linux-Kernel)