All of lore.kernel.org
 help / color / mirror / Atom feed
* [jolsa-perf:kprobe/multi 4/14] kernel/kprobes.c:1721:10: error: implicit declaration of function 'check_ftrace_multi'
From: kernel test robot @ 2022-01-05 15:17 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 8728 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git kprobe/multi
head:   27d253a29de023f664387fcc049edeeaadf23c8e
commit: fbf6ec1e4f8e6c1fed1e1d14f16595e2dc01902d [4/14] kprobe: Add support to register multiple ftrace kprobes
config: i386-randconfig-r021-20220105 (https://download.01.org/0day-ci/archive/20220105/202201052322.kMqJ0XlX-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d5b6e30ed3acad794dd0aec400e617daffc6cc3d)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id=fbf6ec1e4f8e6c1fed1e1d14f16595e2dc01902d
        git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
        git fetch --no-tags jolsa-perf kprobe/multi
        git checkout fbf6ec1e4f8e6c1fed1e1d14f16595e2dc01902d
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from kernel/kprobes.c:23:
   include/linux/kprobes.h:77:21: error: field has incomplete type 'struct ftrace_ops'
                   struct ftrace_ops ops;
                                     ^
   include/linux/ftrace.h:332:8: note: forward declaration of 'struct ftrace_ops'
   struct ftrace_ops;
          ^
>> kernel/kprobes.c:1721:10: error: implicit declaration of function 'check_ftrace_multi' [-Werror,-Wimplicit-function-declaration]
                   return check_ftrace_multi(p);
                          ^
>> kernel/kprobes.c:1916:3: error: implicit declaration of function 'free_ftrace_multi' [-Werror,-Wimplicit-function-declaration]
                   free_ftrace_multi(ap);
                   ^
   kernel/kprobes.c:1916:3: note: did you mean 'kprobe_ftrace_multi'?
   include/linux/kprobes.h:145:20: note: 'kprobe_ftrace_multi' declared here
   static inline bool kprobe_ftrace_multi(struct kprobe *p)
                      ^
   3 errors generated.


vim +/check_ftrace_multi +1721 kernel/kprobes.c

  1713	
  1714	static int check_addr(struct kprobe *p, struct module **probed_mod)
  1715	{
  1716		int ret;
  1717		kprobe_opcode_t *addr;
  1718	
  1719	#ifdef CONFIG_HAVE_KPROBES_MULTI_ON_FTRACE
  1720		if (p->multi.cnt)
> 1721			return check_ftrace_multi(p);
  1722	#endif
  1723	
  1724		/* Adjust probe address from symbol */
  1725		addr = kprobe_addr(p);
  1726		if (IS_ERR(addr))
  1727			return PTR_ERR(addr);
  1728		p->addr = addr;
  1729		p->func_addr = resolve_func_addr(addr);
  1730	
  1731		ret = warn_kprobe_rereg(p);
  1732		if (ret)
  1733			return ret;
  1734		return check_kprobe_address_safe(p, probed_mod);
  1735	}
  1736	
  1737	int register_kprobe(struct kprobe *p)
  1738	{
  1739		struct module *probed_mod = NULL;
  1740		struct kprobe *old_p;
  1741		int ret;
  1742	
  1743		/* User can pass only KPROBE_FLAG_DISABLED to register_kprobe */
  1744		p->flags &= KPROBE_FLAG_DISABLED;
  1745		p->nmissed = 0;
  1746		INIT_LIST_HEAD(&p->list);
  1747	
  1748		ret = check_addr(p, &probed_mod);
  1749		if (ret)
  1750			return ret;
  1751	
  1752		mutex_lock(&kprobe_mutex);
  1753	
  1754		old_p = get_kprobe(p->addr);
  1755		if (old_p) {
  1756			/* Since this may unoptimize 'old_p', locking 'text_mutex'. */
  1757			ret = register_aggr_kprobe(old_p, p);
  1758			goto out;
  1759		}
  1760	
  1761		cpus_read_lock();
  1762		/* Prevent text modification */
  1763		mutex_lock(&text_mutex);
  1764		ret = prepare_kprobe(p);
  1765		mutex_unlock(&text_mutex);
  1766		cpus_read_unlock();
  1767		if (ret)
  1768			goto out;
  1769	
  1770		/*
  1771		 * Multi ftrace kprobes do not have single address,
  1772		 * so they are not stored in the kprobe_table hash.
  1773		 */
  1774		if (kprobe_single(p)) {
  1775			INIT_HLIST_NODE(&p->hlist);
  1776			hlist_add_head_rcu(&p->hlist,
  1777				       &kprobe_table[hash_ptr(p->addr, KPROBE_HASH_BITS)]);
  1778		}
  1779	
  1780		if (!kprobes_all_disarmed && !kprobe_disabled(p)) {
  1781			ret = arm_kprobe(p);
  1782			if (ret) {
  1783				if (kprobe_single(p))
  1784					hlist_del_rcu(&p->hlist);
  1785				synchronize_rcu();
  1786				goto out;
  1787			}
  1788		}
  1789	
  1790		/* Try to optimize kprobe */
  1791		try_to_optimize_kprobe(p);
  1792	out:
  1793		mutex_unlock(&kprobe_mutex);
  1794	
  1795		if (probed_mod)
  1796			module_put(probed_mod);
  1797	
  1798		return ret;
  1799	}
  1800	EXPORT_SYMBOL_GPL(register_kprobe);
  1801	
  1802	/* Check if all probes on the 'ap' are disabled. */
  1803	static bool aggr_kprobe_disabled(struct kprobe *ap)
  1804	{
  1805		struct kprobe *kp;
  1806	
  1807		lockdep_assert_held(&kprobe_mutex);
  1808	
  1809		list_for_each_entry(kp, &ap->list, list)
  1810			if (!kprobe_disabled(kp))
  1811				/*
  1812				 * Since there is an active probe on the list,
  1813				 * we can't disable this 'ap'.
  1814				 */
  1815				return false;
  1816	
  1817		return true;
  1818	}
  1819	
  1820	static struct kprobe *__disable_kprobe(struct kprobe *p)
  1821	{
  1822		struct kprobe *orig_p;
  1823		int ret;
  1824	
  1825		lockdep_assert_held(&kprobe_mutex);
  1826	
  1827		/* Get an original kprobe for return */
  1828		orig_p = __get_valid_kprobe(p);
  1829		if (unlikely(orig_p == NULL))
  1830			return ERR_PTR(-EINVAL);
  1831	
  1832		if (!kprobe_disabled(p)) {
  1833			/* Disable probe if it is a child probe */
  1834			if (p != orig_p)
  1835				p->flags |= KPROBE_FLAG_DISABLED;
  1836	
  1837			/* Try to disarm and disable this/parent probe */
  1838			if (p == orig_p || aggr_kprobe_disabled(orig_p)) {
  1839				/*
  1840				 * If 'kprobes_all_disarmed' is set, 'orig_p'
  1841				 * should have already been disarmed, so
  1842				 * skip unneed disarming process.
  1843				 */
  1844				if (!kprobes_all_disarmed) {
  1845					ret = disarm_kprobe(orig_p, true);
  1846					if (ret) {
  1847						p->flags &= ~KPROBE_FLAG_DISABLED;
  1848						return ERR_PTR(ret);
  1849					}
  1850				}
  1851				orig_p->flags |= KPROBE_FLAG_DISABLED;
  1852			}
  1853		}
  1854	
  1855		return orig_p;
  1856	}
  1857	
  1858	/*
  1859	 * Unregister a kprobe without a scheduler synchronization.
  1860	 */
  1861	static int __unregister_kprobe_top(struct kprobe *p)
  1862	{
  1863		struct kprobe *ap, *list_p;
  1864	
  1865		/* Disable kprobe. This will disarm it if needed. */
  1866		ap = __disable_kprobe(p);
  1867		if (IS_ERR(ap))
  1868			return PTR_ERR(ap);
  1869	
  1870		if (ap == p)
  1871			/*
  1872			 * This probe is an independent(and non-optimized) kprobe
  1873			 * (not an aggrprobe). Remove from the hash list.
  1874			 */
  1875			goto disarmed;
  1876	
  1877		/* Following process expects this probe is an aggrprobe */
  1878		WARN_ON(!kprobe_aggrprobe(ap));
  1879	
  1880		if (list_is_singular(&ap->list) && kprobe_disarmed(ap))
  1881			/*
  1882			 * !disarmed could be happen if the probe is under delayed
  1883			 * unoptimizing.
  1884			 */
  1885			goto disarmed;
  1886		else {
  1887			/* If disabling probe has special handlers, update aggrprobe */
  1888			if (p->post_handler && !kprobe_gone(p)) {
  1889				list_for_each_entry(list_p, &ap->list, list) {
  1890					if ((list_p != p) && (list_p->post_handler))
  1891						goto noclean;
  1892				}
  1893				ap->post_handler = NULL;
  1894			}
  1895	noclean:
  1896			/*
  1897			 * Remove from the aggrprobe: this path will do nothing in
  1898			 * __unregister_kprobe_bottom().
  1899			 */
  1900			list_del_rcu(&p->list);
  1901			if (!kprobe_disabled(ap) && !kprobes_all_disarmed)
  1902				/*
  1903				 * Try to optimize this probe again, because post
  1904				 * handler may have been changed.
  1905				 */
  1906				optimize_kprobe(ap);
  1907		}
  1908		return 0;
  1909	
  1910	disarmed:
  1911		if (kprobe_single(ap))
  1912			hlist_del_rcu(&ap->hlist);
  1913	
  1914	#ifdef CONFIG_HAVE_KPROBES_MULTI_ON_FTRACE
  1915		if (kprobe_ftrace_multi(ap))
> 1916			free_ftrace_multi(ap);
  1917	#endif
  1918		return 0;
  1919	}
  1920	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply

* [PATCH v2 2/2] hwmon: Add "label" attribute
From: Paul Cercueil @ 2022-01-05 15:15 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, Jonathan Corbet
  Cc: linux-hwmon, linux-kernel, linux-doc, list, Paul Cercueil,
	Cosmin Tanislav
In-Reply-To: <20220105151551.20285-1-paul@crapouillou.net>

If a label is defined in the device tree for this device add that
to the device specific attributes. This is useful for userspace to
be able to identify an individual device when multiple identical
chips are present in the system.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
---

Notes:
    v2: - Cache label into hwmon_device
        - Rename hwmon_dev_name_is_visible() to hwmon_dev_attr_is_visible()
	- Add missing <linux/property.h> include

 drivers/hwmon/hwmon.c | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
index 3501a3ead4ba..22e1b47c09fc 100644
--- a/drivers/hwmon/hwmon.c
+++ b/drivers/hwmon/hwmon.c
@@ -18,6 +18,7 @@
 #include <linux/list.h>
 #include <linux/module.h>
 #include <linux/pci.h>
+#include <linux/property.h>
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/thermal.h>
@@ -30,6 +31,7 @@
 
 struct hwmon_device {
 	const char *name;
+	const char *label;
 	struct device dev;
 	const struct hwmon_chip_info *chip;
 	struct list_head tzdata;
@@ -71,17 +73,29 @@ name_show(struct device *dev, struct device_attribute *attr, char *buf)
 }
 static DEVICE_ATTR_RO(name);
 
+static ssize_t
+label_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+	return sysfs_emit(buf, "%s\n", to_hwmon_device(dev)->label);
+}
+static DEVICE_ATTR_RO(label);
+
 static struct attribute *hwmon_dev_attrs[] = {
 	&dev_attr_name.attr,
+	&dev_attr_label.attr,
 	NULL
 };
 
