From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0FF0C433DB for ; Fri, 26 Mar 2021 04:37:01 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B3A661A45 for ; Fri, 26 Mar 2021 04:37:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B3A661A45 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=R7lsn28hSffo4u7H+8A9VtVjYvqXwjBAzjew/pnIfaw=; b=bCMTPMsOg1jYQzLSLoIkaDkDa 5vNMtZTB6zgWRVw0O180ZFj5hh4pw92Giy5LHyd2J7prRBchQV73aRxch+i2r8vAn7EXLaESI/GAF jVtG4Qnau5xEVi/hHYp73HGJ0mG+BG5YRUrD7hMqJYvh/o0K5KnxwqN5sPQPpAw6e2vl2Dhz61WOX Xvzn6x1ItAms2cM3l1NVgSkf/v5Q4xogMV5Z+PzN2v/TrbgfsZyWdL1/m51z8VsQbOEtTANEDt8c6 UBcKCBmKleLXZhvewkDretEvtdS80GAFJmorTnSLnOW7alx25zAqaG+RVYPK32Xi2f9+cZ1+zQgHU pbd1qQpKA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lPeBm-002lBz-IR; Fri, 26 Mar 2021 04:35:14 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lPeBc-002lAP-4h for linux-arm-kernel@lists.infradead.org; Fri, 26 Mar 2021 04:35:06 +0000 Received: by mail-pg1-x52f.google.com with SMTP id v3so3794360pgq.2 for ; Thu, 25 Mar 2021 21:35:03 -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=o6ZYIXdd1/vAExcYXFT6dANx8GnJNuATCIGW/s9Pah8=; b=EgADIZi7ayX4VsRKHlpPjC8PmfC1eA96LzdW+fEKlUeEcGISxNIPEefy6IgU17jWkb TL5UUqttP2GINo0lHOW6LYzOTm46xj04MRSK0+ETn9w4VQhoFNvSZ1IC6mTECf/Ohmun M/ZXjbRfr5A+Jm36wv4xIXSdlfdyBR1izqmz0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=o6ZYIXdd1/vAExcYXFT6dANx8GnJNuATCIGW/s9Pah8=; b=fxJz/Zxr0nGK8iFIjewuEIGqM4mrtOC85xzWYc74N8mYcn7sZ7nzrERn6TXfDmfC/A OsuLAVG9Di/syrUUJEi1+ASmVzvZCfg11yGY6elv7nQo/bhMzWoR6tUOilC/yaIH+8XF opsFAmEPvUVI6FXU8m/1S+LUSRpMFxeIMJ6ixG6pXukuKN2w8B3ApuWQhiHf2WZQz/bE BSKXOCXoiJG4iEXgwdJeh/K9ZGlqMw0HoCL9hdPTFjhjAJGgzVM5DDHNb92IXJf/rP4A knveJ7LWyEJ56zXBbZnB5ZrUk2UQtnE5Z1WUnIre0CQxdycqFCqB0s0+64JNXAcgcDo1 twmw== X-Gm-Message-State: AOAM5338vxo89jJS9Te0AxLmLAl7U/adqvkYizVVZ6eAV2BOtb9GlTos UGy8e1vIC3+rWkqlDHvxJ5trBw== X-Google-Smtp-Source: ABdhPJyx+C6gTpwCe49uMztK4X6wt+I8l9KdCax1Eia8cag9mJ0mh/5Csm5HLJjBwIAOAJCT/Ew/PQ== X-Received: by 2002:aa7:86d9:0:b029:1ef:4f40:4bba with SMTP id h25-20020aa786d90000b02901ef4f404bbamr10920480pfo.54.1616733302846; Thu, 25 Mar 2021 21:35:02 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id l22sm7520464pjl.14.2021.03.25.21.35.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Mar 2021 21:35:02 -0700 (PDT) Date: Thu, 25 Mar 2021 21:35:01 -0700 From: Kees Cook To: Sami Tolvanen Cc: Nathan Chancellor , Nick Desaulniers , Masahiro Yamada , Will Deacon , Jessica Yu , Arnd Bergmann , Tejun Heo , "Paul E. McKenney" , Christoph Hellwig , Peter Zijlstra , bpf@vger.kernel.org, linux-hardening@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 06/17] kthread: use WARN_ON_FUNCTION_MISMATCH Message-ID: <202103252134.BCC32ECC9@keescook> References: <20210323203946.2159693-1-samitolvanen@google.com> <20210323203946.2159693-7-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210323203946.2159693-7-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210326_043504_409189_209D315B X-CRM114-Status: GOOD ( 14.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 23, 2021 at 01:39:35PM -0700, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG, a callback function passed to > __kthread_queue_delayed_work from a module points to a jump table > entry defined in the module instead of the one used in the core > kernel, which breaks function address equality in this check: > > WARN_ON_ONCE(timer->function != ktead_delayed_work_timer_fn); > > Use WARN_ON_FUNCTION_MISMATCH() instead to disable the warning > when CFI and modules are both enabled. > > Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel