Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jul 2015 09:26:59 +0000
From:      "wma_semihalf.com (Wojciech Macek)" <phabric-noreply@FreeBSD.org>
To:        freebsd-arm@freebsd.org
Subject:   [Differential] [Commented On] D3094: Fix ARMv8 KSTACK_PAGES issue
Message-ID:  <fb84cc016411fa9e2bfa8f3bff2beb46@localhost.localdomain>
In-Reply-To: <differential-rev-PHID-DREV-iyfes6yosmvf4z7iwnvz-req@FreeBSD.org>
References:  <differential-rev-PHID-DREV-iyfes6yosmvf4z7iwnvz-req@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
wma_semihalf.com added inline comments.

INLINE COMMENTS
  sys/arm64/include/param.h:98 Hm... isn't the argument about  error vulnerability good enough? I'm pretty sure that sooner or later, when someone creates new file which uses KSTACK_PAGES he looks where is defined and includes <machine/param.h> forgetting about prior including of "opt_kstack_pages.h" (*). In that case the default value will be used regardless of the one set up in KERNCONF. The compiler won't show even slightest indication of an error and the bug will appear in the most unpredictable place.
  I remember how much time took to find this bug, because errors it caused were at the first look completely unrelated to anything. If we really want to have armv8 the tier1 architecture, I'd like to remove this piece of code because is dangerous.
  
  (*) All armv8 machdep files are the perfect example of that situation. The code was copied from armv7 (where I think that KSTACK_PAGES doesn't work either, but no one ever tried to change the default) and the bug propagated.

REPOSITORY
  rS FreeBSD src repository

REVISION DETAIL
  https://reviews.freebsd.org/D3094

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: wma_semihalf.com, emaste, zbb, andrew
Cc: imp, andrew, freebsd-arm-list, emaste



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fb84cc016411fa9e2bfa8f3bff2beb46>