All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Xu <xuyang_jy_0410@163.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] syscalls/add_key01: test the length of payload
Date: Thu, 23 Jan 2020 20:44:41 +0800	[thread overview]
Message-ID: <0b715eaf-cb87-8604-a305-5443f4741c9f@163.com> (raw)
In-Reply-To: <20200123111347.GE27845@rei>


> Hi!
>> Seeing add_key manpages, the length of payload for "user"/"logon"
>> is 32767, this value is up tp 1M for "big_key". For "keyring" type
>> , this value is zero.
> 
> This version is nearly good, there are a few minor things I can fix up
> before applying.
> 
> However the test fails for me unless I run it as root. Looks like any
> key that is bigger than certain threshold fails with EDQUOT for me. Have
> you tried to run the test as an unpriviledged user?
Hi Cyril

I don't run this test under an unpriviledged user. Seeing keyrings 
manpages, it said "
/proc/sys/kernel/keys/maxbytes (since Linux 2.6.26)
This  is  the  maximum  number of bytes of data that a 	nonroot user can 
hold in the payloads of the keys owned by theuser.
The default value in this file is 20,000.

I perfer to add .needs_root in this flag and check this in a new case.
What do you think about it?

Best Regards
Yang Xu
> 


  reply	other threads:[~2020-01-23 12:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-19  7:49 [LTP] [PATCH 1/2] syscalls/add_key05: add new test for the length of payload Yang Xu
2020-01-19  7:49 ` [LTP] [PATCH 2/2] syscalls/add_key01: remove duplicated case Yang Xu
2020-01-21 14:50   ` Cyril Hrubis
2020-01-21 15:13 ` [LTP] [PATCH 1/2] syscalls/add_key05: add new test for the length of payload Cyril Hrubis
2020-01-22  1:51   ` Yang Xu
2020-01-22  5:26   ` [LTP] [PATCH v2] syscalls/add_key01: test " Yang Xu
2020-01-23 11:13     ` Cyril Hrubis
2020-01-23 12:44       ` Yang Xu [this message]
2020-01-23 12:56         ` Cyril Hrubis
2020-01-23 13:06     ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0b715eaf-cb87-8604-a305-5443f4741c9f@163.com \
    --to=xuyang_jy_0410@163.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.