Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1022578ybe; Wed, 4 Sep 2019 11:16:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzxyNugKMwohV/tS0zbWN+i9cp1dmT4lEnT+KwzBY/nWwUeQPCksGFbC2aIXTt2ll7ZhBdw X-Received: by 2002:a65:49cc:: with SMTP id t12mr33920082pgs.83.1567621014876; Wed, 04 Sep 2019 11:16:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567621014; cv=none; d=google.com; s=arc-20160816; b=HzGAhpM9i1s8DuArPz0RGi5QQX5iTZJskB2J8ec8BEjGIWaM0Dg4a+KIlr3GkiyOGe Wa1RqY3dK8X6PBQNL4rQFz3XkNmtKRzBScL5R5l3MY/HlP92+V8cTDOYdFtEB6J75c1U RhxvxMV5qpBezw2a376euVKpkLWNhhNm2MgWImpsFgoftfJcNS8ysXP9Up/cRoG9gpIb BY3p/BMawNfXmptZRbZZLKBF+BSqJiUgTVeroxQkEL+dTk1sbMxeO9Drd5AHUxBJpMPO oLSnI0LfbYwT6lr5MBDq3Twrg4N2QovhVk/9OAC1uDTzI3M595cW3QdNovpr576bxdRZ +f/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AKfbQYEx0DNsiB162AQjj3yeKH8RTiLbOvCk4C65dsU=; b=1CefI6NGUe0n1iCT9C+/R7BtBH1JFZ0Mx2YYser2crztMHQckOA7mhibH6+98BXgbY H8397SpbZhKpY/Ky5x6Wn2tHfcVHSBzaBSHNZ8UDLjZ60ivPgy6IrpUAx8JA5V+/ZFLE f6z5DIUetwgzeLbdAn5bskcQnVoSxkt2EFttlp3WWJs2e0X3TUM2goqbjGeTw5A03GdX af3mVbJp397d8VeUaHPmvE7++PcvtHQuZRqviS8MjHdMHdHHscaLUT6PFAWW21gcyEuC ApcZj7YE5swCPE/iwfda2QcyH7OPEKiibPLVlEakQTUK+KN7ZLvFqTxLm7EAwGD4Xk7q 811w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CNF7xSKm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si18472857plh.138.2019.09.04.11.16.39; Wed, 04 Sep 2019 11:16:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CNF7xSKm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390938AbfIDSPM (ORCPT + 99 others); Wed, 4 Sep 2019 14:15:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:60628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390892AbfIDSPI (ORCPT ); Wed, 4 Sep 2019 14:15:08 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3740022CF7; Wed, 4 Sep 2019 18:15:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567620907; bh=bORFE6K2QGLqcpSI8tloPJ26KDM+tXzJwoFqYpq1sYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CNF7xSKm3E1VD0bSoYf2nLl2dSvnYc5Qzn14F48CQlbE5ew6P0QHtr5DUCv+JHGdG Cdn6Tp/bVYrqAvUZ7ELrBUiOZOoIU/5ZdAqjtvutwvJ2ZuoW0KdVQwBnehrUEm8DlH aVfjt6+iM2UfI+v+UMWobFJ1lmofBky/ldc4OBy4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Raul E Rangel , Kees Cook Subject: [PATCH 5.2 103/143] lkdtm/bugs: fix build error in lkdtm_EXHAUST_STACK Date: Wed, 4 Sep 2019 19:54:06 +0200 Message-Id: <20190904175318.345521443@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175314.206239922@linuxfoundation.org> References: <20190904175314.206239922@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Raul E Rangel commit b9bc7b8b1e9e815b231c1ca0b566ee723f480987 upstream. lkdtm/bugs.c:94:2: error: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Werror=format=] pr_info("Calling function with %d frame size to depth %d ...\n", ^ THREAD_SIZE is defined as a unsigned long, cast CONFIG_FRAME_WARN to unsigned long as well. Fixes: 24cccab42c419 ("lkdtm/bugs: Adjust recursion test to avoid elision") Cc: stable Signed-off-by: Raul E Rangel Acked-by: Kees Cook Link: https://lore.kernel.org/r/20190827173619.170065-1-rrangel@chromium.org Signed-off-by: Greg Kroah-Hartman --- drivers/misc/lkdtm/bugs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/misc/lkdtm/bugs.c +++ b/drivers/misc/lkdtm/bugs.c @@ -22,7 +22,7 @@ struct lkdtm_list { * recurse past the end of THREAD_SIZE by default. */ #if defined(CONFIG_FRAME_WARN) && (CONFIG_FRAME_WARN > 0) -#define REC_STACK_SIZE (CONFIG_FRAME_WARN / 2) +#define REC_STACK_SIZE (_AC(CONFIG_FRAME_WARN, UL) / 2) #else #define REC_STACK_SIZE (THREAD_SIZE / 8) #endif @@ -91,7 +91,7 @@ void lkdtm_LOOP(void) void lkdtm_EXHAUST_STACK(void) { - pr_info("Calling function with %d frame size to depth %d ...\n", + pr_info("Calling function with %lu frame size to depth %d ...\n", REC_STACK_SIZE, recur_count); recursive_loop(recur_count); pr_info("FAIL: survived without exhausting stack?!\n");