From: valdis.kletnieks@vt.edu
To: "Tobin C. Harding" <tobin@apporbit.com>
Cc: Salvatore Mesoraca <s.mesoraca16@gmail.com>,
linux-kernel@vger.kernel.org,
kernel-hardening@lists.openwall.com, linux-scsi@vger.kernel.org,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Dario Ballabio <ballabio_dario@emc.com>,
Kees Cook <keescook@chromium.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
kernelnewbies@kernelnewbies.org
Subject: Re: [PATCH] scsi: eata: drop VLA in reorder()
Date: Mon, 12 Mar 2018 02:36:38 -0400 [thread overview]
Message-ID: <134937.1520836598@turing-police.cc.vt.edu> (raw)
In-Reply-To: <20180312030834.GC8631@eros>
[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]
On Mon, 12 Mar 2018 14:08:34 +1100, "Tobin C. Harding" said:
> removal patch that 768 was a lot of stack space. That comment did,
> however say 'deep in some transfer call chain'. I don't know what a
> 'transfer call chain' (the transfer bit) is but is there some heuristic
> we can use to know how deep is deep? Or more to the point, is there some
> heuristic we can use to know what is an acceptable amount of stack space
> to use?
The canonical "why we put kernel stacks on a diet" configuration:
Imagine a bunch of ISCSI targets - with IPSec wrapping the connection.
Arranged into a software RAID5. With LVM. With encryption on the LV. With XFS
on the encrypted LV. And then the in-kernel sharing it out over NFS. With
more IPSec wrapping the NFS TCP connection.
Oh, and I/O interrupts, just for fun. And most of all of that has to fit their *entire*
stack chain into 2 4K pages. Suddenly, that 768 bytes is taking close to 10% of
*all* of the stack that all of that call chain has to share.
And I see that patch is against scsi/eata.c - which means it can plausibly end up
sharing that stack scenario above starting at 'software raid5'.
(For bonus points, the alert reader is invited to figure out which stack each of the
above actually ends up on. No, it isn't split across enough stacks that taking
768 bytes out of any of them is acceptable.. :)
[-- Attachment #2: Type: application/pgp-signature, Size: 486 bytes --]
next prev parent reply other threads:[~2018-03-12 6:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-11 21:06 [PATCH] scsi: eata: drop VLA in reorder() Salvatore Mesoraca
2018-03-12 3:08 ` Tobin C. Harding
2018-03-12 6:36 ` valdis.kletnieks [this message]
2018-03-12 10:11 ` Salvatore Mesoraca
2018-03-12 18:45 ` Linus Torvalds
2018-03-13 0:44 ` Arthur Marsh
2018-03-13 2:35 ` Martin K. Petersen
2018-03-13 9:05 ` Christoph Hellwig
2018-03-13 22:04 ` Salvatore Mesoraca
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=134937.1520836598@turing-police.cc.vt.edu \
--to=valdis.kletnieks@vt.edu \
--cc=ballabio_dario@emc.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=kernelnewbies@kernelnewbies.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=s.mesoraca16@gmail.com \
--cc=tobin@apporbit.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