From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63B36C3A59F for ; Mon, 26 Aug 2019 15:58:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 265E8217F5 for ; Mon, 26 Aug 2019 15:58:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566835081; bh=blUYG8ZxI4V85CCdRu6wwyVrWFwoe8m7ktk5ZMl8OdU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=ZUbKFWgS61BJM/BkXXAUJmID9o4URdvgoz/jfkzXTIMJxA0/qkn9+w4bgYRSTkMOn 8DmU3Wu8Vw44RR7A7vDiY/cmKw3BmlIFbeQENs0TodSdVqFXUQlbV0LdeCaSLziTbr +wRITGB8k6czhAreoWRnmreu1LbfTe28t/Y414Wk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732325AbfHZP6A (ORCPT ); Mon, 26 Aug 2019 11:58:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:60902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727864AbfHZP56 (ORCPT ); Mon, 26 Aug 2019 11:57:58 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C369620828; Mon, 26 Aug 2019 15:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566835077; bh=blUYG8ZxI4V85CCdRu6wwyVrWFwoe8m7ktk5ZMl8OdU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GBnmuK7Pv1FZCHS+Livxfezz4rL3sDkZZ+RwyLnRlwoMa56BTxvqZOBdxs42Yh5op S7+MjUjLraULqNWCgT8f0CmoKTO/dSXf0J4YVUptakeIlhn5aaHGbrE7EvuvmMJgGo Gm1Oj30vyfO98acaBe7IC1QYe6ai1wJhWrAZVl5A= Date: Mon, 26 Aug 2019 17:57:54 +0200 From: Greg Kroah-Hartman To: Nayna Cc: Nayna Jain , linuxppc-dev@ozlabs.org, linux-efi@vger.kernel.org, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Ard Biesheuvel , Jeremy Kerr , Matthew Garret , Mimi Zohar , Claudio Carvalho , George Wilson , Elaine Palmer , Eric Ricther , Oliver O'Halloran Subject: Re: [PATCH v3 2/4] powerpc: expose secure variables to userspace via sysfs Message-ID: <20190826155754.GA489@kroah.com> References: <1566825818-9731-1-git-send-email-nayna@linux.ibm.com> <1566825818-9731-3-git-send-email-nayna@linux.ibm.com> <20190826145649.GA27342@kroah.com> <2c5b8ba3-e5a3-5c80-a291-ea9965db2019@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2c5b8ba3-e5a3-5c80-a291-ea9965db2019@linux.vnet.ibm.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 26, 2019 at 11:46:11AM -0400, Nayna wrote: > > > On 08/26/2019 10:56 AM, Greg Kroah-Hartman wrote: > > On Mon, Aug 26, 2019 at 09:23:36AM -0400, Nayna Jain wrote: > > > +static struct kobj_attribute size_attr = __ATTR_RO(size); > > Wait, why not just normal ATTR_RO()? > > Oh!! Sorry. I am not seeing this macro in sysfs.h. am I missing something ? Ugh, no, you are right, I thought it was there as the BIN_ATTR_RO() one was there :) > > > +static struct bin_attribute data_attr = __BIN_ATTR_RO(data, VARIABLE_MAX_SIZE); > > And BIN_ATTR_RO() here? > > This would have worked. I think I just thought to use the same way as > __ATTR_RO(). Yes, that's fine to use, sorry for the noise. greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E354FC3A59F for ; Mon, 26 Aug 2019 16:15:47 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6237F20679 for ; Mon, 26 Aug 2019 16:15:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="GBnmuK7P" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6237F20679 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46HHDK1Jg6zDqXs for ; Tue, 27 Aug 2019 02:15:45 +1000 (AEST) Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46HGqt3BgRzDqXm for ; Tue, 27 Aug 2019 01:58:02 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="GBnmuK7P"; dkim-atps=neutral Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by bilbo.ozlabs.org (Postfix) with ESMTP id 46HGqt0cpxz8swG for ; Tue, 27 Aug 2019 01:58:02 +1000 (AEST) Received: by ozlabs.org (Postfix) id 46HGqs6hKLz9sN1; Tue, 27 Aug 2019 01:58:01 +1000 (AEST) Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linuxfoundation.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=gregkh@linuxfoundation.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="GBnmuK7P"; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46HGqs0xcsz9sBF; Tue, 27 Aug 2019 01:57:59 +1000 (AEST) Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C369620828; Mon, 26 Aug 2019 15:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566835077; bh=blUYG8ZxI4V85CCdRu6wwyVrWFwoe8m7ktk5ZMl8OdU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GBnmuK7Pv1FZCHS+Livxfezz4rL3sDkZZ+RwyLnRlwoMa56BTxvqZOBdxs42Yh5op S7+MjUjLraULqNWCgT8f0CmoKTO/dSXf0J4YVUptakeIlhn5aaHGbrE7EvuvmMJgGo Gm1Oj30vyfO98acaBe7IC1QYe6ai1wJhWrAZVl5A= Date: Mon, 26 Aug 2019 17:57:54 +0200 From: Greg Kroah-Hartman To: Nayna Subject: Re: [PATCH v3 2/4] powerpc: expose secure variables to userspace via sysfs Message-ID: <20190826155754.GA489@kroah.com> References: <1566825818-9731-1-git-send-email-nayna@linux.ibm.com> <1566825818-9731-3-git-send-email-nayna@linux.ibm.com> <20190826145649.GA27342@kroah.com> <2c5b8ba3-e5a3-5c80-a291-ea9965db2019@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2c5b8ba3-e5a3-5c80-a291-ea9965db2019@linux.vnet.ibm.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-efi@vger.kernel.org, Ard Biesheuvel , Eric Ricther , Nayna Jain , linux-kernel@vger.kernel.org, Mimi Zohar , Claudio Carvalho , Matthew Garret , linuxppc-dev@ozlabs.org, Paul Mackerras , Jeremy Kerr , Elaine Palmer , Oliver O'Halloran , linux-integrity@vger.kernel.org, George Wilson Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, Aug 26, 2019 at 11:46:11AM -0400, Nayna wrote: > > > On 08/26/2019 10:56 AM, Greg Kroah-Hartman wrote: > > On Mon, Aug 26, 2019 at 09:23:36AM -0400, Nayna Jain wrote: > > > +static struct kobj_attribute size_attr = __ATTR_RO(size); > > Wait, why not just normal ATTR_RO()? > > Oh!! Sorry. I am not seeing this macro in sysfs.h. am I missing something ? Ugh, no, you are right, I thought it was there as the BIN_ATTR_RO() one was there :) > > > +static struct bin_attribute data_attr = __BIN_ATTR_RO(data, VARIABLE_MAX_SIZE); > > And BIN_ATTR_RO() here? > > This would have worked. I think I just thought to use the same way as > __ATTR_RO(). Yes, that's fine to use, sorry for the noise. greg k-h