-static umode_t hwmon_dev_name_is_visible(struct kobject *kobj,
+static umode_t hwmon_dev_attr_is_visible(struct kobject *kobj,
 					 struct attribute *attr, int n)
 {
 	struct device *dev = kobj_to_dev(kobj);
+	struct hwmon_device *hdev = to_hwmon_device(dev);
 
-	if (to_hwmon_device(dev)->name == NULL)
+	if (attr == &dev_attr_name.attr && hdev->name == NULL)
+		return 0;
+
+	if (attr == &dev_attr_label.attr && hdev->label == NULL)
 		return 0;
 
 	return attr->mode;
@@ -89,7 +103,7 @@ static umode_t hwmon_dev_name_is_visible(struct kobject *kobj,
 
 static const struct attribute_group hwmon_dev_attr_group = {
 	.attrs		= hwmon_dev_attrs,
-	.is_visible	= hwmon_dev_name_is_visible,
+	.is_visible	= hwmon_dev_attr_is_visible,
 };
 
 static const struct attribute_group *hwmon_dev_attr_groups[] = {
@@ -117,6 +131,7 @@ static void hwmon_dev_release(struct device *dev)
 	if (hwdev->group.attrs)
 		hwmon_free_attrs(hwdev->group.attrs);
 	kfree(hwdev->groups);
+	kfree(hwdev->label);
 	kfree(hwdev);
 }
 
@@ -733,6 +748,7 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
 			const struct attribute_group **groups)
 {
 	struct hwmon_device *hwdev;
+	const char *label;
 	struct device *hdev;
 	int i, err, id;
 
@@ -752,6 +768,18 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
 		goto ida_remove;
 	}
 
+	if (device_property_present(dev, "label")) {
+		err = device_property_read_string(dev, "label", &label);
+		if (err < 0)
+			goto free_hwmon;
+
+		hwdev->label = kstrdup(label, GFP_KERNEL);
+		if (hwdev->label == NULL) {
+			err = -ENOMEM;
+			goto free_hwmon;
+		}
+	}
+
 	hdev = &hwdev->dev;
 
 	if (chip) {
-- 
2.34.1


^ permalink raw reply related

* [PATCH v2 1/2] ABI: hwmon: Document "label" sysfs attribute
From: Paul Cercueil @ 2022-01-05 15:15 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, Jonathan Corbet
  Cc: linux-hwmon, linux-kernel, linux-doc, list, Paul Cercueil
In-Reply-To: <20220105151551.20285-1-paul@crapouillou.net>

Add the "label" sysfs attribute, which can contain a descriptive label
that allows to uniquely identify a device within the system.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---

Notes:
    v2: New patch

 Documentation/ABI/testing/sysfs-class-hwmon | 8 ++++++++
 Documentation/hwmon/sysfs-interface.rst     | 4 ++++
 2 files changed, 12 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-class-hwmon b/Documentation/ABI/testing/sysfs-class-hwmon
index 1f20687def44..653d4c75eddb 100644
--- a/Documentation/ABI/testing/sysfs-class-hwmon
+++ b/Documentation/ABI/testing/sysfs-class-hwmon
@@ -9,6 +9,14 @@ Description:
 
 		RO
 
+What:		/sys/class/hwmon/hwmonX/label
+Description:
+		A descriptive label that allows to uniquely identify a
+		device within the system.
+		The contents of the label are free-form.
+
+		RO
+
 What:		/sys/class/hwmon/hwmonX/update_interval
 Description:
 		The interval at which the chip will update readings.
diff --git a/Documentation/hwmon/sysfs-interface.rst b/Documentation/hwmon/sysfs-interface.rst
index 85652a6aaa3e..209626fb2405 100644
--- a/Documentation/hwmon/sysfs-interface.rst
+++ b/Documentation/hwmon/sysfs-interface.rst
@@ -99,6 +99,10 @@ Global attributes
 `name`
 		The chip name.
 
+`label`
+		A descriptive label that allows to uniquely identify a device
+		within the system.
+
 `update_interval`
 		The interval at which the chip will update readings.
 
-- 
2.34.1


^ permalink raw reply related

* Re: [PATCH v1 05/34] ci: explicitly skip I/O tests on alpine
From: Thomas Huth @ 2022-01-05 15:14 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, Beraldo Leal, f4bug, Wainer dos Santos Moschetta,
	stefanha, crosa, pbonzini, Philippe Mathieu-Daudé, aurelien
In-Reply-To: <20220105135009.1584676-6-alex.bennee@linaro.org>

On 05/01/2022 14.49, Alex Bennée wrote:
> From: Daniel P. Berrangé <berrange@redhat.com>
> 
> The block I/O tests don't work on Alpine because their alternative libc
> impl emits different strings for errnos, which breaks the expected
> output matching. e.g.
> 
> === IO: pattern 102
>   wrote 512/512 bytes at offset 512
>   512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> -qemu-img: Error while reading offset 0 of blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: Input/output error
> +qemu-img: Error while reading offset 0 of blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: I/O error
>   4
>   Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
>   Formatting 'TEST_DIR/t.IMGFMT.2', fmt=IMGFMT size=0
> 
> Currently the I/O tests are skipped as a side effect of the Alpine image
> containing a minimal busybox 'sed' binary, rather than GNU sed. This is
> a fragile assumption that will be invalidated when the dockerfile is
> changed to be autogenerated from a standardized package list that
> includes GNU sed.
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Message-Id: <20211215141949.3512719-6-berrange@redhat.com>
> ---
>   .gitlab-ci.d/buildtest.yml | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
> index 7e1cb0b3c2..e77aec873e 100644
> --- a/.gitlab-ci.d/buildtest.yml
> +++ b/.gitlab-ci.d/buildtest.yml
> @@ -24,7 +24,7 @@ check-system-alpine:
>         artifacts: true
>     variables:
>       IMAGE: alpine
> -    MAKE_CHECK_ARGS: check
> +    MAKE_CHECK_ARGS: check-unit check-qtest
>   
>   avocado-system-alpine:
>     extends: .avocado_test_job_template

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply

* [PATCH v2 0/2] hwmon: Add "label" attribute v2
From: Paul Cercueil @ 2022-01-05 15:15 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, Jonathan Corbet
  Cc: linux-hwmon, linux-kernel, linux-doc, list, Paul Cercueil

Hi Jean, Guenter,

A V2 of my patchset which allows specifying a hwmon device's label from
Device Tree. When the "label" device property is present, its value is
exported to the userspace via the "label" sysfs attribute.

This is useful for userspace to be able to identify an individual device
when multiple individual chips are present in the system.

Note that this mechanism already exists in IIO.

Patch [1/2] documents the ABI change.
Patch [2/2] adds the change to the core drivers/hwmon/hwmon.c file.

Changes from v1:
- The label is cached into the hwmon_device structure
- hwmon_dev_name_is_visible() renamed to hwmon_dev_attr_is_visible()
- Add missing <linux/property.h> include
- The DT binding documentation of the "label" property has been dropped,
  and the "label" property is now supported directly in dtschema.

Cheers,
-Paul


Paul Cercueil (2):
  ABI: hwmon: Document "label" sysfs attribute
  hwmon: Add "label" attribute

 Documentation/ABI/testing/sysfs-class-hwmon |  8 +++++
 Documentation/hwmon/sysfs-interface.rst     |  4 +++
 drivers/hwmon/hwmon.c                       | 34 +++++++++++++++++++--
 3 files changed, 43 insertions(+), 3 deletions(-)

-- 
2.34.1


^ permalink raw reply

* [PATCH v2] xfs: Remove redundant assignment of mp
From: Jiapeng Chong @ 2022-01-05 15:15 UTC (permalink / raw)
  To: djwong; +Cc: linux-xfs, linux-kernel, Jiapeng Chong, Abaci Robot

mp is being initialized to log->l_mp but this is never read
as record is overwritten later on. Remove the redundant
assignment.

Cleans up the following clang-analyzer warning:

fs/xfs/xfs_log_recover.c:3543:20: warning: Value stored to 'mp' during
its initialization is never read [clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
Changes in v2:
 -Remove mp = log->l_mp.

 fs/xfs/xfs_log_recover.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 8ecb9a8567b7..96c997ed2ec8 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -3550,8 +3550,6 @@ xlog_recover_check_summary(
 	uint64_t		ifree;
 	int			error;
 
-	mp = log->l_mp;
-
 	freeblks = 0LL;
 	itotal = 0LL;
 	ifree = 0LL;
-- 
2.20.1.7.g153144c


^ permalink raw reply related

* [PATCH 3/3] net: usb: r8152: remove unused definition
From: Aaron Ma @ 2022-01-05 15:14 UTC (permalink / raw)
  To: aaron.ma, kuba, henning.schild, linux-usb, netdev, linux-kernel
  Cc: davem, hayeswang, tiwai
In-Reply-To: <20220105151427.8373-1-aaron.ma@canonical.com>

Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
---
 drivers/net/usb/r8152.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 7cf2faf8d088..7cd3b1db062a 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -773,9 +773,6 @@ enum rtl8152_flags {
 	RX_EPROTO,
 };
 
-#define DEVICE_ID_THINKPAD_THUNDERBOLT3_DOCK_GEN2	0x3082
-#define DEVICE_ID_THINKPAD_USB_C_DOCK_GEN2		0xa387
-
 struct tally_counter {
 	__le64	tx_packets;
 	__le64	rx_packets;
-- 
2.30.2


^ permalink raw reply related

* [PATCH 2/3] net: usb: r8152: Set probe mode to sync
From: Aaron Ma @ 2022-01-05 15:14 UTC (permalink / raw)
  To: aaron.ma, kuba, henning.schild, linux-usb, netdev, linux-kernel
  Cc: davem, hayeswang, tiwai
In-Reply-To: <20220105151427.8373-1-aaron.ma@canonical.com>

To avoid the race of get passthrough MAC,
set probe mode to sync to check the used MAC address.

Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
---
 drivers/net/usb/r8152.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 2483dc421dff..7cf2faf8d088 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -29,6 +29,8 @@
 #include <crypto/hash.h>
 #include <linux/usb/r8152.h>
 
+static struct usb_driver rtl8152_driver;
+
 /* Information for net-next */
 #define NETNEXT_VERSION		"12"
 
@@ -9546,6 +9548,9 @@ static int rtl8152_probe(struct usb_interface *intf,
 	struct r8152 *tp;
 	struct net_device *netdev;
 	int ret;
+	struct device_driver *rtl8152_drv = &rtl8152_driver.drvwrap.driver;
+
+	rtl8152_drv->probe_type = PROBE_FORCE_SYNCHRONOUS;
 
 	if (version == RTL_VER_UNKNOWN)
 		return -ENODEV;
-- 
2.30.2


^ permalink raw reply related

* [PATCH 1/3 v3] net: usb: r8152: Check used MAC passthrough address
From: Aaron Ma @ 2022-01-05 15:14 UTC (permalink / raw)
  To: aaron.ma, kuba, henning.schild, linux-usb, netdev, linux-kernel
  Cc: davem, hayeswang, tiwai

When plugin multiple r8152 ethernet dongles to Lenovo Docks
or USB hub, MAC passthrough address from BIOS should be
checked if it had been used to avoid using on other dongles.

Currently builtin r8152 on Dock still can't be identified.
First detected r8152 will use the MAC passthrough address.

v2:
Skip builtin PCI MAC address which is share MAC address with
passthrough MAC.
Check thunderbolt based ethernet.

v3:
Add return value.

Fixes: f77b83b5bbab ("net: usb: r8152: Add MAC passthrough support for
more Lenovo Docks")
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
---
 drivers/net/usb/r8152.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index f9877a3e83ac..2483dc421dff 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -25,6 +25,7 @@
 #include <linux/atomic.h>
 #include <linux/acpi.h>
 #include <linux/firmware.h>
+#include <linux/pci.h>
 #include <crypto/hash.h>
 #include <linux/usb/r8152.h>
 
@@ -1605,6 +1606,7 @@ static int vendor_mac_passthru_addr_read(struct r8152 *tp, struct sockaddr *sa)
 	char *mac_obj_name;
 	acpi_object_type mac_obj_type;
 	int mac_strlen;
+	struct net_device *ndev;
 
 	if (tp->lenovo_macpassthru) {
 		mac_obj_name = "\\MACA";
@@ -1662,6 +1664,19 @@ static int vendor_mac_passthru_addr_read(struct r8152 *tp, struct sockaddr *sa)
 		ret = -EINVAL;
 		goto amacout;
 	}
+	rcu_read_lock();
+	for_each_netdev_rcu(&init_net, ndev) {
+		if (ndev->dev.parent && dev_is_pci(ndev->dev.parent) &&
+				!pci_is_thunderbolt_attached(to_pci_dev(ndev->dev.parent)))
+			continue;
+		if (strncmp(buf, ndev->dev_addr, 6) == 0) {
+			ret = -EINVAL;
+			rcu_read_unlock();
+			goto amacout;
+		}
+	}
+	rcu_read_unlock();
+
 	memcpy(sa->sa_data, buf, 6);
 	netif_info(tp, probe, tp->netdev,
 		   "Using pass-thru MAC addr %pM\n", sa->sa_data);
-- 
2.30.2


^ permalink raw reply related

* Re: [PATCH dt + pci 1/2] dt-bindings: Add 'slot-power-limit-milliwatt' PCIe port property
From: Pali Rohár @ 2022-01-05 15:14 UTC (permalink / raw)
  To: Rob Herring; +Cc: Marek Behún, devicetree, PCI, Bjorn Helgaas
In-Reply-To: <CAL_Jsq+HjnDfDb+V6dctNZy78Lbz92ULGzCvkTWwSyop_BKFtA@mail.gmail.com>

On Wednesday 05 January 2022 08:27:21 Rob Herring wrote:
> On Wed, Jan 5, 2022 at 8:14 AM Marek Behún <kabel@kernel.org> wrote:
> >
> > On Fri, 12 Nov 2021 09:25:20 -0600
> > Rob Herring <robh@kernel.org> wrote:
> >
> > > On Sun, Oct 31, 2021 at 04:07:05PM +0100, Marek Behún wrote:
> > > > From: Pali Rohár <pali@kernel.org>
> > > >
> > > > This property specifies slot power limit in mW unit. It is a form-factor
> > > > and board specific value and must be initialized by hardware.
> > > >
> > > > Some PCIe controllers delegate this work to software to allow hardware
> > > > flexibility and therefore this property basically specifies what should
> > > > host bridge program into PCIe Slot Capabilities registers.
> > > >
> > > > The property needs to be specified in mW unit instead of the special format
> > > > defined by Slot Capabilities (which encodes scaling factor or different
> > > > unit). Host drivers should convert the value from mW to needed format.
> > > >
> > > > Signed-off-by: Pali Rohár <pali@kernel.org>
> > > > Signed-off-by: Marek Behún <kabel@kernel.org>
> > > > ---
> > > >  Documentation/devicetree/bindings/pci/pci.txt | 6 ++++++
> > > >  1 file changed, 6 insertions(+)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt
> > > > index 6a8f2874a24d..7296d599c5ac 100644
> > > > --- a/Documentation/devicetree/bindings/pci/pci.txt
> > > > +++ b/Documentation/devicetree/bindings/pci/pci.txt
> > > > @@ -32,6 +32,12 @@ driver implementation may support the following properties:
> > > >     root port to downstream device and host bridge drivers can do programming
> > > >     which depends on CLKREQ signal existence. For example, programming root port
> > > >     not to advertise ASPM L1 Sub-States support if there is no CLKREQ signal.
> > > > +- slot-power-limit-miliwatt:
> > >
> > > Typo.
> > >
> > > But we shouldn't be adding to pci.txt. This needs to go in the
> > > schema[1]. Patch to devicetree-spec list or GH PR is fine.
> >
> > Hello Rob,
> >
> > Pali's PR draft https://github.com/devicetree-org/dt-schema/pull/64
> > looks like it's going to take some time to work out.
> >
> > In the meantime, is it possible to somehow get the
> > slot-power-limit-milliwatt property merged into pci.txt so that we can start
> > putting it into existing device-trees?
> >
> > Or would it break dt_bindings_check if it isn't put into dt-schema's
> > pci-bus.yaml?
> >
> > Or should we simply put it into current version of pci-bus.yaml and
> > work out the split proposed by Pali's PR afterwards?
> 
> In the existing pci-bus.yaml is fine.

Hello Rob! I do not think that it is possible to add this property
correctly in to the existing pci-bus.yaml file. As this file is not
prepared for slot properties. And I guess that adding new property at
"random" place is against the idea of schema validation (that validation
procedure accepts only valid DTS files).

^ permalink raw reply

* stable/linux-5.4.y build: 188 builds: 3 failed, 185 passed, 4 errors, 28 warnings (v5.4.170)
From: kernelci.org bot @ 2022-01-05 15:13 UTC (permalink / raw)
  To: stable, kernel-build-reports, kernelci-results

stable/linux-5.4.y build: 188 builds: 3 failed, 185 passed, 4 errors, 28 warnings (v5.4.170)

Full Build Summary: https://kernelci.org/build/stable/branch/linux-5.4.y/kernel/v5.4.170/

Tree: stable
Branch: linux-5.4.y
Git Describe: v5.4.170
Git Commit: 047dedaa38ce703d3c6a6b0fae180c85a5220cdb
Git URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Built: 7 unique architectures

Build Failures Detected:

arm:
    rpc_defconfig: (gcc-10) FAIL

mips:
    ip27_defconfig: (gcc-10) FAIL
    ip28_defconfig: (gcc-10) FAIL

Errors and Warnings Detected:

arc:

arm64:
    defconfig (gcc-10): 2 warnings
    defconfig+arm64-chromebook (gcc-10): 2 warnings

arm:
    assabet_defconfig (gcc-10): 1 warning
    collie_defconfig (gcc-10): 1 warning
    h3600_defconfig (gcc-10): 1 warning
    neponset_defconfig (gcc-10): 1 warning
    rpc_defconfig (gcc-10): 4 errors
    shannon_defconfig (gcc-10): 1 warning

i386:
    allnoconfig (gcc-10): 2 warnings
    i386_defconfig (gcc-10): 2 warnings
    tinyconfig (gcc-10): 2 warnings

mips:
    mtx1_defconfig (gcc-10): 3 warnings

riscv:

x86_64:
    allnoconfig (gcc-10): 3 warnings
    tinyconfig (gcc-10): 3 warnings
    x86_64_defconfig (gcc-10): 2 warnings
    x86_64_defconfig+x86-chromebook (gcc-10): 2 warnings

Errors summary:

    2    arm-linux-gnueabihf-gcc: error: unrecognized -march target: armv3m
    2    arm-linux-gnueabihf-gcc: error: missing argument to ‘-march=’

Warnings summary:

    7    ld: warning: creating DT_TEXTREL in a PIE
    5    drivers/video/fbdev/sa1100fb.c:975:21: warning: ‘sa1100fb_min_dma_period’ defined but not used [-Wunused-function]
    4    ld: arch/x86/boot/compressed/head_64.o: warning: relocation in read-only section `.head.text'
    4    arch/arm64/include/asm/memory.h:238:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    3    ld: arch/x86/boot/compressed/head_32.o: warning: relocation in read-only section `.head.text'
    2    sound/pci/echoaudio/echoaudio_dsp.c:647:9: warning: iteration 1073741824 invokes undefined behavior [-Waggressive-loop-optimizations]
    2    arch/x86/entry/entry_64.S:1732: Warning: no instruction mnemonic suffix given and no register operands; using default for `sysret'
    1    sound/pci/echoaudio/echoaudio_dsp.c:658:9: warning: iteration 1073741824 invokes undefined behavior [-Waggressive-loop-optimizations]

Section mismatches summary:

    2    WARNING: vmlinux.o(.text+0xcacc): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: vmlinux.o(.text.unlikely+0x3774): Section mismatch in reference from the function pmax_setup_memory_region() to the function .init.text:add_memory_region()
    1    WARNING: vmlinux.o(.text.unlikely+0x349c): Section mismatch in reference from the function pmax_setup_memory_region() to the function .init.text:add_memory_region()
    1    WARNING: vmlinux.o(.text+0xcf00): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: vmlinux.o(.text+0xce00): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: vmlinux.o(.text+0xcd0c): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: vmlinux.o(.text+0xcc00): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: vmlinux.o(.text+0xcad4): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: vmlinux.o(.text+0xcaac): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: vmlinux.o(.text+0xc978): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: vmlinux.o(.text+0xc834): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: vmlinux.o(.text+0xb8d0): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: vmlinux.o(.text+0x7ecc): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
    1    WARNING: vmlinux.o(.text+0x7530): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

================================================================================

Detailed per-defconfig build reports:

--------------------------------------------------------------------------------
32r2el_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
allnoconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
allnoconfig (x86_64, gcc-10) — PASS, 0 errors, 3 warnings, 0 section mismatches

Warnings:
    arch/x86/entry/entry_64.S:1732: Warning: no instruction mnemonic suffix given and no register operands; using default for `sysret'
    ld: arch/x86/boot/compressed/head_64.o: warning: relocation in read-only section `.head.text'
    ld: warning: creating DT_TEXTREL in a PIE

--------------------------------------------------------------------------------
allnoconfig (i386, gcc-10) — PASS, 0 errors, 2 warnings, 0 section mismatches

Warnings:
    ld: arch/x86/boot/compressed/head_32.o: warning: relocation in read-only section `.head.text'
    ld: warning: creating DT_TEXTREL in a PIE

--------------------------------------------------------------------------------
am200epdkit_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ar7_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
aspeed_g4_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
aspeed_g5_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
assabet_defconfig (arm, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches

Warnings:
    drivers/video/fbdev/sa1100fb.c:975:21: warning: ‘sa1100fb_min_dma_period’ defined but not used [-Wunused-function]

Section mismatches:
    WARNING: vmlinux.o(.text+0xcacc): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
at91_dt_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ath25_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ath79_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
axm55xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
axs103_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
axs103_smp_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
badge4_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: vmlinux.o(.text+0xcc00): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
bcm2835_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
bcm47xx_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
bcm63xx_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
bigsur_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
bmips_be_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
bmips_stb_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
capcella_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
cavium_octeon_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
cerfcube_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: vmlinux.o(.text+0x7530): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
ci20_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
cm_x2xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
cm_x300_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
cobalt_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
colibri_pxa270_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
colibri_pxa300_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
collie_defconfig (arm, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches

Warnings:
    drivers/video/fbdev/sa1100fb.c:975:21: warning: ‘sa1100fb_min_dma_period’ defined but not used [-Wunused-function]

Section mismatches:
    WARNING: vmlinux.o(.text+0xb8d0): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
corgi_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
davinci_all_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
db1xxx_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
decstation_64_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
decstation_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: vmlinux.o(.text.unlikely+0x3774): Section mismatch in reference from the function pmax_setup_memory_region() to the function .init.text:add_memory_region()

--------------------------------------------------------------------------------
decstation_r4k_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: vmlinux.o(.text.unlikely+0x349c): Section mismatch in reference from the function pmax_setup_memory_region() to the function .init.text:add_memory_region()

--------------------------------------------------------------------------------
defconfig (riscv, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
defconfig (arm64, gcc-10) — PASS, 0 errors, 2 warnings, 0 section mismatches

Warnings:
    arch/arm64/include/asm/memory.h:238:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    arch/arm64/include/asm/memory.h:238:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

--------------------------------------------------------------------------------
defconfig+arm64-chromebook (arm64, gcc-10) — PASS, 0 errors, 2 warnings, 0 section mismatches

Warnings:
    arch/arm64/include/asm/memory.h:238:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    arch/arm64/include/asm/memory.h:238:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

--------------------------------------------------------------------------------
dove_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
e55_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ebsa110_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
efm32_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
em_x270_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ep93xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: vmlinux.o(.text+0x7ecc): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
eseries_pxa_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
exynos_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ezx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
footbridge_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
fuloong2e_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
gcw0_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
gemini_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
gpr_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
h3600_defconfig (arm, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches

Warnings:
    drivers/video/fbdev/sa1100fb.c:975:21: warning: ‘sa1100fb_min_dma_period’ defined but not used [-Wunused-function]

Section mismatches:
    WARNING: vmlinux.o(.text+0xcacc): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
h5000_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
hackkit_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: vmlinux.o(.text+0xce00): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
haps_hs_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
haps_hs_smp_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
hisi_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
hsdk_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
i386_defconfig (i386, gcc-10) — PASS, 0 errors, 2 warnings, 0 section mismatches

Warnings:
    ld: arch/x86/boot/compressed/head_32.o: warning: relocation in read-only section `.head.text'
    ld: warning: creating DT_TEXTREL in a PIE

--------------------------------------------------------------------------------
imote2_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
imx_v4_v5_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
imx_v6_v7_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
integrator_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
iop32x_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ip22_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ip27_defconfig (mips, gcc-10) — FAIL, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ip28_defconfig (mips, gcc-10) — FAIL, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ip32_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
ixp4xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
jazz_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
jmr3927_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
jornada720_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: vmlinux.o(.text+0xc978): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
keystone_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
lart_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: vmlinux.o(.text+0xcad4): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
lasat_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
loongson1b_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
loongson1c_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
loongson3_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
lpc18xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
lpc32xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
lpd270_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
lubbock_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
magician_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mainstone_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
malta_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
malta_kvm_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
malta_kvm_guest_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
malta_qemu_32r6_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
maltaaprp_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
maltasmvp_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
maltasmvp_eva_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
maltaup_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
maltaup_xpa_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
markeins_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
milbeaut_m10v_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mini2440_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mips_paravirt_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mmp2_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
moxart_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mpc30x_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mps2_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
msp71xx_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mtx1_defconfig (mips, gcc-10) — PASS, 0 errors, 3 warnings, 0 section mismatches

Warnings:
    sound/pci/echoaudio/echoaudio_dsp.c:647:9: warning: iteration 1073741824 invokes undefined behavior [-Waggressive-loop-optimizations]
    sound/pci/echoaudio/echoaudio_dsp.c:658:9: warning: iteration 1073741824 invokes undefined behavior [-Waggressive-loop-optimizations]
    sound/pci/echoaudio/echoaudio_dsp.c:647:9: warning: iteration 1073741824 invokes undefined behavior [-Waggressive-loop-optimizations]

--------------------------------------------------------------------------------
multi_v4t_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
multi_v5_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
multi_v7_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mvebu_v5_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mvebu_v7_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
mxs_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
neponset_defconfig (arm, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches

Warnings:
    drivers/video/fbdev/sa1100fb.c:975:21: warning: ‘sa1100fb_min_dma_period’ defined but not used [-Wunused-function]

Section mismatches:
    WARNING: vmlinux.o(.text+0xcd0c): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
netwinder_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
nhk8815_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
nlm_xlp_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
nlm_xlr_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
nsim_hs_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
nsim_hs_smp_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
nsimosci_hs_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
nsimosci_hs_smp_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
omap1_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
omap2plus_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
omega2p_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
orion5x_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
oxnas_v6_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
palmz72_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pcm027_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pic32mzda_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pistachio_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pleb_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: vmlinux.o(.text+0xc834): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
pnx8335_stb225_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
prima2_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pxa168_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pxa255-idp_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pxa3xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pxa910_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
pxa_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
qcom_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
qi_lb60_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
rb532_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
rbtx49xx_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
realview_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
rm200_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
rpc_defconfig (arm, gcc-10) — FAIL, 4 errors, 0 warnings, 0 section mismatches

Errors:
    arm-linux-gnueabihf-gcc: error: unrecognized -march target: armv3m
    arm-linux-gnueabihf-gcc: error: missing argument to ‘-march=’
    arm-linux-gnueabihf-gcc: error: unrecognized -march target: armv3m
    arm-linux-gnueabihf-gcc: error: missing argument to ‘-march=’

--------------------------------------------------------------------------------
rt305x_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
s3c2410_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
s3c6400_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
s5pv210_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
sama5_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
sb1250_swarm_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
shannon_defconfig (arm, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches

Warnings:
    drivers/video/fbdev/sa1100fb.c:975:21: warning: ‘sa1100fb_min_dma_period’ defined but not used [-Wunused-function]

Section mismatches:
    WARNING: vmlinux.o(.text+0xcaac): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
shmobile_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
simpad_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

Section mismatches:
    WARNING: vmlinux.o(.text+0xcf00): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()

--------------------------------------------------------------------------------
socfpga_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
spear13xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
spear3xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
spear6xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
spitz_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
stm32_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
sunxi_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tango4_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tb0219_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tb0226_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tb0287_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tct_hammer_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tegra_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tinyconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
tinyconfig (x86_64, gcc-10) — PASS, 0 errors, 3 warnings, 0 section mismatches

Warnings:
    arch/x86/entry/entry_64.S:1732: Warning: no instruction mnemonic suffix given and no register operands; using default for `sysret'
    ld: arch/x86/boot/compressed/head_64.o: warning: relocation in read-only section `.head.text'
    ld: warning: creating DT_TEXTREL in a PIE

--------------------------------------------------------------------------------
tinyconfig (i386, gcc-10) — PASS, 0 errors, 2 warnings, 0 section mismatches

Warnings:
    ld: arch/x86/boot/compressed/head_32.o: warning: relocation in read-only section `.head.text'
    ld: warning: creating DT_TEXTREL in a PIE

--------------------------------------------------------------------------------
trizeps4_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
u300_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
u8500_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
vdk_hs38_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
vdk_hs38_smp_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
versatile_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
vexpress_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
vf610m4_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
viper_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
vocore2_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
vt8500_v6_v7_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
workpad_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
x86_64_defconfig (x86_64, gcc-10) — PASS, 0 errors, 2 warnings, 0 section mismatches

Warnings:
    ld: arch/x86/boot/compressed/head_64.o: warning: relocation in read-only section `.head.text'
    ld: warning: creating DT_TEXTREL in a PIE

--------------------------------------------------------------------------------
x86_64_defconfig+x86-chromebook (x86_64, gcc-10) — PASS, 0 errors, 2 warnings, 0 section mismatches

Warnings:
    ld: arch/x86/boot/compressed/head_64.o: warning: relocation in read-only section `.head.text'
    ld: warning: creating DT_TEXTREL in a PIE

--------------------------------------------------------------------------------
xcep_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
zeus_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

--------------------------------------------------------------------------------
zx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches

---
For more info write to <info@kernelci.org>

^ permalink raw reply

* Re: [LTP] [PATCH] add several hash algorithms for crypto/crypto_user02.c
From: Eric Biggers @ 2022-01-05 15:13 UTC (permalink / raw)
  To: wenyehai; +Cc: ltp
In-Reply-To: <1641287729-194863-1-git-send-email-wenyehai@huawei.com>

On Tue, Jan 04, 2022 at 05:15:29PM +0800, wenyehai via ltp wrote:
> kernel/crypto/crypto_user02.c: add several hash algorithms according to
> the latest linux kernel encryption module
> 
> Signed-off-by: Yehai Wen <wenyehai@huawei.com>
> ---
>  testcases/kernel/crypto/crypto_user02.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/testcases/kernel/crypto/crypto_user02.c b/testcases/kernel/crypto/crypto_user02.c
> index 717b297..afaff5d 100644
> --- a/testcases/kernel/crypto/crypto_user02.c
> +++ b/testcases/kernel/crypto/crypto_user02.c
> @@ -40,7 +40,15 @@ static const char * const ALGORITHM_CANDIDATES[] = {
>  	"hmac(sha256-generic)",
>  	"hmac(sha384-generic)",
>  	"hmac(md5-generic)",
> -	"hmac(sm3-generic)"
> +	"hmac(sm3-generic)",
> +	"hmac(sha512-generic)",
> +	"hmac(rmd160-generic)",
> +	"hmac(sha3-224-generic)",
> +	"hmac(sha3-256-generic)",
> +	"hmac(sha3-384-generic)",
> +	"hmac(sha3-512-generic)",
> +	"hmac(streebog256-generic)",
> +	"hmac(streebog512-generic)"
>  };

There's no harm in listing more algorithms here.  Just to avoid any
misunderstanding though, are you expecting this test to test those algorithms?
This test just uses the first available algorithm listed; it's a regression test
for a bug in the crypto_user API, and not a test for the algorithms themselves.
So, listing more algorithms here doesn't magically provide test coverage for
them.  If what you're looking for is an LTP test that tests that certain
algorithms are working correctly, then such a test would need to be written.

- Eric

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply

* RE: [PATCH v2 4/5] RISC-V: Typed CSRs in gdbserver
From: Schwarz, Konrad @ 2022-01-05 14:04 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel@nongnu.org
  Cc: Palmer Dabbelt, Bin Meng, Alistair Francis, Ralf Ramsauer
In-Reply-To: <676fcd9a-4a1a-2c03-e0c6-60128e3a50ae@linaro.org>

Hi,

> -----Original Message-----
> From: Richard Henderson <richard.henderson@linaro.org>
> Sent: Wednesday, January 5, 2022 0:02
> To: Schwarz, Konrad (T CED SES-DE) <konrad.schwarz@siemens.com>; qemu-devel@nongnu.org
> Cc: Alistair Francis <alistair.francis@wdc.com>; Bin Meng <bin.meng@windriver.com>; Palmer Dabbelt
> <palmer@dabbelt.com>; Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
> Subject: Re: [PATCH v2 4/5] RISC-V: Typed CSRs in gdbserver
> 
> On 1/4/22 7:51 AM, Konrad Schwarz wrote:
> > +++ b/target/riscv/csr32-op-gdbserver.h
> ...
> > +++ b/target/riscv/csr64-op-gdbserver.h
> 
> There is a *lot* of overlap between these two files.
> Why not add this data to the main csr_ops array?
> That would put all the info for each csr in one place.

So the problem is that these files are generated -- somewhat ironically
via XSLT from complete GDB target descriptions, which are themselves
generated from a mixture of AWK and shell scripts that I have in a
different project and which you would probably not want to have
contributed.  Those scripts generate a variety of other definitions
for C and assembly besides the GDB XML target descriptions, so would
probably need to be reduced for just QEMU usage.

I did actually originally add the data directly to the csr_ops array.
Because of the large number of CSRs and the generational aspect,
it was infeasible (for me at least) to create an editing merge script to
intermingle the existing definitions and the new data.  I tried to
work around this by using C99's designated initializer syntax,
adding in the new data at the end of the table, and using specific
enough initializers to not disturb the existing data.

However, this did not work out: despite using very specific initializers,
the previously initialized CSR structures in the csr_ops array
were reset to their default values, i.e., 0, breaking the code.
This was not the way I expected this feature to work in C99 and
my reading of the C99 standard does not support this either.  But
that’s what GCC does, at least on my machine.

This is also the reason the overlap is not handled more elegantly:
GDB target description XML doesn't support alternates for different
machine word lengths and so I lose that information when transforming
from the 64 and 32-bit target description sources.
 
> > +  [CSR_CYCLE] { .gdb_type = "uint64", .gdb_group = "user" },
> 
> I think you should be able to use "unsigned long" as a proxy for the native register size.

`unsigned long' is not listed in section `G.3 Predefined Target Types'
of the GDB manual.

I also have to say that GDB does not handle the target descriptions
correctly in all cases.  In particular, I suspect a bug when
a field crosses a 32-bit boundary: GDB is showing twice the
field value.  I'm pretty sure my target description is correct
for this case, I've rechecked several times.  Also, GDB
is not picking up all of the new CSRs for some reason, but
I'm sure is reading the target description from QEMU.

Since target descriptions are rare in practice, a bug would
not surprise me; for example, the DTD for target descriptions
supplied with GDB is wrong: it is missing the `enum' element
(which was probably added later) and the xsi:include element.

Ultimately, this is a chicken and egg problem: bugs in GDB can
only be flushed out if it gets interesting
target descriptions to read.

> 
> > +char const riscv_gdb_csr_types[] =
> > +#ifdef TARGET_RISCV32
> ...
> > +#elif defined TARGET_RISCV64
> ...
> > +# endif
> > +;
> 
> Ideally we shouldn't use ifdefs for this -- we should choose one or the other depending on
> the startup env->misa_mxl_max.  We are still using an ifdef for the main
> riscv-*-virtual.xml, but that could be considered a bug to fix.

As I wrote Alistair, I'm not sure this reasoning is correct.  Even if a 64-bit
machine is running in 32-bit mode, the machine itself remains a 64-bit machine,
and it's CSRs are so too.  We can have the situation of a 64-bit kernel and 32-bit
user-mode process; would we want the CSRs to change when switching between the two?
Even if we did, the GDB remote protocol does not have the ability to say "API change,
please reread the target description" (AFAIK).  And in any case, users can easily side-step
the issue by using a 32-bit target QEMU if they are only interested in 32-bit code.

Regards
Konrad

^ permalink raw reply

* Re: [PATCH] dma-buf: Move sysfs work out of DMA-BUF export/release path
From: Greg Kroah-Hartman @ 2022-01-05 15:13 UTC (permalink / raw)
  To: Hridya Valsaraju
  Cc: Daniel Vetter, keescook, linux-kernel, dri-devel,
	Christian König, linaro-mm-sig, kaleshsingh, surenb,
	tjmercier, linux-media
In-Reply-To: <20220104235148.21320-1-hridya@google.com>

On Tue, Jan 04, 2022 at 03:51:48PM -0800, Hridya Valsaraju wrote:
> Recently, we noticed an issue where a process went into direct reclaim
> while holding the kernfs rw semaphore for sysfs in write(exclusive)
> mode. This caused processes who were doing DMA-BUF exports and releases
> to go into uninterruptible sleep since they needed to acquire the same
> semaphore for the DMA-BUF sysfs entry creation/deletion. In order to avoid
> blocking DMA-BUF export/release for an indeterminate amount of time
> while another process is holding the sysfs rw semaphore in exclusive
> mode, this patch moves the per-buffer sysfs file creation/deleteion to
> a kthread.
> 
> Fixes: bdb8d06dfefd ("dmabuf: Add the capability to expose DMA-BUF stats in sysfs")
> Signed-off-by: Hridya Valsaraju <hridya@google.com>
> ---
>  drivers/dma-buf/dma-buf-sysfs-stats.c | 343 ++++++++++++++++++++++++--
>  include/linux/dma-buf.h               |  46 ++++
>  2 files changed, 366 insertions(+), 23 deletions(-)

Crazy, but if this works in your testing, it looks ok to me.  Nice work.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply

* Re: [PATCH] dma-buf: Move sysfs work out of DMA-BUF export/release path
From: Greg Kroah-Hartman @ 2022-01-05 15:13 UTC (permalink / raw)
  To: Hridya Valsaraju
  Cc: Sumit Semwal, Christian König, Daniel Vetter, linux-media,
	dri-devel, linaro-mm-sig, linux-kernel, john.stultz, surenb,
	kaleshsingh, tjmercier, keescook
In-Reply-To: <20220104235148.21320-1-hridya@google.com>

On Tue, Jan 04, 2022 at 03:51:48PM -0800, Hridya Valsaraju wrote:
> Recently, we noticed an issue where a process went into direct reclaim
> while holding the kernfs rw semaphore for sysfs in write(exclusive)
> mode. This caused processes who were doing DMA-BUF exports and releases
> to go into uninterruptible sleep since they needed to acquire the same
> semaphore for the DMA-BUF sysfs entry creation/deletion. In order to avoid
> blocking DMA-BUF export/release for an indeterminate amount of time
> while another process is holding the sysfs rw semaphore in exclusive
> mode, this patch moves the per-buffer sysfs file creation/deleteion to
> a kthread.
> 
> Fixes: bdb8d06dfefd ("dmabuf: Add the capability to expose DMA-BUF stats in sysfs")
> Signed-off-by: Hridya Valsaraju <hridya@google.com>
> ---
>  drivers/dma-buf/dma-buf-sysfs-stats.c | 343 ++++++++++++++++++++++++--
>  include/linux/dma-buf.h               |  46 ++++
>  2 files changed, 366 insertions(+), 23 deletions(-)

Crazy, but if this works in your testing, it looks ok to me.  Nice work.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply

* [PATCH v3 04/16] job.h: define unlocked functions
From: Emanuele Giuseppe Esposito @ 2022-01-05 14:01 UTC (permalink / raw)
  To: qemu-block
  Cc: Kevin Wolf, Fam Zheng, Vladimir Sementsov-Ogievskiy, Wen Congyang,
	Xie Changlong, Emanuele Giuseppe Esposito, Markus Armbruster,
	qemu-devel, Hanna Reitz, Stefan Hajnoczi, Paolo Bonzini,
	John Snow
In-Reply-To: <20220105140208.365608-1-eesposit@redhat.com>

All these functions assume that the lock is not held, and acquire
it internally.

These functions will be useful when job_lock is globally applied,
as they will allow callers to access the job struct fields
without worrying about the job lock.

Update also the comments in blockjob.c (and move them in job.c).

Note: at this stage, job_{lock/unlock} and job lock guard macros
are *nop*.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
 blockjob.c         | 20 -------------
 include/qemu/job.h | 68 ++++++++++++++++++++++++++++++++++++++++++--
 job.c              | 70 ++++++++++++++++++++++++++++++++++++++++++++--
 3 files changed, 133 insertions(+), 25 deletions(-)

diff --git a/blockjob.c b/blockjob.c
index 5b5d7f26b3..ce356be51e 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -36,21 +36,6 @@
 #include "qemu/main-loop.h"
 #include "qemu/timer.h"
 
-/*
- * The block job API is composed of two categories of functions.
- *
- * The first includes functions used by the monitor.  The monitor is
- * peculiar in that it accesses the block job list with block_job_get, and
- * therefore needs consistency across block_job_get and the actual operation
- * (e.g. block_job_set_speed).  The consistency is achieved with
- * aio_context_acquire/release.  These functions are declared in blockjob.h.
- *
- * The second includes functions used by the block job drivers and sometimes
- * by the core block layer.  These do not care about locking, because the
- * whole coroutine runs under the AioContext lock, and are declared in
- * blockjob_int.h.
- */
-
 static bool is_block_job(Job *job)
 {
     return job_type(job) == JOB_TYPE_BACKUP ||
@@ -433,11 +418,6 @@ static void block_job_event_ready(Notifier *n, void *opaque)
 }
 
 
-/*
- * API for block job drivers and the block layer.  These functions are
- * declared in blockjob_int.h.
- */
-
 void *block_job_create(const char *job_id, const BlockJobDriver *driver,
                        JobTxn *txn, BlockDriverState *bs, uint64_t perm,
                        uint64_t shared_perm, int64_t speed, int flags,
diff --git a/include/qemu/job.h b/include/qemu/job.h
index 0d1c4d1bb1..f800b0b881 100644
--- a/include/qemu/job.h
+++ b/include/qemu/job.h
@@ -384,6 +384,7 @@ void job_txn_add_job_locked(JobTxn *txn, Job *job);
 
 /**
  * Create a new long-running job and return it.
+ * Called with job_mutex *not* held.
  *
  * @job_id: The id of the newly-created job, or %NULL for internal jobs
  * @driver: The class object for the newly-created job.
@@ -419,6 +420,8 @@ void job_unref_locked(Job *job);
  * @done: How much progress the job made since the last call
  *
  * Updates the progress counter of the job.
+ *
+ * Progress API is thread safe.
  */
 void job_progress_update(Job *job, uint64_t done);
 
@@ -429,6 +432,8 @@ void job_progress_update(Job *job, uint64_t done);
  *
  * Sets the expected end value of the progress counter of a job so that a
  * completion percentage can be calculated when the progress is updated.
+ *
+ * Progress API is thread safe.
  */
 void job_progress_set_remaining(Job *job, uint64_t remaining);
 
@@ -444,6 +449,8 @@ void job_progress_set_remaining(Job *job, uint64_t remaining);
  * length before, and job_progress_update() afterwards.
  * (So the operation acts as a parenthesis in regards to the main job
  * operation running in background.)
+ *
+ * Progress API is thread safe.
  */
 void job_progress_increase_remaining(Job *job, uint64_t delta);
 
@@ -467,13 +474,17 @@ void job_enter_cond_locked(Job *job, bool(*fn)(Job *job));
  *
  * Begins execution of a job.
  * Takes ownership of one reference to the job object.
+ *
+ * Called with job_mutex *not* held.
  */
 void job_start(Job *job);
 
 /**
  * @job: The job to enter.
+ * Called with job_mutex *not* held.
  *
  * Continue the specified job by entering the coroutine.
+ * Called with job_mutex lock *not* held.
  */
 void job_enter(Job *job);
 
@@ -483,6 +494,9 @@ void job_enter(Job *job);
  * Pause now if job_pause_locked() has been called.
  * Jobs that perform lots of I/O must call this between
  * requests so that the job can be paused.
+ *
+ * Called with job_mutex *not* held (we don't want the coroutine
+ * to yield with the lock held!).
  */
 void coroutine_fn job_pause_point(Job *job);
 
@@ -490,6 +504,8 @@ void coroutine_fn job_pause_point(Job *job);
  * @job: The job that calls the function.
  *
  * Yield the job coroutine.
+ * Called with job_mutex *not* held (we don't want the coroutine
+ * to yield with the lock held!).
  */
 void job_yield(Job *job);
 
@@ -500,6 +516,9 @@ void job_yield(Job *job);
  * Put the job to sleep (assuming that it wasn't canceled) for @ns
  * %QEMU_CLOCK_REALTIME nanoseconds.  Canceling the job will immediately
  * interrupt the wait.
+ *
+ * Called with job_mutex *not* held (we don't want the coroutine
+ * to yield with the lock held!).
  */
 void coroutine_fn job_sleep_ns(Job *job, int64_t ns);
 
@@ -512,12 +531,19 @@ const char *job_type_str(const Job *job);
 /** Returns true if the job should not be visible to the management layer. */
 bool job_is_internal(Job *job);
 
-/** Returns whether the job is being cancelled. */
+/**
+ * Returns whether the job is being cancelled.
+ * Called with job_mutex *not* held.
+ */
 bool job_is_cancelled(Job *job);
 
+/** Just like job_is_cancelled, but called between job_lock and job_unlock */
+bool job_is_cancelled_locked(Job *job);
+
 /**
  * Returns whether the job is scheduled for cancellation (at an
  * indefinite point).
+ * Called with job_mutex *not* held.
  */
 bool job_cancel_requested(Job *job);
 
@@ -601,13 +627,19 @@ Job *job_get_locked(const char *id);
  */
 int job_apply_verb_locked(Job *job, JobVerb verb, Error **errp);
 
-/** The @job could not be started, free it. */
+/**
+ * The @job could not be started, free it.
+ * Called with job_mutex *not* held.
+ */
 void job_early_fail(Job *job);
 
 /** Same as job_early_fail(), but assumes job_lock is held. */
 void job_early_fail_locked(Job *job);
 
-/** Moves the @job from RUNNING to READY */
+/**
+ * Moves the @job from RUNNING to READY.
+ * Called with job_mutex *not* held.
+ */
 void job_transition_to_ready(Job *job);
 
 /**
@@ -707,4 +739,34 @@ void job_dismiss_locked(Job **job, Error **errp);
 int job_finish_sync_locked(Job *job, void (*finish)(Job *, Error **errp),
                            Error **errp);
 
+/**
+ * Returns the @job->status.
+ * Called with job_mutex *not* held.
+ */
+JobStatus job_get_status(Job *job);
+
+/**
+ * Returns the @job->pause_count.
+ * Called with job_mutex *not* held.
+ */
+int job_get_pause_count(Job *job);
+
+/**
+ * Returns @job->paused.
+ * Called with job_mutex *not* held.
+ */
+bool job_get_paused(Job *job);
+
+/**
+ * Returns @job->busy.
+ * Called with job_mutex *not* held.
+ */
+bool job_get_busy(Job *job);
+
+/**
+ * Returns @job->aio_context.
+ * Called with job_mutex *not* held.
+ */
+AioContext *job_get_aio_context(Job *job);
+
 #endif
diff --git a/job.c b/job.c
index bb6ca2940c..f4e1a56705 100644
--- a/job.c
+++ b/job.c
@@ -32,6 +32,22 @@
 #include "trace/trace-root.h"
 #include "qapi/qapi-events-job.h"
 
+/*
+ * The job API is composed of two categories of functions.
+ *
+ * The first includes functions used by the monitor.  The monitor is
+ * peculiar in that it accesses the block job list with job_get, and
+ * therefore needs consistency across job_get and the actual operation
+ * (e.g. job_user_cancel). To achieve this consistency, the caller
+ * calls job_lock/job_unlock itself around the whole operation.
+ * These functions are declared in job-monitor.h.
+ *
+ *
+ * The second includes functions used by the block job drivers and sometimes
+ * by the core block layer. These delegate the locking to the callee instead,
+ * and are declared in job-driver.h.
+ */
+
 /*
  * job_mutex protects the jobs list, but also makes the
  * struct job fields thread-safe.
@@ -226,18 +242,61 @@ const char *job_type_str(const Job *job)
     return JobType_str(job_type(job));
 }
 
-bool job_is_cancelled(Job *job)
+JobStatus job_get_status(Job *job)
+{
+    JOB_LOCK_GUARD();
+    return job->status;
+}
+
+int job_get_pause_count(Job *job)
+{
+    JOB_LOCK_GUARD();
+    return job->pause_count;
+}
+
+bool job_get_paused(Job *job)
+{
+    JOB_LOCK_GUARD();
+    return job->paused;
+}
+
+bool job_get_busy(Job *job)
+{
+    JOB_LOCK_GUARD();
+    return job->busy;
+}
+
+AioContext *job_get_aio_context(Job *job)
+{
+    JOB_LOCK_GUARD();
+    return job->aio_context;
+}
+
+bool job_is_cancelled_locked(Job *job)
 {
     /* force_cancel may be true only if cancelled is true, too */
     assert(job->cancelled || !job->force_cancel);
     return job->force_cancel;
 }
 
-bool job_cancel_requested(Job *job)
+bool job_is_cancelled(Job *job)
+{
+    JOB_LOCK_GUARD();
+    return job_is_cancelled_locked(job);
+}
+
+/* Called with job_mutex held. */
+static bool job_cancel_requested_locked(Job *job)
 {
     return job->cancelled;
 }
 
+bool job_cancel_requested(Job *job)
+{
+    JOB_LOCK_GUARD();
+    return job_cancel_requested_locked(job);
+}
+
 bool job_is_ready_locked(Job *job)
 {
     switch (job->status) {
@@ -288,6 +347,13 @@ bool job_is_completed_locked(Job *job)
     return false;
 }
 
+/* Called with job_mutex lock *not* held */
+static bool job_is_completed(Job *job)
+{
+    JOB_LOCK_GUARD();
+    return job_is_completed_locked(job);
+}
+
 static bool job_started(Job *job)
 {
     return job->co;
-- 
2.31.1



^ permalink raw reply related

* Re: ANNOUNCE mdadm-4.2
From: Jes Sorensen @ 2022-01-05 15:11 UTC (permalink / raw)
  To: Mariusz Tkaczyk; +Cc: Kernel.org-Linux-RAID, Mariusz Tkaczyk
In-Reply-To: <20220105112124.00006a92@linux.intel.com>

On 1/5/22 5:21 AM, Mariusz Tkaczyk wrote:
> On Thu, 30 Dec 2021 14:52:44 -0500
> Jes Sorensen <jes@trained-monkey.org> wrote:
> 
>> Hi,
>>
>> Finally here it is, mdadm-4.2. Thanks for all the contributions and
>> your patience.
>>
>> Happy New Year everyone!
>>
>> Jes
>>
>> From the announce file:
>>
>> I am pleased to finally announce the availability of mdadm-4.2.
>> get 4.2 out the door soon.
>>
>> It is available at the usual places:
>>    http://www.kernel.org/pub/linux/utils/raid/mdadm/
>> and via git at
>>    git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git
>>    http://git.kernel.org/cgit/utils/mdadm/
>>
> 
> Hi Jes,
> I can see a tarball in the first link but I cannot find 4.2 tag in git:
> https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git
> 
> Could you push the tag to repository?

Hi Mariusz,

Looks like I forgot to do that. Should be uptodate now.

Thanks,
Jes


^ permalink raw reply

* Re: [PATCH v2] hw/arm/virt: KVM: Enable PAuth when supported by the host
From: Andrew Jones @ 2022-01-05 14:58 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: Peter Maydell, kvm, Richard Henderson, qemu-devel, Eric Auger,
	kernel-team, kvmarm
In-Reply-To: <20220103180507.2190429-1-maz@kernel.org>

On Mon, Jan 03, 2022 at 06:05:07PM +0000, Marc Zyngier wrote:
> Add basic support for Pointer Authentication when running a KVM
> guest and that the host supports it, loosely based on the SVE
> support.
> 
> Although the feature is enabled by default when the host advertises
> it, it is possible to disable it by setting the 'pauth=off' CPU
> property. The 'pauth' comment is removed from cpu-features.rst,
> as it is now common to both TCG and KVM.
> 
> Tested on an Apple M1 running 5.16-rc6.
> 
> Cc: Eric Auger <eric.auger@redhat.com>
> Cc: Andrew Jones <drjones@redhat.com>
> Cc: Richard Henderson <richard.henderson@linaro.org>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
> * From v1:
>   - Drop 'pauth' documentation
>   - Make the TCG path common to both TCG and KVM
>   - Some tidying up
> 
>  docs/system/arm/cpu-features.rst |  4 ----
>  target/arm/cpu.c                 | 14 ++++----------
>  target/arm/cpu.h                 |  1 +
>  target/arm/cpu64.c               | 33 ++++++++++++++++++++++++++++----
>  target/arm/kvm64.c               | 21 ++++++++++++++++++++
>  5 files changed, 55 insertions(+), 18 deletions(-)
>

 
Reviewed-by: Andrew Jones <drjones@redhat.com>

Thanks,
drew



^ permalink raw reply

* Re: [PATCH net-next 01/15] can: usb_8dev: remove unused member echo_skb from struct usb_8dev_priv
From: patchwork-bot+netdevbpf @ 2022-01-05 15:10 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: netdev, davem, kuba, linux-can, kernel
In-Reply-To: <20220105144402.1174191-2-mkl@pengutronix.de>

Hello:

This series was applied to netdev/net-next.git (master)
by Marc Kleine-Budde <mkl@pengutronix.de>:

On Wed,  5 Jan 2022 15:43:48 +0100 you wrote:
> This patch removes the unused memberecho_skb from the struct
> usb_8dev_priv.
> 
> Fixes: 0024d8ad1639 ("can: usb_8dev: Add support for USB2CAN interface from 8 devices")
> Link: https://lore.kernel.org/all/20220104230753.956520-1-mkl@pengutronix.de
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> 
> [...]

Here is the summary with links:
  - [net-next,01/15] can: usb_8dev: remove unused member echo_skb from struct usb_8dev_priv
    https://git.kernel.org/netdev/net-next/c/617dbee5c7ac
  - [net-next,02/15] can: mcp251x: mcp251x_gpio_setup(): Get rid of duplicate of_node assignment
    https://git.kernel.org/netdev/net-next/c/68fa39ea9124
  - [net-next,03/15] can: kvaser_usb: make use of units.h in assignment of frequency
    https://git.kernel.org/netdev/net-next/c/b8f91799687e
  - [net-next,04/15] can: ti_hecc: ti_hecc_probe(): use platform_get_irq() to get the interrupt
    https://git.kernel.org/netdev/net-next/c/eff104cf3cf3
  - [net-next,05/15] can: sja1000: sp_probe(): use platform_get_irq() to get the interrupt
    https://git.kernel.org/netdev/net-next/c/decdcaeedce4
  - [net-next,06/15] can: etas_es58x: es58x_init_netdev: populate net_device::dev_port
    https://git.kernel.org/netdev/net-next/c/e233640cd303
  - [net-next,07/15] can: do not increase rx statistics when generating a CAN rx error message frame
    https://git.kernel.org/netdev/net-next/c/676068db69b8
  - [net-next,08/15] can: kvaser_usb: do not increase tx statistics when sending error message frames
    https://git.kernel.org/netdev/net-next/c/0b0ce2c67795
  - [net-next,09/15] can: do not copy the payload of RTR frames
    https://git.kernel.org/netdev/net-next/c/f68eafeb9759
  - [net-next,10/15] can: do not increase rx_bytes statistics for RTR frames
    https://git.kernel.org/netdev/net-next/c/8e674ca74244
  - [net-next,11/15] can: do not increase tx_bytes statistics for RTR frames
    https://git.kernel.org/netdev/net-next/c/cc4b08c31b5c
  - [net-next,12/15] can: dev: replace can_priv::ctrlmode_static by can_get_static_ctrlmode()
    https://git.kernel.org/netdev/net-next/c/c9e1d8ed304c
  - [net-next,13/15] can: dev: add sanity check in can_set_static_ctrlmode()
    https://git.kernel.org/netdev/net-next/c/7d4a101c0bd3
  - [net-next,14/15] can: dev: reorder struct can_priv members for better packing
    https://git.kernel.org/netdev/net-next/c/5fe1be81efd2
  - [net-next,15/15] can: netlink: report the CAN controller mode supported flags
    https://git.kernel.org/netdev/net-next/c/383f0993fc77

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply

* Re: [PATCH net-next] mlxsw: pci: Avoid flow control for EMAD packets
From: patchwork-bot+netdevbpf @ 2022-01-05 15:10 UTC (permalink / raw)
  To: Ido Schimmel; +Cc: netdev, davem, kuba, petrm, danieller, mlxsw
In-Reply-To: <20220105102227.733612-1-idosch@nvidia.com>

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Wed,  5 Jan 2022 12:22:27 +0200 you wrote:
> From: Danielle Ratson <danieller@nvidia.com>
> 
> Locally generated packets ingress the device through its CPU port. When
> the CPU port is congested and there are not enough credits in its
> headroom buffer, packets can be dropped.
> 
> While this might be acceptable for data packets that traverse the
> network, configuration packets exchanged between the host and the device
> (EMADs) should not be subjected to this flow control.
> 
> [...]

Here is the summary with links:
  - [net-next] mlxsw: pci: Avoid flow control for EMAD packets
    https://git.kernel.org/netdev/net-next/c/d43e4271747a

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply

* [PATCH] dt-bindings: net: Cleanup MDIO node schemas
From: Rob Herring @ 2022-01-05 15:10 UTC (permalink / raw)
  To: devicetree
  Cc: linux-kernel, David S. Miller, Jakub Kicinski, Maxime Ripard,
	Chen-Yu Tsai, Andrew Lunn, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, Joakim Zhang, Heiner Kallweit, Russell King,
	Kunihiko Hayashi, Nobuhiro Iwamatsu, Cristian Ciocaltea,
	Fernández Rojas, John Crispin, G. Jaya Kumaran,
	Linus Walleij, Joel Stanley, Bartosz Golaszewski, Oleksij Rempel,
	Alexandre Torgue, Giuseppe Cavallaro, Jose Abreu, netdev

The schemas for MDIO bus nodes range from missing to duplicating
everything in mdio.yaml. The MDIO bus node schemas only need to
reference mdio.yaml, define any binding specific properties, and define
'unevaluatedProperties: false'. This ensures that MDIO nodes only
contain defined properties. With this, any duplicated properties can
be removed.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Vivien Didelot <vivien.didelot@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Vladimir Oltean <olteanv@gmail.com>
Cc: Joakim Zhang <qiangqing.zhang@nxp.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Cc: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Cc: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
Cc: "Fernández Rojas" <noltari@gmail.com>
Cc: John Crispin <john@phrozen.org>
Cc: "G. Jaya Kumaran" <vineetha.g.jaya.kumaran@intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Jose Abreu <joabreu@synopsys.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
I can take this via the DT tree.

 .../bindings/net/actions,owl-emac.yaml        |  4 +++
 .../net/allwinner,sun8i-a83t-emac.yaml        | 25 ++++++++----------
 .../bindings/net/brcm,bcm6368-mdio-mux.yaml   | 26 +------------------
 .../bindings/net/dsa/nxp,sja1105.yaml         |  6 ++---
 .../devicetree/bindings/net/dsa/qca8k.yaml    | 23 ++--------------
 .../devicetree/bindings/net/fsl,fec.yaml      |  3 ++-
 .../bindings/net/intel,dwmac-plat.yaml        |  2 +-
 .../bindings/net/intel,ixp4xx-ethernet.yaml   |  4 +--
 .../bindings/net/litex,liteeth.yaml           |  1 +
 .../devicetree/bindings/net/mdio-mux.yaml     |  7 ++---
 .../bindings/net/mediatek,star-emac.yaml      |  5 ++--
 .../devicetree/bindings/net/qca,ar71xx.yaml   |  4 +++
 .../devicetree/bindings/net/snps,dwmac.yaml   |  3 ++-
 .../bindings/net/socionext,uniphier-ave4.yaml |  1 +
 .../bindings/net/toshiba,visconti-dwmac.yaml  |  2 +-
 15 files changed, 38 insertions(+), 78 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/actions,owl-emac.yaml b/Documentation/devicetree/bindings/net/actions,owl-emac.yaml
index 1626e0a821b0..d30fada2ac39 100644
--- a/Documentation/devicetree/bindings/net/actions,owl-emac.yaml
+++ b/Documentation/devicetree/bindings/net/actions,owl-emac.yaml
@@ -51,6 +51,10 @@ properties:
     description:
       Phandle to the device containing custom config.
 
+  mdio:
+    $ref: mdio.yaml#
+    unevaluatedProperties: false
+
 required:
   - compatible
   - reg
diff --git a/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml b/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
index 407586bc366b..6a4831fd3616 100644
--- a/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
+++ b/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
@@ -122,6 +122,7 @@ allOf:
 
         mdio-mux:
           type: object
+          unevaluatedProperties: false
 
           properties:
             compatible:
@@ -132,17 +133,18 @@ allOf:
               description:
                 Phandle to EMAC MDIO.
 
+            "#address-cells":
+              const: 1
+
+            "#size-cells":
+              const: 0
+
             mdio@1:
-              type: object
+              $ref: mdio.yaml#
+              unevaluatedProperties: false
               description: Internal MDIO Bus
 
               properties:
-                "#address-cells":
-                  const: 1
-
-                "#size-cells":
-                  const: 0
-
                 compatible:
                   const: allwinner,sun8i-h3-mdio-internal
 
@@ -168,16 +170,11 @@ allOf:
 
 
             mdio@2:
-              type: object
+              $ref: mdio.yaml#
+              unevaluatedProperties: false
               description: External MDIO Bus (H3 only)
 
               properties:
-                "#address-cells":
-                  const: 1
-
-                "#size-cells":
-                  const: 0
-
                 reg:
                   const: 2
 
diff --git a/Documentation/devicetree/bindings/net/brcm,bcm6368-mdio-mux.yaml b/Documentation/devicetree/bindings/net/brcm,bcm6368-mdio-mux.yaml
index 2f34fda55fd0..9ef28c2a0afc 100644
--- a/Documentation/devicetree/bindings/net/brcm,bcm6368-mdio-mux.yaml
+++ b/Documentation/devicetree/bindings/net/brcm,bcm6368-mdio-mux.yaml
@@ -15,18 +15,12 @@ description:
   properties as well to generate desired MDIO transaction on appropriate bus.
 
 allOf:
-  - $ref: "mdio.yaml#"
+  - $ref: mdio-mux.yaml#
 
 properties:
   compatible:
     const: brcm,bcm6368-mdio-mux
 
-  "#address-cells":
-    const: 1
-
-  "#size-cells":
-    const: 0
-
   reg:
     maxItems: 1
 
@@ -34,24 +28,6 @@ required:
   - compatible
   - reg
 
-patternProperties:
-  '^mdio@[0-1]$':
-    type: object
-    properties:
-      reg:
-        maxItems: 1
-
-      "#address-cells":
-        const: 1
-
-      "#size-cells":
-        const: 0
-
-    required:
-      - reg
-      - "#address-cells"
-      - "#size-cells"
-
 unevaluatedProperties: false
 
 examples:
diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
index 24cd733c11d1..1ea0bd490473 100644
--- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
@@ -52,10 +52,8 @@ properties:
 
     patternProperties:
       "^mdio@[0-1]$":
-        type: object
-
-        allOf:
-          - $ref: "http://devicetree.org/schemas/net/mdio.yaml#"
+        $ref: /schemas/net/mdio.yaml#
+        unevaluatedProperties: false
 
         properties:
           compatible:
diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
index 48de0ace265d..907b2ae6442d 100644
--- a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
@@ -58,33 +58,14 @@ properties:
       B68 on the QCA832x and B49 on the QCA833x.
 
   mdio:
-    type: object
+    $ref: /schemas/net/mdio.yaml#
+    unevaluatedProperties: false
     description: Qca8k switch have an internal mdio to access switch port.
                  If this is not present, the legacy mapping is used and the
                  internal mdio access is used.
                  With the legacy mapping the reg corresponding to the internal
                  mdio is the switch reg with an offset of -1.
 
-    properties:
-      '#address-cells':
-        const: 1
-      '#size-cells':
-        const: 0
-
-    patternProperties:
-      "^(ethernet-)?phy@[0-4]$":
-        type: object
-
-        allOf:
-          - $ref: "http://devicetree.org/schemas/net/mdio.yaml#"
-
-        properties:
-          reg:
-            maxItems: 1
-
-        required:
-          - reg
-
 patternProperties:
   "^(ethernet-)?ports$":
     type: object
diff --git a/Documentation/devicetree/bindings/net/fsl,fec.yaml b/Documentation/devicetree/bindings/net/fsl,fec.yaml
index eca41443fcce..fd8371e31867 100644
--- a/Documentation/devicetree/bindings/net/fsl,fec.yaml
+++ b/Documentation/devicetree/bindings/net/fsl,fec.yaml
@@ -165,7 +165,8 @@ properties:
       req_bit is the gpr bit offset for ENET stop request.
 
   mdio:
-    type: object
+    $ref: mdio.yaml#
+    unevaluatedProperties: false
     description:
       Specifies the mdio bus in the FEC, used as a container for phy nodes.
 
diff --git a/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml b/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml
index 08a3f1f6aea2..52a7fa4f49a4 100644
--- a/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml
+++ b/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml
@@ -117,7 +117,7 @@ examples:
         snps,mtl-tx-config = <&mtl_tx_setup>;
         snps,tso;
 
-        mdio0 {
+        mdio {
             #address-cells = <1>;
             #size-cells = <0>;
             compatible = "snps,dwmac-mdio";
diff --git a/Documentation/devicetree/bindings/net/intel,ixp4xx-ethernet.yaml b/Documentation/devicetree/bindings/net/intel,ixp4xx-ethernet.yaml
index 378ed2d3b003..67eaf02dda80 100644
--- a/Documentation/devicetree/bindings/net/intel,ixp4xx-ethernet.yaml
+++ b/Documentation/devicetree/bindings/net/intel,ixp4xx-ethernet.yaml
@@ -48,8 +48,8 @@ properties:
       and the instance to use in the second cell
 
   mdio:
-    type: object
-    $ref: "mdio.yaml#"
+    $ref: mdio.yaml#
+    unevaluatedProperties: false
     description: optional node for embedded MDIO controller
 
 required:
diff --git a/Documentation/devicetree/bindings/net/litex,liteeth.yaml b/Documentation/devicetree/bindings/net/litex,liteeth.yaml
index 76c164a8199a..ebf4e360f8dd 100644
--- a/Documentation/devicetree/bindings/net/litex,liteeth.yaml
+++ b/Documentation/devicetree/bindings/net/litex,liteeth.yaml
@@ -62,6 +62,7 @@ properties:
 
   mdio:
     $ref: mdio.yaml#
+    unevaluatedProperties: false
 
 required:
   - compatible
diff --git a/Documentation/devicetree/bindings/net/mdio-mux.yaml b/Documentation/devicetree/bindings/net/mdio-mux.yaml
index d169adf5d9f4..4321c87de86f 100644
--- a/Documentation/devicetree/bindings/net/mdio-mux.yaml
+++ b/Documentation/devicetree/bindings/net/mdio-mux.yaml
@@ -15,9 +15,6 @@ description: |+
   bus multiplexer/switch will have one child node for each child bus.
 
 properties:
-  $nodename:
-    pattern: '^mdio-mux[\-@]?'
-
   mdio-parent-bus:
     $ref: /schemas/types.yaml#/definitions/phandle
     description:
@@ -32,12 +29,12 @@ properties:
 
 patternProperties:
   '^mdio@[0-9a-f]+$':
-    type: object
+    $ref: mdio.yaml#
+    unevaluatedProperties: false
 
     properties:
       reg:
         maxItems: 1
-        description: The sub-bus number.
 
 additionalProperties: true
 
diff --git a/Documentation/devicetree/bindings/net/mediatek,star-emac.yaml b/Documentation/devicetree/bindings/net/mediatek,star-emac.yaml
index e6a5ff208253..def994c9cbb4 100644
--- a/Documentation/devicetree/bindings/net/mediatek,star-emac.yaml
+++ b/Documentation/devicetree/bindings/net/mediatek,star-emac.yaml
@@ -48,9 +48,8 @@ properties:
       to control the MII mode.
 
   mdio:
-    type: object
-    description:
-      Creates and registers an MDIO bus.
+    $ref: mdio.yaml#
+    unevaluatedProperties: false
 
 required:
   - compatible
diff --git a/Documentation/devicetree/bindings/net/qca,ar71xx.yaml b/Documentation/devicetree/bindings/net/qca,ar71xx.yaml
index 72c931288109..b76a1436fb1b 100644
--- a/Documentation/devicetree/bindings/net/qca,ar71xx.yaml
+++ b/Documentation/devicetree/bindings/net/qca,ar71xx.yaml
@@ -62,6 +62,10 @@ properties:
       - const: mac
       - const: mdio
 
+  mdio:
+    $ref: mdio.yaml#
+    unevaluatedProperties: false
+
 required:
   - compatible
   - reg
diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 1d67ed0cdec1..7eb43707e601 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -286,7 +286,8 @@ properties:
       MAC2MAC connection.
 
   mdio:
-    type: object
+    $ref: mdio.yaml#
+    unevaluatedProperties: false
     description:
       Creates and registers an MDIO bus.
 
diff --git a/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml b/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml
index 6bc61c42418f..aad5a9f3f962 100644
--- a/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml
+++ b/Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml
@@ -72,6 +72,7 @@ properties:
 
   mdio:
     $ref: mdio.yaml#
+    unevaluatedProperties: false
 
 required:
   - compatible
diff --git a/Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml b/Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml
index 59724d18e6f3..b12bfe61c67a 100644
--- a/Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml
@@ -71,7 +71,7 @@ examples:
             phy-mode = "rgmii-id";
             phy-handle = <&phy0>;
 
-            mdio0 {
+            mdio {
                 #address-cells = <0x1>;
                 #size-cells = <0x0>;
                 compatible = "snps,dwmac-mdio";
-- 
2.32.0


^ permalink raw reply related

* Re: [PATCH 0/8] Support btime and other NFSv4 specific attributes
From: Trond Myklebust @ 2022-01-05 15:10 UTC (permalink / raw)
  To: bfields@fieldses.org, ondrej.valousek.xm@renesas.com,
	trondmy@kernel.org
  Cc: linux-nfs@vger.kernel.org, anna.schumaker@netapp.com
In-Reply-To: <DU2PR10MB5096010E9570E2718198EDD5E14B9@DU2PR10MB5096.EURPRD10.PROD.OUTLOOK.COM>

On Wed, 2022-01-05 at 15:05 +0000, Ondrej Valousek wrote:
> Hi all,
> Sorry for confusion and maybe dumb questions:
> - The aim is to transfer these attributes via RFC8276 (File System
> Extended attributes in NFSv4)?

No.

> - AFAIK support for RFC8276 in NFS (only version 4.2) server is since
> kernel 5.9, right? NFS client supports these as well?
> - The patches below implements the feature in both, nfs client AND
> server, right?
> 
> I am bit confused as "btime" does not seem to be stored as extended
> attribute in most local filesystems (checked ext4) but is in standard
> inode structure.

All these attributes are defined as regular attributes in rfc7530. All
this code does is add the standard NFSv4 encoders/decoders for these
attributes and adds the ioctl() to set/retrieve them all.

There is no need to hack the NFS protocol to retrieve or set them using
the xattr stuff.

> Thanks,
> Ondrej
> 
> 
> -----Original Message-----
> From: Trond Myklebust <trondmy@hammerspace.com>
> Sent: pondělí 3. ledna 2022 21:52
> To: bfields@fieldses.org; trondmy@kernel.org
> Cc: linux-nfs@vger.kernel.org; anna.schumaker@netapp.com
> Subject: Re: [PATCH 0/8] Support btime and other NFSv4 specific
> attributes
> 
> On Mon, 2022-01-03 at 15:51 -0500, J. Bruce Fields wrote:
> > On Fri, Dec 17, 2021 at 03:48:46PM -0500, trondmy@kernel.org wrote:
> > > From: Trond Myklebust <trond.myklebust@hammerspace.com>
> > > 
> > > NFSv4 has support for a number of extra attributes that are of
> > > interest to Samba when it is used to re-export a filesystem to
> > > Windows clients.
> > > Aside from the btime, which is of interest in statx(), Windows
> > > clients have an interest in determining the status of the
> > > 'hidden',
> > > and 'system'
> > > flags.
> > > Backup programs want to read the 'archive' flags and the 'time
> > > backup'
> > > attribute.
> > > Finally, the 'offline' flag can tell whether or not a file needs
> > > to
> > > be staged by an HSM system before it can be read or written to.
> > > 
> > > The patch series also adds an ioctl() to allow userspace
> > > retrieval
> > > and setting of these attributes where appropriate. It also adds
> > > an
> > > ioctl()
> > > to allow retrieval of the raw NFSv4 ACCESS information, to allow
> > > more fine grained determination of the user's access rights to a
> > > file or directory. All of this information is of use for Samba.
> > 
> > Same question, what filesystem and server are you testing against?
> > 
> 
> Same answer.
> 
> > --b.
> > 
> > > 
> > > Anne Marie Merritt (3):
> > >   nfs: Add timecreate to nfs inode
> > >   nfs: Add 'archive', 'hidden' and 'system' fields to nfs inode
> > >   nfs: Add 'time backup' to nfs inode
> > > 
> > > Richard Sharpe (1):
> > >   NFS: Support statx_get and statx_set ioctls
> > > 
> > > Trond Myklebust (4):
> > >   NFS: Expand the type of nfs_fattr->valid
> > >   NFS: Return the file btime in the statx results when
> > > appropriate
> > >   NFSv4: Support the offline bit
> > >   NFSv4: Add an ioctl to allow retrieval of the NFS raw ACCESS
> > > mask
> > > 
> > >  fs/nfs/dir.c              |  71 ++---
> > >  fs/nfs/getroot.c          |   3 +-
> > >  fs/nfs/inode.c            | 147 +++++++++-
> > >  fs/nfs/internal.h         |  10 +
> > >  fs/nfs/nfs3proc.c         |   1 +
> > >  fs/nfs/nfs4_fs.h          |  31 +++
> > >  fs/nfs/nfs4file.c         | 550
> > > ++++++++++++++++++++++++++++++++++++++
> > >  fs/nfs/nfs4proc.c         | 175 +++++++++++-
> > >  fs/nfs/nfs4trace.h        |   8 +-
> > >  fs/nfs/nfs4xdr.c          | 240 +++++++++++++++--
> > >  fs/nfs/nfstrace.c         |   5 +
> > >  fs/nfs/nfstrace.h         |   9 +-
> > >  fs/nfs/proc.c             |   1 +
> > >  include/linux/nfs4.h      |   1 +
> > >  include/linux/nfs_fs.h    |  15 ++
> > >  include/linux/nfs_fs_sb.h |   2 +-
> > >  include/linux/nfs_xdr.h   |  80 ++++--
> > >  include/uapi/linux/nfs.h  | 101 +++++++
> > >  18 files changed, 1356 insertions(+), 94 deletions(-)
> > > 
> > > --
> > > 2.33.1
> 
> --
> Trond Myklebust
> Linux NFS client maintainer, Hammerspace
> trond.myklebust@hammerspace.com
> 
> 
> Legal Disclaimer: This e-mail communication (and any attachment/s) is
> confidential and contains proprietary information, some or all of
> which may be legally privileged. It is intended solely for the use of
> the individual or entity to which it is addressed. Access to this
> email by anyone else is unauthorized. If you are not the intended
> recipient, any disclosure, copying, distribution or any action taken
> or omitted to be taken in reliance on it, is prohibited and may be
> unlawful.

-- 
Trond Myklebust
CTO, Hammerspace Inc
4984 El Camino Real, Suite 208
Los Altos, CA 94022
​
www.hammer.space


^ permalink raw reply

* Re: [PATCH 0/8] Support btime and other NFSv4 specific attributes
From: bfields @ 2022-01-05 15:10 UTC (permalink / raw)
  To: Ondrej Valousek
  Cc: Trond Myklebust, trondmy@kernel.org, linux-nfs@vger.kernel.org,
	anna.schumaker@netapp.com
In-Reply-To: <DU2PR10MB5096010E9570E2718198EDD5E14B9@DU2PR10MB5096.EURPRD10.PROD.OUTLOOK.COM>

On Wed, Jan 05, 2022 at 03:05:17PM +0000, Ondrej Valousek wrote:
> Sorry for confusion and maybe dumb questions:
> - The aim is to transfer these attributes via RFC8276 (File System Extended attributes in NFSv4)?

No, NFSv4 defines attributes for all of these.

RFC8276 attributes are purely for user-defined attribues, not for
anything that the server or filesystem gives specific meaning.

> - AFAIK support for RFC8276 in NFS (only version 4.2) server is since kernel 5.9, right? NFS client supports these as well?
> - The patches below implements the feature in both, nfs client AND server, right?

Client only.

These would probably be quite easy to support on the server side when
the filesystem supports them, but nobody's volunteered to implement
that yet; patches welcome.

--b.

^ permalink raw reply

* Re: [Intel-gfx] [PATCH 2/4] drm/i915/ttm: only fault WILLNEED objects
From: Thomas Hellström @ 2022-01-05 15:09 UTC (permalink / raw)
  To: Matthew Auld, intel-gfx; +Cc: dri-devel
In-Reply-To: <20220105145835.142950-2-matthew.auld@intel.com>

On Wed, 2022-01-05 at 14:58 +0000, Matthew Auld wrote:
> Don't attempt to fault and re-populate purged objects. By some fluke
> this passes the dontneed-after-mmap IGT, but for the wrong reasons.
> 
> Fixes: cf3e3e86d779 ("drm/i915: Use ttm mmap handling for ttm bo's.")
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>

Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> index 923cc7ad8d70..8d61d4538a64 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> @@ -883,6 +883,11 @@ static vm_fault_t vm_fault_ttm(struct vm_fault
> *vmf)
>         if (ret)
>                 return ret;
>  
> +       if (obj->mm.madv != I915_MADV_WILLNEED) {
> +               dma_resv_unlock(bo->base.resv);
> +               return VM_FAULT_SIGBUS;
> +       }
> +
>         if (drm_dev_enter(dev, &idx)) {
>                 ret = ttm_bo_vm_fault_reserved(vmf, vmf->vma-
> >vm_page_prot,
>                                               
> TTM_BO_VM_NUM_PREFAULT);



^ permalink raw reply

* Re: [PATCH 2/4] drm/i915/ttm: only fault WILLNEED objects
From: Thomas Hellström @ 2022-01-05 15:09 UTC (permalink / raw)
  To: Matthew Auld, intel-gfx; +Cc: dri-devel
In-Reply-To: <20220105145835.142950-2-matthew.auld@intel.com>

On Wed, 2022-01-05 at 14:58 +0000, Matthew Auld wrote:
> Don't attempt to fault and re-populate purged objects. By some fluke
> this passes the dontneed-after-mmap IGT, but for the wrong reasons.
> 
> Fixes: cf3e3e86d779 ("drm/i915: Use ttm mmap handling for ttm bo's.")
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>

Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> index 923cc7ad8d70..8d61d4538a64 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> @@ -883,6 +883,11 @@ static vm_fault_t vm_fault_ttm(struct vm_fault
> *vmf)
>         if (ret)
>                 return ret;
>  
> +       if (obj->mm.madv != I915_MADV_WILLNEED) {
> +               dma_resv_unlock(bo->base.resv);
> +               return VM_FAULT_SIGBUS;
> +       }
> +
>         if (drm_dev_enter(dev, &idx)) {
>                 ret = ttm_bo_vm_fault_reserved(vmf, vmf->vma-
> >vm_page_prot,
>                                               
> TTM_BO_VM_NUM_PREFAULT);



^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.