Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp970460pxb; Fri, 22 Apr 2022 15:37:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyf9nLvsfp6CcxJq3mMrhdLpXo6/3Eck3mb/Y1YLqHYDdt/avsI1qVaUpVw3s7/sYxkbiz3 X-Received: by 2002:a17:90a:b78f:b0:1d2:fcc5:c4c1 with SMTP id m15-20020a17090ab78f00b001d2fcc5c4c1mr7844176pjr.15.1650667059117; Fri, 22 Apr 2022 15:37:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650667059; cv=none; d=google.com; s=arc-20160816; b=m9jmLKHeHaCy8nojs82HXp/sFESUoloVpcAm8IXsZfCTn2nRBsQ4iwOzZMLz+ThX1M MpOfMlR7qoMIONtTjKhHGFE3MZ3obEDQ3iXKrl2HIamNY92r0uWJOU1WYVbRznHxZ7hm XhhM7GQ84oWwmJbjdpe72aWTShhBG56NYWI8jg7OLqiNp5NYfK9THUy2qkIVn/L7xkmQ aMPTVgRfxXHt7k/k1sL98K68VtowuYHPt5OR20bXWFBqBqE9ILVS12ye/fKqjHNJVFSF jreWdWO0/Uj4SVXP0SUaDHFGpeIQHPKyAVURdPQpOX1mDEIf/cX/1suJ2m6Y4+epBQUr RyUA== 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=dF7JZoVEP59E6v/s+iF8o1iqK2mLfLNXDpJk4bfzOBM=; b=Ir00b1JoJKhEE3Yj5WRCUKEmCmD7bSGWdoNFXcXCmKZxPJq9rruI2TaxHz6hux06M4 PDsg61HzLxZwdUBOVRQtvOz+CndK+vU1WV/sIY4sEYkVQPOjJI7FYihvtqIZ/K6CX9Tm Dfg062qjN4PWOskuJ42ElVBs5FS2kuw3GOmehzHFJeLKAm8gSUzQKA8tVN5JSbP8Kdsb +M4b4OtQyYQJJqlDM0jXbstU07ZOpWZwockgh8dpBFLrqYt6EN/ef+1MKAFHgo3Udhm+ Rl2LrndY5KyvFwO1hMUXWOWEp0PH3fpuUJ4TiQIisEvnf9Moc4Jolw+BomfoxdMXuPNy +lRg== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t63-20020a638142000000b003a20a4042aesi9291231pgd.524.2022.04.22.15.37.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:37:39 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 1C9293BE571; Fri, 22 Apr 2022 13:25:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344214AbiDTWQ5 (ORCPT + 99 others); Wed, 20 Apr 2022 18:16:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229731AbiDTWQz (ORCPT ); Wed, 20 Apr 2022 18:16:55 -0400 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 086CB20BD4; Wed, 20 Apr 2022 15:14:06 -0700 (PDT) Received: (Authenticated sender: joao@overdrivepizza.com) by mail.gandi.net (Postfix) with ESMTPA id 88149100004; Wed, 20 Apr 2022 22:14:02 +0000 (UTC) MIME-Version: 1.0 Date: Wed, 20 Apr 2022 15:14:02 -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 10/11] linux/interrupt: Fix prototype matching property In-Reply-To: <202204191942.3C273AB@keescook> References: <20220420004241.2093-1-joao@overdrivepizza.com> <20220420004241.2093-11-joao@overdrivepizza.com> <202204191942.3C273AB@keescook> Message-ID: <2d7e424f13682295f655faf9b8c8f1cf@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 >> Fix this CFI policy violation by removing the function pointer union >> in >> the tasklet struct. > > The good news is that tasklet is on the way out the door[1], so this > may > quickly become a non-issue, but also to that end, this fix is hardly a > problem for a deprecated API... You are right, sorry for the noise. I looked a bit further and the problem I saw was actually caused by a compiler bug fusing similar instructions/basic blocks. It was fixed when I later stumbled on the problem again and added the following lines (668 and 669 in llvm/lib/CodeGen/MachineInstr.cpp) to the compiler, but without properly realizing what was actually behind the previous issue. Hopefully this is at least a good heads-up about possible pitfalls to other people (@Sami) implementing CFI in the compiler. https://github.com/lvwr/llvm-project/commit/0a22ca42877fd156ce95145b11f29c642092dbb7#diff-92843a1f037a9a1e56f92242c4e1746a1166a6b7044ad47a0b4fd2f4b1c6a359R668-R669