Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp791332pxb; Fri, 22 Apr 2022 11:12:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeOFzwVwQVr7Gz1ehA7rUZ79qJw9ov9HXe5gPWe8sv9N0niyClTuQHYtpEUqvdlW9LvtMS X-Received: by 2002:a17:90b:4a49:b0:1d2:adce:8a89 with SMTP id lb9-20020a17090b4a4900b001d2adce8a89mr17641913pjb.43.1650651172231; Fri, 22 Apr 2022 11:12:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650651172; cv=none; d=google.com; s=arc-20160816; b=vyr2hapo16zzejBCEy3v7kVEYVxpsdE8YhbhPlU51sQhHJVxqfripw+6KFB+lz0vYG f5iXzFs0PMnPrRDgnnS1K+8Bzv3VqfGAv0g50hSL558I+lY53iWDFol2aMr/5y5rsLGY G92VqYZafqo1vlzutyEesRm4AnzxiKTSd7prfC5wUJBgQ81ZjP6kFMEv7dzGY8h5EgW1 j/CjSaqJbJgc6di4/wJOcc/MLO8SV7V1/evtz0imqxRP2y7jV81bUgGbZULBIVXedjtf KJnk/M6MaxnPApGNNCMbozhyXYxA3Z8E5ZS8ZnrvX2w6dSZHBEToBelHLJKWp9rzoj8h btyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:references :in-reply-to:subject:cc:to:from:date:mime-version; bh=iTqf6zqC7jZ+w7oHQXe6uoW8VFVYFjo3kwKtxSXf8Zc=; b=YBqNKNNeatYv7nFsPOwGAAu1l3G8/qFw8tV8M/VIrOIVDzOnIAZWros6p6zMcx6TSW 9eVdHjXt8eH24nXzHS5qgtA5XGyYA4XwZXYUJp06qulvdNBfF/WfMNGu4y2z11FIjnPw GAQXdf/pHE+W5CstoKZ/Cg4biiMc0cxrqrsiv/5I2+VJx3C5ajGuFil28lhC4Oqmhog+ W9d70BfHsrCHKZMuSGHPKnBgXulT/ykQb2tfIeHWu9KFnWcTQcCGbMjNEerrcORKd2zt sutKt+CrYMAjaJPx0Tbh+lYTCShFhr5/UZ74dDOvJ75jQQuxVdkU0Z1Du5qgVNUs5uYg OJJg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f29-20020a63101d000000b00382192930cdsi9173174pgl.349.2022.04.22.11.12.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 11:12:52 -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; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 362B7F9546; Fri, 22 Apr 2022 10:48:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382826AbiDTWbP (ORCPT + 99 others); Wed, 20 Apr 2022 18:31:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245378AbiDTWbN (ORCPT ); Wed, 20 Apr 2022 18:31:13 -0400 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4AB141FA2; Wed, 20 Apr 2022 15:28:25 -0700 (PDT) Received: (Authenticated sender: joao@overdrivepizza.com) by mail.gandi.net (Postfix) with ESMTPA id 4514A20002; Wed, 20 Apr 2022 22:28:20 +0000 (UTC) MIME-Version: 1.0 Date: Wed, 20 Apr 2022 15:28:20 -0700 From: Joao Moreira To: Kees Cook Cc: linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, peterz@infradead.org, jpoimboe@redhat.com, andrew.cooper3@citrix.com, samitolvanen@google.com, mark.rutland@arm.com, hjl.tools@gmail.com, alyssa.milburn@linux.intel.com, ndesaulniers@google.com, gabriel.gomes@linux.intel.com, rick.p.edgecombe@intel.com Subject: Re: [RFC PATCH 11/11] driver/int3400_thermal: Fix prototype matching In-Reply-To: <202204191946.2843CF71@keescook> References: <20220420004241.2093-1-joao@overdrivepizza.com> <20220420004241.2093-12-joao@overdrivepizza.com> <202204191946.2843CF71@keescook> Message-ID: <06435f0b44681588052d145a17d60316@overdrivepizza.com> X-Sender: joao@overdrivepizza.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 > Where/why is the mismatch happening? Mismatch happens in dev_attr_show from drivers/base/core.c. There, kobject * is cast to device * before the call, probably because attr is also cast to device_attribute, which may have a mismatching hook prototype, I guess. I haven't tried it with any other CFI scheme other than my own implementation and I did not run this on GDB or anything... I'm just reporting based on the violation that FineIBT logged and in the fact that this patch fixed it, so I'm unsure if there is anything buried here.