lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZR55TnN4Sr/O5z4a@lore-desk>
Date: Thu, 5 Oct 2023 10:52:30 +0200
From: Lorenzo Bianconi <lorenzo@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Lorenzo Bianconi <lorenzo.bianconi@...hat.com>,
	Jeff Layton <jlayton@...nel.org>, linux-nfs@...r.kernel.org,
	neilb@...e.de, chuck.lever@...cle.com, netdev@...r.kernel.org
Subject: Re: [PATCH] NFSD: convert write_threads and write_v4_end_grace to
 netlink commands

> On Fri, 22 Sep 2023 18:20:36 +0200 Lorenzo Bianconi wrote:
> > > matter at all. Do we have to send down a value at all?  
> > 
> > I am not sure if ynl supports a doit operation with a request with no parameters.
> > @Chuck, Jakub: any input here?
> 
> It should, if it doesn't LMK, I will fix..

ack, what I want to do is add a 'get' method w/o any parameter in the request and
with just one parameter in the reply (i.e. the number of running threads). E.g:

+++ b/Documentation/netlink/specs/nfsd.yaml
@@ -62,6 +62,18 @@ attribute-sets:
         name: compound-ops
         type: u32
         multi-attr: true
+  -
+    name: control-plane
+    attributes:
+      -
+        name: threads
+        type: u32
 
 operations:
   list:
@@ -72,3 +84,54 @@ operations:
       dump:
         pre: nfsd-nl-rpc-status-get-start
         post: nfsd-nl-rpc-status-get-done
+    -
+      name: threads-set
+      doc: set the number of running threads
+      attribute-set: control-plane
+      flags: [ admin-perm ]
+      do:
+        request:
+          attributes:
+            - threads
+    -
+      name: threads-get
+      doc: get the number of running threads
+      attribute-set: control-plane
+      do:
+        reply:
+          attributes:
+            - threads

running ynl-regen.sh, I got the following error for the get method:

$ ./tools/net/ynl/ynl-regen.sh
        GEN kernel      fs/nfsd/netlink.h
Traceback (most recent call last):
  File "/home/lorenzo/workspace/nfsd-next/tools/net/ynl/ynl-gen-c.py", line 2609, in <module>
    main()
  File "/home/lorenzo/workspace/nfsd-next/tools/net/ynl/ynl-gen-c.py", line 2445, in main
    print_req_policy_fwd(cw, ri.struct['request'], ri=ri)
                             ~~~~~~~~~^^^^^^^^^^^
KeyError: 'request'

am I missing something?

Regards,
Lorenzo

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