Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp83359lqz; Fri, 29 Mar 2024 09:12:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXEGWNfQjw3ZtSJGdVOoAQcuMjlj4szwNEKUrFx5SSu7PjI+FLf1hbEItYZk+12PBZnGQv7+nLz6/6wvFpQnYyx8Mdr1QuFxnzLny7NOw== X-Google-Smtp-Source: AGHT+IHVaQJAs12VdEEjzAb90DhL0F7enqVH4/lcSiX49Yl9CnbYzoJoUaId2Rt//oYJw/AXhBiI X-Received: by 2002:a05:622a:148b:b0:432:c9c1:1d72 with SMTP id t11-20020a05622a148b00b00432c9c11d72mr720345qtx.30.1711728739449; Fri, 29 Mar 2024 09:12:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711728739; cv=pass; d=google.com; s=arc-20160816; b=OqY7VWrxgtcC7PZGrf0cawWkOCKovVVdlkqeWOdvN7jrnFWhtF468EQz0qmnkbt9w5 6TBhUI3kfxNbJKz3OLoRFWY9Up59vi42BzHIsE5sZJOOtXhSrgqWJjeL6Nl5rLUKK1/q 87meSHc0tbQwCzg8SpdbUP2qnl5Dywq8TTAcdlc1Xrlk6iOEalgCwWpjaKUQROc+SmAV FbczR7PpkcGgm/fr3cJ9kK5FZy4NmFdBRHy6FS9ilZ6A/S26bRf2uNjjBfnlMbNYUEKI dnKGNlkhsijg3zymgkaISyw87oqE1bwxCKTrqo4Fn5e3tXjZP7HTFDpWubAFZwGN/G/L m9Yw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ly5sywnVLR/lZ/PC9MiptB4xihV64oENPVlbNuxzib0=; fh=7EhwLBcrIK9gA2UAR4Jebkm8G/J2if5kKZ9wPrOAaGI=; b=Th+B8nL/Ga7qxgu4BOW+Ua4Ax07iag52j/NEHS4flLJ2noycEtsE0agQjUQfHfDfaL NgNV2zAHIjM1sXsXPjqIjRRAovpm0CnT98/qiDWsgBrflIR50jVkLXSHu4fU++7sVhKC poSIf7ULuFUle7Yd8/89mWfLcmVU+zFmSvlYr7+3c890Nk/Fvu/2cya1OAyhno3kkgFv XYF6KduYXr8Tl18Bn/yFrhQwdASsY8Mp/clMQFSCkoQy4xGRjHaF2RESizXd0CdKnGuM 0hLmXy2P1k//YG5Is2WhGmkMJlcCxgUMBU7Yj40ao6XKrJBD0j7Ih+n2ol0s4KkP9tTp ouLw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hrneEMLR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-125158-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125158-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j15-20020a05622a038f00b0042edcfb1f28si3979282qtx.92.2024.03.29.09.12.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 09:12:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125158-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hrneEMLR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-125158-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125158-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 314761C246DA for ; Fri, 29 Mar 2024 16:12:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B19F77BB0F; Fri, 29 Mar 2024 16:12:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hrneEMLR" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1CBF1C0DD0; Fri, 29 Mar 2024 16:12:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711728731; cv=none; b=SnWTCZnTnUeJmmBm4bj7o4vADAVFBUZ1IN9briBLCcL1RYB4pC1mpnMUZspdAGKOYe8ZfM9dGL59DDYwYWn3UlRZrYvGVx4vNarxuWfFn/cYgMTK6N6DFryxADLB/8cB47OusXlaql80Y4hN3CGccbVXEHleDmRcbG0Pq9c/DC0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711728731; c=relaxed/simple; bh=w4yBZavzUXkQn94G7vCY2jveYKh91htV8qdZ+sg+9Tg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZAol3SAitxshkRqYOkLFbQpXS5Q5Sv/45/i2Xd8E5OUj4VkIOrEY4774PHsxDvM+88cxlvrv08wuqqlsY2CHTpPhvpGdHRcTmxNr0kxAKRG0l2nMV5cCtKlIIDU7i9LTfWm5vke0U8X7CiqjVHOQBVWGMZQtNMX/qhvhaje2kpE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hrneEMLR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95735C433F1; Fri, 29 Mar 2024 16:12:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711728731; bh=w4yBZavzUXkQn94G7vCY2jveYKh91htV8qdZ+sg+9Tg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hrneEMLRANp4gzufIXuN8LJGsQPzRxYhBkmnMjF+lLjkOssMi1IXGSLpP3+PiMgIr FWUX46/y17ENCQCm5KNS/+Bcl3WAf13ITaFOn+ZoSVajTYpTh+pe55IS/H9eW5J43a cVfwnChoPAYtMt+jTP8aMzbUfKwXbnUzG/QUffEZWr80ptzbY09JwgH/J8tI12ITBZ +FIQCT65sYYSwGuSVvKTZCK5LODgfeeUrI/56roymZajZ4+jv4k6C4ADGibirEi6M3 6BkV8Ct+JeeBcOkweRyPIymOiHqmCw6nfeKoCOCTZ7GAE3dMS+OHKL3ta4x44lWJwK axIcISCkvnS9A== Date: Fri, 29 Mar 2024 09:12:08 -0700 From: Nathan Chancellor To: Jean Delvare Cc: Arnd Bergmann , linux-kbuild@vger.kernel.org, Masahiro Yamada , Greg Kroah-Hartman , Nicolas Schier , Arnd Bergmann , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH 05/12] firmware: dmi-id: add a release callback function Message-ID: <20240329161208.GA279061@dev-arch.thelio-3990X> References: <20240326144741.3094687-1-arnd@kernel.org> <20240326145140.3257163-4-arnd@kernel.org> <20240329134917.579c3557@endymion.delvare> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240329134917.579c3557@endymion.delvare> On Fri, Mar 29, 2024 at 01:49:17PM +0100, Jean Delvare wrote: > Hi Arnd, > > On Tue, 26 Mar 2024 15:51:30 +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > dmi_class uses kfree() as the .release function, but that now causes > > a warning with clang-16 as it violates control flow integrity (KCFI) > > rules: > > > > drivers/firmware/dmi-id.c:174:17: error: cast from 'void (*)(const void *)' to 'void (*)(struct device *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] > > 174 | .dev_release = (void(*)(struct device *)) kfree, > > > > Add an explicit function to call kfree() instead. > > > > Fixes: 4f5c791a850e ("DMI-based module autoloading") > > Not sure if this fixes tag is really warranted. As I understand it, > your change only removes a warning but there was no actual bug, right? Sort of, the warning is really pointing out that calling this callback will result in a crash at runtime when the kernel is built with kCFI enabled, which I would consider a bug. Cheers, Nathan