All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: sstabellini@kernel.org, michal.orzel@amd.com,
	xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com,
	consulting@bugseng.com, bertrand.marquis@arm.com, julien@xen.org,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [XEN PATCH 3/7] xen/x86: add missing instances of asmlinkage attributes
Date: Fri, 01 Dec 2023 09:42:59 +0100	[thread overview]
Message-ID: <d48f43185a08874aa0f44287a8023f13@bugseng.com> (raw)
In-Reply-To: <918d258e-c10a-4cdd-a598-3b5dc0124de8@suse.com>

On 2023-11-30 17:44, Jan Beulich wrote:
> On 29.11.2023 16:24, Nicola Vetrini wrote:
>> --- a/xen/arch/x86/desc.c
>> +++ b/xen/arch/x86/desc.c
>> @@ -91,7 +91,7 @@ seg_desc_t boot_compat_gdt[PAGE_SIZE / 
>> sizeof(seg_desc_t)] =
>>   * References boot_cpu_gdt_table for a short period, until the CPUs 
>> switch
>>   * onto their per-CPU GDTs.
>>   */
>> -const struct desc_ptr boot_gdtr = {
>> +const struct desc_ptr asmlinkage boot_gdtr = {
>>      .limit = LAST_RESERVED_GDT_BYTE,
>>      .base = (unsigned long)(boot_gdt - FIRST_RESERVED_GDT_ENTRY),
>>  };
> 
> I'm not convinced asmlinkage is okay to use on data. Recall that in 
> principle
> it may expand to an attribute specifying a non-default calling 
> convention.
> Such attributes cannot be assumed to continue to be possible to apply 
> to
> non-functions, even if such may happen to work with a particular 
> compiler
> version.
> 

It's already being used on variables, I believe.

xen/arch/x86/mm.c:l1_pgentry_t asmlinkage __section(".bss.page_aligned") 
__aligned(PAGE_SIZE)
xen/arch/x86/setup.c:unsigned long asmlinkage __read_mostly 
cr4_pv32_mask;
xen/arch/x86/setup.c:char asmlinkage 
__section(".init.bss.stack_aligned") __aligned(STACK_SIZE)
xen/arch/x86/setup.c:unsigned int asmlinkage __initdata multiboot_ptr;

If you have concern about this particular variable, then we can fall 
back on SAF or just put a declaration in the appropriate place.

-- 
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)


  reply	other threads:[~2023-12-01  8:43 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 15:24 [XEN PATCH 0/7] address some violations of MISRA C Rule 8.4 Nicola Vetrini
2023-11-29 15:24 ` [XEN PATCH 1/7] xen/arm: mmu: add headers for missing declarations Nicola Vetrini
2023-12-01  2:42   ` Stefano Stabellini
2023-11-29 15:24 ` [XEN PATCH 2/7] x86/i8259: add missing header for init_IRQ declaration Nicola Vetrini
2023-11-30 16:48   ` Jan Beulich
2023-11-30 16:58     ` Nicola Vetrini
2023-11-29 15:24 ` [XEN PATCH 3/7] xen/x86: add missing instances of asmlinkage attributes Nicola Vetrini
2023-11-30 16:44   ` Jan Beulich
2023-12-01  8:42     ` Nicola Vetrini [this message]
2023-12-01  8:47       ` Jan Beulich
2023-11-29 15:24 ` [XEN PATCH 4/7] x86/viridian: make build_assertions static Nicola Vetrini
2023-12-01  2:44   ` Stefano Stabellini
2023-11-29 15:24 ` [XEN PATCH 5/7] docs/misra: add entry to exclude-list.json Nicola Vetrini
2023-11-30  8:38   ` Jan Beulich
2023-11-29 15:24 ` [XEN PATCH 6/7] xen/x86: remove stale comment Nicola Vetrini
2023-11-30 16:41   ` Jan Beulich
2023-12-01 16:57     ` Nicola Vetrini
2023-12-04 16:26       ` Nicola Vetrini
2023-12-04 16:40         ` Jan Beulich
2023-12-04 16:50           ` Nicola Vetrini
2023-11-29 15:24 ` [XEN PATCH 7/7] xen/page_alloc: deviate first_valid_mfn for MISRA C Rule 8.4 Nicola Vetrini
2023-12-01  2:47   ` Stefano Stabellini
2023-12-01  7:06     ` Jan Beulich
2023-12-02  3:03       ` Stefano Stabellini
2023-12-02 10:10         ` Julien Grall
2023-12-04 23:19           ` Stefano Stabellini
2023-12-04  7:44         ` Jan Beulich
2023-12-04 11:56           ` Nicola Vetrini
2023-12-04 23:18             ` Stefano Stabellini
2023-12-06 10:35               ` Nicola Vetrini
2023-11-29 15:26 ` [XEN PATCH 0/7] address some violations of " Nicola Vetrini

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=d48f43185a08874aa0f44287a8023f13@bugseng.com \
    --to=nicola.vetrini@bugseng.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ayan.kumar.halder@amd.com \
    --cc=bertrand.marquis@arm.com \
    --cc=consulting@bugseng.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xenia.ragiadakou@amd.com \
    /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.