Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751574AbbGRFFt (ORCPT ); Sat, 18 Jul 2015 01:05:49 -0400 Received: from mail.skyhub.de ([78.46.96.112]:51991 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750881AbbGRFFr (ORCPT ); Sat, 18 Jul 2015 01:05:47 -0400 Date: Sat, 18 Jul 2015 07:05:36 +0200 From: Borislav Petkov To: Josh Poimboeuf Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Michal Marek , Peter Zijlstra , Andy Lutomirski , Linus Torvalds , Andi Kleen , Pedro Alves , x86@kernel.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 04/21] x86/hweight: Add stack frame dependency for __arch_hweight*() Message-ID: <20150718050536.GA23478@nazgul.tnic> References: <0d8517b7ab757e00a13b3abe2b677d9eb23362be.1437150175.git.jpoimboe@redhat.com> <20150717171726.GA21568@nazgul.tnic> <20150717173220.GA12761@treble.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150717173220.GA12761@treble.redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1065 Lines: 26 On Fri, Jul 17, 2015 at 12:32:20PM -0500, Josh Poimboeuf wrote: > Well, but this isn't some whitelist code to make stackvalidate happy. > > It's actually a real runtime frame pointer bug, and the rsp dependency > is real. If it does the call without first creating the stack frame > then it breaks frame pointer based stack traces. I think we can live with the stack trace being a little wrong in those __sw_* variants. And besides, we're talking about the very very small percentage of machines (which keeps getting smaller) which don't support POPCNT. And from those, only for the cases where the arg is not __builtin_constant_p() because there we do the __const_hweight* thing. I'd prefer to not clutter the code more in that case. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/