Re: [PATCH v7 0/4] Compile-time stack validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 15, 2015 at 12:16:28PM +0200, Ingo Molnar wrote:
> 
> * Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
> 
> > On Tue, Jul 14, 2015 at 12:14:06PM -0500, Josh Poimboeuf wrote:
> > > Posting a listing of reported warnings in a reply to this email.
> > 
> > These are the reported stackvalidate warnings on tip/master with my Fedora-based 
> > config.  There were 1399 warnings in 26 .c files and 16 .S files.  It was mostly 
> > repeat warnings so I removed a lot of the repeats to keep it short.
> 
> Are most of these warnings legit, what's the false positive rate in your 
> impression?

Examining the warnings per-file (since that's a much easier analysis
than per-warning):

Of the 26 .c files:

- 21 have real frame pointer bugs, most of them caused by a handful of
  inline asm() macros
- 5 have false positives (but several of these have questionable usage
  of asm() which might be convertible to C code)

Of the 16 .S files:

- 12 have real frame pointer bugs*, typically caused by not having
  FRAME/ENDFRAME (note: many of these files also have false positive
  warnings)

- 4 have no bugs and only false positives

Most of the false positives in the .S files are actually incorrect ELF
annotations.  I still consider them false positives because they're not
"real" bugs, per se.  But they're still fixable.

Overall I think there will end up being only be a handful of locations
that need to use one of the whitelist macros
(STACKVALIDATE_IGNORE_{INSN,FILE}).

> You might want to start fixing a few typical types, just to see what it involves 
> exactly and whether we want to fix it that way.

I already have a good idea of what needs to be done for most of the
warnings.  I'll post some patches and try to give a representive
sampling of what the different types of fixes look like.


[*] But note that the definition of a frame pointer bug is open to
    interpretation, especially for "special" asm code like suspend,
    hibernate, relocate, reboot, ftrace, bpf, entry code, etc.  In
    general, when looking at whether frame pointers are needed, I asked
    myself "what would gcc do?"

-- 
Josh
--
To unsubscribe from this list: send the line "unsubscribe live-patching" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux