From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754529AbcHWLn0 (ORCPT ); Tue, 23 Aug 2016 07:43:26 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:36905 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751389AbcHWLnX (ORCPT ); Tue, 23 Aug 2016 07:43:23 -0400 MIME-Version: 1.0 In-Reply-To: <20160822210606.GA10044@nazgul.tnic> References: <20160822205229.GA2638@p183.telecom.by> <20160822210606.GA10044@nazgul.tnic> From: Alexey Dobriyan Date: Tue, 23 Aug 2016 13:46:41 +0300 Message-ID: Subject: Re: [PATCH] x86: branchless clear_page() To: Borislav Petkov Cc: x86@kernel.org, Linux Kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 23, 2016 at 12:06 AM, Borislav Petkov wrote: > On Mon, Aug 22, 2016 at 11:52:29PM +0300, Alexey Dobriyan wrote: >> Apply alternatives at the call site instead of function body. >> Save branch per clean page. > > Any size increase to an allyesconfig vmlinux and increase to > alternatives application time? > > Booting with "debug-alternative" should help. x86_64 allyesconfig kernel lists whole 56 calls to clear_page(). My usual kernel lists 8. There are tons copy_from_user/copy_to_user entries and POPCNT and CLAC/STAC, so I think those several dozens clear pages don't matter.