Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1484196pxf; Fri, 2 Apr 2021 11:46:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQgxLIMgzfUW1HxHFO2P4emhHLlBkuzjngXcM7a6WUAyZeDYoYSOFZ7KESfXoRmbl0Ft40 X-Received: by 2002:a05:6402:46:: with SMTP id f6mr17024694edu.252.1617389176302; Fri, 02 Apr 2021 11:46:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617389176; cv=none; d=google.com; s=arc-20160816; b=bqDN2QrHuNgGZ6UBn1xfqvM9d5LtE3UcxcmD2MZ0zX+SMVvOcZQXYgXSoXCLiDR+LN Z0WQOGq+zxUiG+baaIuJkLGyDWQTNgYbQRhM6T4ksU/ZMijS7MxPFdgYE1C5fz0odEw4 cuXcWb70iEnmYSX1ofYUpB+FFfHT3I2zO0L51RiRo1IxaNIzpUZJz4jynp9Dh/0nK716 Mh7btlK23WKm7gqPYsAv3ERb9+UNjPMt8jWoaiZv44F6ci9TaERI0X9mOBMYFjRvZurv cMHhGjpvHVClC78yjvF64shk+j7U4k+dt5VYAwCAWislXpQtecsj1FHw7hFDlBqIHXdq AzwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=/OThl2TJ86i+d/Z9onNMKzzml/86evlKk1D8sXUWm3s=; b=LhMPU3ioOfKO0v/LZkeop74nY8jJvh5YeE7YnIPnGnvSPcMlKqr2DrN5AduZBcwBzS tjOMuDCg9rVVEn87G5s51HyW9d5tjZ5/AHWMT6wq6LzeCj5BZ5N8lPTzQYPHBs2SuZgd qre0y8oKj8X7A9Sno9VfUnZH4l0i987fjSkbL16Cax+bKGVAWxYZC/PGckVI6kTd6Bs6 M5oH1/YOeHKVoPSPWKBtntHW4yKZ//svb8xSgOHNH/4KBgPnnnGh7+rS2aBx1QkIpUL4 0Lj36GeUDunKl5WBSeRMlSPqVbfG0jlE2eGF83zDO51rKrgaNP1y6dn5AYBqa4QHxHlL ehrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=spoXp4ym; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p5si7324229edt.42.2021.04.02.11.45.52; Fri, 02 Apr 2021 11:46:16 -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=@gmail.com header.s=20161025 header.b=spoXp4ym; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231443AbhDBSp1 (ORCPT + 99 others); Fri, 2 Apr 2021 14:45:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbhDBSp1 (ORCPT ); Fri, 2 Apr 2021 14:45:27 -0400 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06F01C0613E6 for ; Fri, 2 Apr 2021 11:45:26 -0700 (PDT) Received: by mail-io1-xd2e.google.com with SMTP id r193so3235764ior.9 for ; Fri, 02 Apr 2021 11:45:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=/OThl2TJ86i+d/Z9onNMKzzml/86evlKk1D8sXUWm3s=; b=spoXp4ymwf+FzwwvTbLnfHRGKw2cJp5whg010ZpGpMj7Je/U9GpUX6h6Shj6vEnj2V 2pp5bM13UMj8HBbM4e2Vp0mulbICA5btgWbxg5n8kuhbvRBwdQ2Sqxcr4EXaXFrFyGCy hzWx5OJj9NkNVwIpEQSB2Nmw9EqP5y6PpWTSmkRP0+RAxS5p4DSEeMb/nOfHbuZjXzSn aFIusYmUpIEbZM8XuaIqO1SXNamHYjSKcmwZSKPDq9TbxZs8POr5ji4EDRBgo9lLzglR q1FL2F4XNE+T4ISBWzkZfA8NAk3Tcm7mFWPxpn/Y6/+fa9GcFZBsUPajvlorufdoNmpS VoNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=/OThl2TJ86i+d/Z9onNMKzzml/86evlKk1D8sXUWm3s=; b=EY1lUybvTvuzo/9oZk7X/y9p4AY+BeECVMD1/adEGPns1wy/NOjJP9yz20I8qIZmc+ 8OL1OrAPRbvnFR5Uv/Q6d9120WKyxFn1+dlZlZq+dIYfdzqPfFbOV5FG9b2dLzADZLfO 7neyOgg5T9V7T0kAhPFNkMvyEQ6731qJDEjRlTbTRGuX+JVVOFWr6KLQxo41NKUMfnkC UKW7sIJBIMU2iflxSyfPQOLfKsvwzUIRuVZDxt0NAuZYM6vJUA7M9Zw4waKvoCC4scXS M8e3LbqMb93CuFSPgLaTOXKDSFrAGbXk6ECgOaq278nBN3doySqCE+lFe9rp+JH1CBOi SNNw== X-Gm-Message-State: AOAM533RlpuLv0RqEvbzteoxSo17lWB/dlFKHG4viraWEN53hu62wDnh tx0QY5FkEY+2HA2/Njc9RqIAmgPX4Z22TA5Ox2A= X-Received: by 2002:a5d:9d13:: with SMTP id j19mr12186378ioj.110.1617389125411; Fri, 02 Apr 2021 11:45:25 -0700 (PDT) MIME-Version: 1.0 References: <20210211194258.4137998-1-nathan@kernel.org> <161428829728.2305454.15456455443457551559.b4-ty@chromium.org> <202104021125.53164550A@keescook> <20210402183110.zmnuoc74mzil3tml@archlinux-ax161> In-Reply-To: <20210402183110.zmnuoc74mzil3tml@archlinux-ax161> Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Fri, 2 Apr 2021 20:44:49 +0200 Message-ID: Subject: Re: [PATCH] qemu_fw_cfg: Make fw_cfg_rev_attr a proper kobj_attribute To: Nathan Chancellor Cc: Kees Cook , Gabriel Somlo , "Michael S. Tsirkin" , linux-kernel@vger.kernel.org, Nick Desaulniers , qemu-devel@nongnu.org, Clang-Built-Linux ML , Sami Tolvanen Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 2, 2021 at 8:31 PM Nathan Chancellor wrote: > > On Fri, Apr 02, 2021 at 11:25:42AM -0700, Kees Cook wrote: > > On Fri, Apr 02, 2021 at 08:42:07AM +0200, Sedat Dilek wrote: > > > On Thu, Feb 25, 2021 at 10:25 PM Kees Cook wrote: > > > > > > > > On Thu, 11 Feb 2021 12:42:58 -0700, Nathan Chancellor wrote: > > > > > fw_cfg_showrev() is called by an indirect call in kobj_attr_show(), > > > > > which violates clang's CFI checking because fw_cfg_showrev()'s second > > > > > parameter is 'struct attribute', whereas the ->show() member of 'struct > > > > > kobj_structure' expects the second parameter to be of type 'struct > > > > > kobj_attribute'. > > > > > > > > > > $ cat /sys/firmware/qemu_fw_cfg/rev > > > > > 3 > > > > > > > > > > [...] > > > > > > > > Applied to kspp/cfi/cleanups, thanks! > > > > > > > > [1/1] qemu_fw_cfg: Make fw_cfg_rev_attr a proper kobj_attribute > > > > https://git.kernel.org/kees/c/f5c4679d6c49 > > > > > > > > > > I have queued this up in my custom patchset > > > (for-5.12/kspp-cfi-cleanups-20210225). > > > > > > What is the plan to get this upstream? > > > > I haven't sent it to Linus yet -- I was expecting to batch more of these > > and send them for v5.13. (But if the kvm folks snag it, that's good > > too.) > > I am going to be putting the CFI series through its paces on both arm64 > and x86_64 over the next week or so on several different machines (in > fact, I am writing up a report right now) so I will probably have some > more of these as I find them. > This was just a friendly ping. Sami has sent some patches which I reported in the early stage of clang-cfi (x86-64) through subtree maintainers. It's up to you Nathan or kvm folks. Upstreamed patches means to me a RDC-ed custom patchset. - Sedat -