Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4785710iob; Mon, 9 May 2022 01:21:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvC5CldBLWZveuI5dBJCHPC+wPjlgfBxqpGuMlK7rDQLNO8VhKkdOeFZUnleNDb8+CcRVI X-Received: by 2002:a17:902:8696:b0:15d:946:2f98 with SMTP id g22-20020a170902869600b0015d09462f98mr15352529plo.82.1652084480628; Mon, 09 May 2022 01:21:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652084480; cv=none; d=google.com; s=arc-20160816; b=tHAnw5FuZFz+1rxnaBpS3GMV8XrwCnwbz2UFd7ncoMqcfOk4zCoWQRbQf3tIOO4F3X +maLhPuneRz5opZGeiEUa8GdFEKF9LwqtsiM4/tzJ4nKBcxz/6dx8bzYGziP7OH35ovY gzj+OEqnAJFxBMtwS25rE3N3l5VvM0+8kB3PJzP3ZxuqJbTjDyxCStyh2RdAReN65+k4 KA+LzFuz5BExVEsntwn6OLAVllFn7f44AqAC+YlUgD2V8agiYfAVbI0fHOK5LE+ITONg A8v8ykWpfHTpPEiHrOkeF/r7SZAe06wTa7T9QD80hhTLOGm5sWmOBWsm6ijlUmLhWkkA mEjQ== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=idVYGXtFtIYXbD4diMzv44fhyusigdC9ymPPyiEa4fU=; b=Z0w8Z5IDBBc+3jYKjnzgkt7Ai1Ayio8VUxjK7OwNtEwUQoJvW5S5vKW2xuN2WxJdhd 6jx3X3lBrZp1qUmbWMt96ZeJxeJ2OTDAFhjmnNlVBirqic+g1JnxVDO76bWuRuC6ir+B HVB+Lt2UxeKlLhMwjz0XWPP6Nzevz5GIFxm3b0lK9rchR4MY8Fb2YtlX078fmH3cFQwp MpWfQbMGFieV/cEs2sm5SP2m2YLagkyyNCb70GRhSJayUdsmbNHEX2uwdilIR4ybnkDw QqymM1cVpWlav9jLsZsayvyIktYpk9ydKh2hriF/SCb3HbHtN5Amecy2Av8zX0gzss3N tafA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YkMuW6w3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id nv6-20020a17090b1b4600b001dc758111afsi15173153pjb.108.2022.05.09.01.21.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 01:21:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YkMuW6w3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0D8011E1234; Mon, 9 May 2022 01:09:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238744AbiEGIUU (ORCPT + 99 others); Sat, 7 May 2022 04:20:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1446083AbiEGIUL (ORCPT ); Sat, 7 May 2022 04:20:11 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C2D85838A for ; Sat, 7 May 2022 01:16:25 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id g184so5434357pgc.1 for ; Sat, 07 May 2022 01:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=idVYGXtFtIYXbD4diMzv44fhyusigdC9ymPPyiEa4fU=; b=YkMuW6w3LJLPY8hqfnwOzbmQzRI+9TJX7xo3XtWW+byYW4msua8cUQhwEZ45NyWBB2 aVelMQryw0+PknSAzroHFoN8+qsMO9V2DlI1AGeKzCgQaGgDAW5BM4TxFwnp8YUCxiru YJ2fPcslpe9WHXdO/b4tQwM/RhQe5Bf2OoG/c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=idVYGXtFtIYXbD4diMzv44fhyusigdC9ymPPyiEa4fU=; b=USTa0mE+ygF77nFMcQfJWx3bqgYmrbViF91sk5/VRaxT63t0MxOgpd+URIbcDKAYWt CRijmcznfEVuED3wkOWpM3s/Kga3NpIluvBHRiq7CTMWy7u6O6fWepYQmG0kVxvOcJ2U KDl6FC9UcYL+zdvAkdNQY8r0iy7p0JQRPWz4SycOTrZkxUzmm2rDU0BpnV7hz2pJ3jc5 jDwJaCa019+DJI/A/ffVpj+TKQ54WJaj9mJc7ZH0HXVF4Pa8D7oNfvNcYkEEkZdu1fpP OeHRq1sN2cB6JBcxm0KjtnxLDUDHGgWzliCccD1JIcEHa2RB0ESjza9tLPbLWAAZsUII PpYQ== X-Gm-Message-State: AOAM533HXWugZbnyvljy5kTVJmLeg+TQ9n8zSorYn+Awe6iFplNM3VtI +mhYloEqSlZfxnTNTI2Q2m/2Uw== X-Received: by 2002:a63:a06:0:b0:3c2:3345:bf99 with SMTP id 6-20020a630a06000000b003c23345bf99mr6016622pgk.477.1651911384751; Sat, 07 May 2022 01:16:24 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id l65-20020a622544000000b0050dc762818dsm4719584pfl.103.2022.05.07.01.16.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 May 2022 01:16:24 -0700 (PDT) Date: Sat, 7 May 2022 01:16:23 -0700 From: Kees Cook To: Miguel Ojeda Cc: Brendan Higgins , linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kunit: take `kunit_assert` as `const` Message-ID: <202205070116.BC6B4E33@keescook> References: <20220502093625.GA23225@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220502093625.GA23225@kernel.org> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 02, 2022 at 11:36:25AM +0200, Miguel Ojeda wrote: > The `kunit_do_failed_assertion` function passes its > `struct kunit_assert` argument to `kunit_fail`. This one, > in turn, calls its `format` field passing the assert again > as a `const` pointer. > > Therefore, the whole chain may be made `const`. > > Signed-off-by: Miguel Ojeda Reviewed-by: Kees Cook -- Kees Cook