Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp822050pxy; Wed, 5 May 2021 15:01:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZOiALVxKqNg9zVPlqZQNzdwSxo/HmgBJk17iJlJFJ1T3WXAUhLWPq//dmPvT6MSctreay X-Received: by 2002:a05:6402:204c:: with SMTP id bc12mr1222934edb.35.1620252088347; Wed, 05 May 2021 15:01:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620252088; cv=none; d=google.com; s=arc-20160816; b=WfiYcvePj4QQasI0maD/wnNDFyFGGjCDel6YjRg9rvnYb50SAXkOhngxCKkZuSe9I/ /OIoqbElnkOFiSRgu1pYqFCfn9UH+RTKQi0NlloosSyK3H3wGwJTSVE+GgDNqU5u6Rl+ pXseCBS5/VusKJ2OJ8vDNtaHrndNi33ILTYxE+W4KMDCxNR1YNJNjUPavD9pPZZrj1bi q8UkKsSAg1R8yf5FXK/6Pt9h8Mbzz+4P/IS1WHPioIFDz7sg8ZhecMmyw8W4x82qY+tB /EZgPfl14xI2XJuTlnly2pJ3QSE5b8ZLlHals9y6F/P5aWM89iV/Cg+by74Goads9lT2 N7qA== 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=S0DhxzSooqp9Bz99qKVeDBS1mesCRKHaFmScR8yVGqo=; b=fwR1Lw18/ipFmFOLdbNja26uPu1QYM2eXRhKgVG0Wy83Zgo15CRsjDTrDhJ5EGNZjS N+fWWsVbuvZb2xZPhW2GzVaiukubIs2/8DBvRikxnmHtepw+7MV0QUsJ3PdhmcRMCGX4 YtXHA04ra0ff+/p1aqKZc2IQIw3yRs58tFLvVMW7sBBafzWrwtX33xtFU5VChckD77Xk GRF4XnkYxECo2wD+P0mZ8EQ30dYlMsJs6vJC/aVAUPDYQ1veJievqhG147jBXJ1EUAKq CK+EscdDAMIbv1jV2wZpwXcAOn4Ba/pJZdMpojAw5ZkXVBZ+jiiUQwYuPkI2lJEPgGjm jhMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aVnWcmhe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w7si503818ejy.722.2021.05.05.15.01.03; Wed, 05 May 2021 15:01:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aVnWcmhe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233801AbhEEUJw (ORCPT + 99 others); Wed, 5 May 2021 16:09:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:49728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230227AbhEEUJw (ORCPT ); Wed, 5 May 2021 16:09:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8E18D60241; Wed, 5 May 2021 20:08:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620245335; bh=C9PR3tmwVlH9qW2D6M7x6fJzbZRnZYZX8R2df7n/xWo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aVnWcmhemwCrgP5BTCssC6opOMk1FgRSN/6CPh8ucAItTtA7V+qG/oC+oYP14fNkM 9Wau1Ne7HgSSB7xpmePexVRAf+U6RJ5n7LwSb8hEpY3UeMFFY2QiFT9ibKPO4VNady tFovIAHE6+oPB++XRh2ttTCNXVLrmONcs5NKS3w1Smnoqm2gWZrYQB7KvgGX3gS5KG wBqXLk3wJsOVgZpC/bnBGcbvbJUk/GacJO+VA3wrSaBWTGgy4GmzI96OsNobKufBqY JuJ8L7QKf7f0vvwM1WW4SFmrzDJ1pONsSa8G0SR5FBxEBMMaRcO7xSeqcy5uFp3Kqa XFTcrtyVSvWlw== Date: Wed, 5 May 2021 13:08:50 -0700 From: Nathan Chancellor To: Jason Gunthorpe Cc: Kees Cook , Doug Ledford , Leon Romanovsky , Parav Pandit , Sami Tolvanen , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: CFI violation in drivers/infiniband/core/sysfs.c Message-ID: References: <20210402195241.gahc5w25gezluw7p@archlinux-ax161> <202104021555.08B883C7@keescook> <20210403065559.5vebyyx2p5uej5nw@archlinux-ax161> <20210504202222.GB2047089@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210504202222.GB2047089@ziepe.ca> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 04, 2021 at 05:22:22PM -0300, Jason Gunthorpe wrote: > On Fri, Apr 02, 2021 at 11:55:59PM -0700, Nathan Chancellor wrote: > > > So, I think, the solution is below. This hasn't been runtime tested. It > > > basically removes the ib_port callback prototype and leaves everything > > > as kobject/attr. The callbacks then do their own container_of() calls. > > > > Well that appear to be okay from a runtime perspective. > > This giant thing should fix it, and some of the other stuff Greg observed: > > https://github.com/jgunthorpe/linux/commits/rmda_sysfs_cleanup > > It needs some testing before it gets posted > > Jason I have verified that my original test case of running LTP's read_all test case passes with CFI enabled in enforcing mode with your series and I still get values when running cat on them. If you have any other suggestions for test cases, please let me know :) Thanks for the quick fix! Cheers, Nathan