Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6213908pxv; Thu, 29 Jul 2021 09:02:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRhaVwY/pfvOAqx6lL76hf98Pquw5lLYT7HZr0v4SBbgZhV5/vgaUbPcp5HlA53b6FZAp9 X-Received: by 2002:a05:6512:3497:: with SMTP id v23mr4440317lfr.286.1627574527251; Thu, 29 Jul 2021 09:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627574527; cv=none; d=google.com; s=arc-20160816; b=r2Zm1oNbTNhEpcNUxwzO95ILNDFrZRa9LlWJroQO6+J/xc1xm3nCc44f1N9dLTDzu8 J7s9JBmlevXfzm0kGSttfY0HiDHVsTWxnhzRjvkfwSeslR5BuTf9Kkkpz6D/GJd1BPza gWmDCmiycJN4Utr8tMD0cRSMxIbRwG7NocaFLAftxQlgqUnWbfswVcRg+R9t3Z73lce7 g/tKsA2Es4Dv/3dEcCNSfb7wmaNnRuAUr51wT0TgTJnn0fCB3xhC/2GDlyl9z3iRf1Pk Ehw9B1Xr4gcHFs6uuwRX/dP4JHqKIKnoEP0d1K6vfs6OKKG0bVeUSMYuU3zSuJaf4epx USDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=thpflaunPfpZl8ZBuTa3MkLmU7iNp7YnzzPhpwELtdQ=; b=tMczyAC2Rgu6+MwdI8TSnXFr/d1mddII6/FdKc2i6A9DP1ryZJvrP8q2+N2IqmfS/+ wsL9BrtZiS/Kt7KOpKgh4sml6p1fjiNz0l3+2vlaz+xDYWk1zm26iXsu5c/QWGj/j1B5 3nq++7AyOrmp1MWrMqxozSDFSpBTCWrR+3AUvLPynIiXeqreGQs65MtOfbsJDn8PQ4PH sDjh4TktLoZNTDhLdWV64isIuJp6F80+mYhzRHiwV6L9Jst6w+Oc2Nl/g+xmBWsOWAww iYUnybnEP63korq3bf3D0oGab5ZhNqgM8tfgbt4h+J78c93kSvo8dG2iwZUTt31IyDWh CVlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=coG04a+n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a16si3250770ejv.738.2021.07.29.09.01.37; Thu, 29 Jul 2021 09:02:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=coG04a+n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238378AbhG2QAN (ORCPT + 99 others); Thu, 29 Jul 2021 12:00:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:49984 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238363AbhG2P6i (ORCPT ); Thu, 29 Jul 2021 11:58:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1AC2860F21; Thu, 29 Jul 2021 15:58:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627574315; bh=1Sz6fAoKWdC/PDDp7qSPBjRK2ww0G2gNlHmNDbJYtbc=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=coG04a+nWxky0ttRvEdIErZbj4b6RtAgVvSbcgEdyzP21AqGkm//ErvvSqyuwVlqu xaWimwK20os7mBeKJwgOl2NASOvtd/mVQXUQJIum2E9XhGobfZcVxjPjG9ybNUGUoI 6JrD/4jFZM8d32DuIH448KApIaALtvALWQAtk3oUQ/OGhG41QPJb2eWjSF27ECi/PZ GU6PHvIwWVoB2LSNUJUDsOVkWuobTJsRHOQiBJMgZIOflq9opFlEzlJVB9Qhy66rVA cDr2bgfT5WXwNSMzPNNVQ6lbCQeBP9fr5Y2ymN4fxZ+xw+dmfVwUM1ZELIyfeFaKWC BgWq80R5WG8CA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id DD6755C04E6; Thu, 29 Jul 2021 08:58:34 -0700 (PDT) Date: Thu, 29 Jul 2021 08:58:34 -0700 From: "Paul E. McKenney" To: Marco Elver Cc: Heiko Carstens , Ilya Leoshkevich , Vasily Gorbik , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [PATCH] kcsan: use u64 instead of cycles_t Message-ID: <20210729155834.GX4397@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20210729142811.1309391-1-hca@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 29, 2021 at 04:53:10PM +0200, Marco Elver wrote: > +Cc: Paul > > On Thu, 29 Jul 2021 at 16:28, Heiko Carstens wrote: > > > > cycles_t has a different type across architectures: unsigned int, > > unsinged long, or unsigned long long. Depending on architecture this > > will generate this warning: > > > > kernel/kcsan/debugfs.c: In function ‘microbenchmark’: > > ./include/linux/kern_levels.h:5:25: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘cycles_t’ {aka ‘long unsigned int’} [-Wformat=] > > > > To avoid this simple change the type of cycle to u64 in > > microbenchmark(), since u64 is of type unsigned long long for all > > architectures. > > > > Signed-off-by: Heiko Carstens > > Acked-by: Marco Elver > > Do you have a series adding KCSAN support for s390, i.e. would you > like to keep it together with those changes? > > Otherwise this would go the usual route through Paul's -rcu tree. Either way, please let me know! Thanx, Paul > Thanks, > -- Marco > > > --- > > kernel/kcsan/debugfs.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/kernel/kcsan/debugfs.c b/kernel/kcsan/debugfs.c > > index e65de172ccf7..1d1d1b0e4248 100644 > > --- a/kernel/kcsan/debugfs.c > > +++ b/kernel/kcsan/debugfs.c > > @@ -64,7 +64,7 @@ static noinline void microbenchmark(unsigned long iters) > > { > > const struct kcsan_ctx ctx_save = current->kcsan_ctx; > > const bool was_enabled = READ_ONCE(kcsan_enabled); > > - cycles_t cycles; > > + u64 cycles; > > > > /* We may have been called from an atomic region; reset context. */ > > memset(¤t->kcsan_ctx, 0, sizeof(current->kcsan_ctx)); > > -- > > 2.25.1 > > > > -- > > You received this message because you are subscribed to the Google Groups "kasan-dev" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to kasan-dev+unsubscribe@googlegroups.com. > > To view this discussion on the web visit https://groups.google.com/d/msgid/kasan-dev/20210729142811.1309391-1-hca%40linux.ibm.com.