All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Smith" <dpsmith@apertussolutions.com>
To: Sergiy Kibrik <Sergiy_Kibrik@epam.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v1 1/2] flask: add const qualifier to security_context_to_sid()
Date: Thu, 27 Aug 2026 14:08:37 -0400	[thread overview]
Message-ID: <c9c9d3bb-e818-41b4-aca9-48724b92346a@apertussolutions.com> (raw)
In-Reply-To: <ee0ce49467ac1ee1cdd017323e70c8a865269f39.1787821757.git.Sergiy_Kibrik@epam.com>

On 8/27/26 5:38 AM, Sergiy Kibrik wrote:
> The function does not modify context argument.
> Also it gives more flexibility to this API usage, because some context strings
> in Xen are also const char*.
> 
> Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
> ---
>   xen/xsm/flask/include/security.h | 2 +-
>   xen/xsm/flask/ss/services.c      | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/xsm/flask/include/security.h b/xen/xsm/flask/include/security.h
> index ec8b442a8f..a2c5f423f8 100644
> --- a/xen/xsm/flask/include/security.h
> +++ b/xen/xsm/flask/include/security.h
> @@ -76,7 +76,7 @@ int security_change_sid(u32 ssid, u32 tsid, u16 tclass, u32 *out_sid);
>   
>   int security_sid_to_context(u32 sid, char **scontext, u32 *scontext_len);
>   
> -int security_context_to_sid(char *scontext, u32 scontext_len, u32 *out_sid);
> +int security_context_to_sid(const char *scontext, u32 scontext_len, u32 *out_sid);
>   
>   int security_get_allow_unknown(void);
>   
> diff --git a/xen/xsm/flask/ss/services.c b/xen/xsm/flask/ss/services.c
> index 35ad1034ca..764ac7d1d8 100644
> --- a/xen/xsm/flask/ss/services.c
> +++ b/xen/xsm/flask/ss/services.c
> @@ -813,7 +813,7 @@ out:
>    * Returns -%EINVAL if the context is invalid, -%ENOMEM if insufficient
>    * memory is available, or 0 on success.
>    */
> -int security_context_to_sid(char *scontext, u32 scontext_len, u32 *sid)
> +int security_context_to_sid(const char *scontext, u32 scontext_len, u32 *sid)
>   {
>       char *scontext2;
>       struct context context;

Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>


  reply	other threads:[~2026-08-27 18:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27  9:38 [PATCH v1 0/2] XSM labels support in dom0less Sergiy Kibrik
2026-08-27  9:38 ` [PATCH v1 2/2] common: dom0less-bindings: introduce XSM labels Sergiy Kibrik
2026-08-27 18:09   ` Daniel P. Smith
2026-08-31 10:19   ` Andrew Cooper
2026-09-04 10:01     ` Sergiy Kibrik
2026-08-27  9:38 ` [PATCH v1 1/2] flask: add const qualifier to security_context_to_sid() Sergiy Kibrik
2026-08-27 18:08   ` Daniel P. Smith [this message]
2026-08-28  6:40   ` Jan Beulich
2026-08-31 10:01     ` Sergiy Kibrik
2026-09-01  6:34       ` Jan Beulich

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=c9c9d3bb-e818-41b4-aca9-48724b92346a@apertussolutions.com \
    --to=dpsmith@apertussolutions.com \
    --cc=Sergiy_Kibrik@epam.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.