Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp877840yba; Mon, 1 Apr 2019 19:53:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdjB+nfN6zG8HXqTNelvN9eeT51QJzZ9sWHrNsrh8JCa/HM15jaHl3USFbopVNKc3q7OIP X-Received: by 2002:a65:4247:: with SMTP id d7mr45633075pgq.114.1554173621096; Mon, 01 Apr 2019 19:53:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554173621; cv=none; d=google.com; s=arc-20160816; b=z4YKjpjT5DroT5QAH+0950zr/W3sLlCg7pSmK9deCY3tMZaXfQyQZzu3siGrNnFOeA JLaqM0uVanYczYNYadIC91O92aIb7iuFfwJejZ3ydoDTrCLFc9/9/XWDHz0+seTAqK8j Ggn4P9cPqZwVlzQZ4Wl+BjtnI8+4hvFy4E26vk3k6ndMokuemRXUzsxuUWe34UXF85dF WXDEETLuIwG4q4kiUyeX7Nv98uQPKgDVdt7IikSfz/ZgEWOur0ExaIDhqwuDUc2NJuG2 BQLhZ2kFb5bvg8SM8BoQINsQfjL4cSjQabxE/HHG+0a2knii3H1ya5CyMh4mM4GfyVAl RLGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wIWPyD9h3bQgfe9zg0uJ+mpqYiO9JDv7lJfMFW8Van8=; b=L9XgvsvXvo6/BIbzUju2Azfx4bh34Z5ZczWdaoRx9p7ERb6geyvpyEqr2FYUn4UQMy aeA4xn1ZNKsfs+JSrHklg5nZarLkYgSUDSsgrqzyR92FXyQzs1Pra7NRfbIdPty+kk8E HR509rCdBEkJBfGay83X9YbLI3VNQNeaD0GoodSFy58W7Z1PzkLYPzmD5MRL/lGMUVJI DtH8mv5eR5ZiFIrV6QueOsBmZj3NQgfC2EW0Mu+uAz+6TFgzoz93FeqL9Qhw/Y7nBWVz jc6yT+KOYU7Z7HK/nyarYgH0VSfxoBkQAHKqdguwjxHbfhUGAb556c+bwvmbI1mLkiVa 3i0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pu6ENkUE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id z13si10083424pgv.508.2019.04.01.19.53.25; Mon, 01 Apr 2019 19:53:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pu6ENkUE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1729036AbfDBCwC (ORCPT + 99 others); Mon, 1 Apr 2019 22:52:02 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:41496 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726269AbfDBCwC (ORCPT ); Mon, 1 Apr 2019 22:52:02 -0400 Received: by mail-io1-f65.google.com with SMTP id v10so9632575iom.8; Mon, 01 Apr 2019 19:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wIWPyD9h3bQgfe9zg0uJ+mpqYiO9JDv7lJfMFW8Van8=; b=pu6ENkUERaepnoXNksV4QvU537rbXFkWw/BpofYn8fZ6SwKMEji6wjD3zWFAFVHGou QbSZua7CYQIgrX1JHp6S+8bOVvaPeN7+RXkd10ETJilMlbV/5BEHqvqVx1B03h37b6TJ YPNyge2NBLsgejuBXU55T7s5Yl0pBm4hIQAqUGkWeFaboYbNyVl9Y7foQ8UPOHpmh4Oh ZYxSXMw+0arVaH8sD+hE3vx3jZRW1PkOGrHHkocq5uGYGIsyJejeAslGtoE6HWPKknfs BgkQ+KeU8TCsFupIZi4IXbsYLehxRQllCZl4jO3cR9CXz8Ut67CX0qptbOG7XpTfoLMY ZdPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wIWPyD9h3bQgfe9zg0uJ+mpqYiO9JDv7lJfMFW8Van8=; b=ZfVUDWVJWJuPHYRGrSKU/c4zJXlkoIkWbRZeutM760v/dqNsUcdsCjbaRJ+aVA7as6 X3B3Y9bRGhbTFQBwVmhI6L5Dqtum+XdZBbdmST6Q+XE7vk0SCrSySOx0Y17fNApQDbVg Pa+ysznOkLksnu6AGMwp1vc9e2SsPaXGztc2S7nLwgcXi4JQ6eJq0ByUJaFZmLG2wlEA bOsEmvZrpJ+WJlNobS1TttggPLD5shIqBDuvs2PuijTlSC6ZJZmlN1TYiw+6I913p3Zj GgyzJa7PLzmqlZRcDl9nbwlw9Hw4d7RTbhQ8hxB9TpRrEHRx4y9+mbMWaBSJPo7EMz1w mIiw== X-Gm-Message-State: APjAAAV3A5gH3CUwvr7dh8czCKK45O8TgcuGfmv3qy0nsA0OOwr7x0RW PJi2ZC28AGi38FAWuf3TNRk= X-Received: by 2002:a6b:e009:: with SMTP id z9mr30739152iog.127.1554173521377; Mon, 01 Apr 2019 19:52:01 -0700 (PDT) Received: from ubu (2600-6c48-437f-c81d-984d-b4e8-0abe-7e26.dhcp6.chtrptr.net. [2600:6c48:437f:c81d:984d:b4e8:abe:7e26]) by smtp.gmail.com with ESMTPSA id h133sm6506558itb.34.2019.04.01.19.52.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Apr 2019 19:52:00 -0700 (PDT) Date: Mon, 1 Apr 2019 22:51:58 -0400 From: Kimberly Brown To: Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 8/8] livepatch: Replace klp_ktype_patch's default_attrs with groups Message-ID: <1571eb59b1d523aac81d524ae20a56cf378ef9c4.1554151487.git.kimbrownkd@gmail.com> References: <20190322201440.GA30814@ubu-Virtual-Machine> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The kobj_type default_attrs field is being replaced by the default_groups field. Replace klp_ktype_patch's default_attrs field with default_groups and use the ATTRIBUTE_GROUPS macro to create klp_patch_groups. This patch was tested by loading the livepatch-sample module and verifying that the sysfs files for the attributes in the default groups were created. Signed-off-by: Kimberly Brown --- kernel/livepatch/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index eb0ee10a1981..34a8338657d2 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -419,6 +419,7 @@ static struct attribute *klp_patch_attrs[] = { &force_kobj_attr.attr, NULL }; +ATTRIBUTE_GROUPS(klp_patch); static void klp_free_object_dynamic(struct klp_object *obj) { @@ -546,7 +547,7 @@ static void klp_kobj_release_patch(struct kobject *kobj) static struct kobj_type klp_ktype_patch = { .release = klp_kobj_release_patch, .sysfs_ops = &kobj_sysfs_ops, - .default_attrs = klp_patch_attrs, + .default_groups = klp_patch_groups, }; static void klp_kobj_release_object(struct kobject *kobj) -- 2.17.1