public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: ynorov@caviumnetworks.com (Yury Norov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 17/23] arm64:ilp32: add vdso-ilp32 and use for signal return
Date: Thu, 1 Oct 2015 22:44:05 +0300	[thread overview]
Message-ID: <20151001194405.GB31021@yury-N73SV> (raw)
In-Reply-To: <560B5FB5.6080605@mentor.com>

On Tue, Sep 29, 2015 at 11:06:13PM -0500, Nathan Lynch wrote:
> On 09/29/2015 05:14 PM, Yury Norov wrote:
> > From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> > 
> > Adjusted to move the move data page before code pages in sync with
> > commit 601255ae3c98fdeeee3a8bb4696425e4f868b4f1
> 
> This commit message needs more information about how the ilp32 VDSO uses
> the existing arm64 code.  I had to really hunt through the Makefile to
> figure out what's going on.
> 
> The commit message should also identify the APIs that are supported.
> The subject line mentions signal return, but gettimeofday, clock_gettime
> and clock_getres are being added here too, and it is not obvious.
> 
> 
> > Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> > Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
> > Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
> > 
> >  create mode 100644 arch/arm64/kernel/vdso-ilp32/.gitignore
> >  create mode 100644 arch/arm64/kernel/vdso-ilp32/Makefile
> >  copy arch/arm64/{include/asm/vdso.h => kernel/vdso-ilp32/vdso-ilp32.S} (56%)
> >  create mode 100644 arch/arm64/kernel/vdso-ilp32/vdso-ilp32.lds.S
> 
> How are you invoking git-format-patch?  The copy detection in this case
> is not conducive to review.
> 
> It looks like the existing arm64 vdso Makefile has been copied to
> vdso-ilp32/ and adjusted for paths and naming.  While the gettimeofday
> assembly implementation is reused, the build logic is duplicated.  x86
> produces VDSOs for multiple ABIs with a single Makefile; is a similar
> approach not appropriate for arm64?
> 
> 
> > diff --git a/arch/arm64/kernel/vdso-ilp32/vdso-ilp32.lds.S b/arch/arm64/kernel/vdso-ilp32/vdso-ilp32.lds.S
> > new file mode 100644
> > index 0000000..ac8029b
> > --- /dev/null
> > +++ b/arch/arm64/kernel/vdso-ilp32/vdso-ilp32.lds.S
> > @@ -0,0 +1,98 @@
> 
> [...]
> 
> > +#include <linux/const.h>
> > +#include <asm/page.h>
> > +#include <asm/vdso.h>
> > +
> > +/*OUTPUT_FORMAT("elf32-littleaarch64", "elf32-bigaarch64", "elf32-littleaarch64")
> > +OUTPUT_ARCH(aarch64)
> > +*/
> 
> If these lines aren't needed then omit them.
> 
> [...]
> 
> 
> > +/*
> > + * This controls what symbols we export from the DSO.
> > + */
> > +VERSION
> > +{
> > +	LINUX_2.6.39 {
> > +	global:
> > +		__kernel_rt_sigreturn;
> > +		__kernel_gettimeofday;
> > +		__kernel_clock_gettime;
> > +		__kernel_clock_getres;
> > +	local: *;
> > +	};
> > +}
> 
> Something that came up during review of arch/arm's VDSO code: consider
> using version and names that match x86, i.e. LINUX_2.6, __vdso_gettimeofday.
> 
> http://lists.infradead.org/pipermail/linux-arm-kernel/2014-June/267940.html
> 
> Using LINUX_2.6.39 for this code is nonsensical.
> 
> 
> > diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
> > index b239b9b..bed6cf1 100644
> > --- a/arch/arm64/kernel/vdso.c
> > +++ b/arch/arm64/kernel/vdso.c
> > @@ -40,6 +40,12 @@ extern char vdso_start, vdso_end;
> >  static unsigned long vdso_pages;
> >  static struct page **vdso_pagelist;
> >  
> > +#ifdef CONFIG_ARM64_ILP32
> > +extern char vdso_ilp32_start, vdso_ilp32_end;
> > +static unsigned long vdso_ilp32_pages;
> > +static struct page **vdso_ilp32_pagelist;
> > +#endif
> > +
> >  /*
> >   * The vDSO data page.
> >   */
> > @@ -117,24 +123,29 @@ int aarch32_setup_vectors_page(struct linux_binprm *bprm, int uses_interp)
> >  }
> >  #endif /* CONFIG_AARCH32_EL0 */
> >  
> > -static struct vm_special_mapping vdso_spec[2];
> > -
> > -static int __init vdso_init(void)
> > +static inline int __init vdso_init_common(char *vdso_start, char *vdso_end,
> 
> No inline please.
> 
> 
> > +					  unsigned long *vdso_pagesp,
> > +					  struct page ***vdso_pagelistp,
> > +					  struct vm_special_mapping* vdso_spec)
> >  {
> 
> [...]
> 
> >  int arch_setup_additional_pages(struct linux_binprm *bprm,
> >  				int uses_interp)
> >  {
> >  	struct mm_struct *mm = current->mm;
> >  	unsigned long vdso_base, vdso_text_len, vdso_mapping_len;
> > -	void *ret;
> > +	void* ret;
> 
> Gratuitous (and incorrect) style change.
> 
> 
> > +	unsigned long pages = vdso_pages;
> > +	struct vm_special_mapping* spec = vdso_spec;
> 
> Incorrect style:                  *spec

Hi Nathan,

If Philipp Philipp Tomsich will not answer soon, I'll fix all this.

BR,
Yury.

  reply	other threads:[~2015-10-01 19:44 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 22:13 [PATCH v5 00/23] ILP32 for ARM64 Yury Norov
2015-09-29 22:13 ` [PATCH v5 01/23] arm64:ilp32: add documentation on the ILP32 ABI " Yury Norov
2015-09-29 22:13 ` [PATCH v5 02/23] arm64: ensure the kernel is compiled for LP64 Yury Norov
2015-09-29 22:14 ` [PATCH v5 03/23] arm64: rename COMPAT to AARCH32_EL0 in Kconfig Yury Norov
2015-10-06  9:21   ` Andrey Konovalov
2015-09-29 22:14 ` [PATCH v5 04/23] arm64: change some CONFIG_COMPAT over to use CONFIG_AARCH32_EL0 instead Yury Norov
2015-09-30  3:36   ` kbuild test robot
2015-09-30  5:35   ` kbuild test robot
2015-10-06  9:21   ` Andrey Konovalov
2015-09-29 22:14 ` [PATCH v5 05/23] arm64:ilp32: expose 'kernel_long' as 'long long' for ILP32 Yury Norov
2015-09-29 22:14 ` [PATCH v5 06/23] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64 Yury Norov
2015-09-29 22:14 ` [PATCH v5 07/23] arm64:ilp32: share signal structures between ILP32 and LP64 ABIs Yury Norov
2015-09-29 22:14 ` [PATCH v5 08/23] arm64:ilp32: use 64bit syscall-names for ILP32 when passing 64bit registers Yury Norov
2015-09-29 22:14 ` [PATCH v5 09/23] arm64:ilp32: use non-compat syscall names for ILP32 as for LP64 Yury Norov
2015-09-29 22:14 ` [PATCH v5 10/23] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat) Yury Norov
2015-09-30  3:48   ` kbuild test robot
2015-10-06  9:21   ` Andrey Konovalov
2015-10-07 16:13     ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 11/23] arm64:ilp32: add is_ilp32_compat_{task, thread} and TIF_32BIT_AARCH64 Yury Norov
2015-09-29 22:14 ` [PATCH v5 12/23] arm64:ilp32: COMPAT_USE_64BIT_TIME is true for ILP32 tasks Yury Norov
2015-09-29 22:14 ` [PATCH v5 13/23] arm64:ilp32: share HWCAP between LP64 and ILP32 Yury Norov
2015-09-29 22:14 ` [PATCH v5 14/23] arm64:ilp32 use the native LP64 'start_thread' for ILP32 threads Yury Norov
2015-09-29 22:14 ` [PATCH v5 15/23] arm64:ilp32: support core dump generation for ILP32 Yury Norov
2015-09-29 22:14 ` [PATCH v5 16/23] arm64: add support for starting ILP32 (ELFCLASS32) binaries Yury Norov
2015-09-29 22:14 ` [PATCH v5 17/23] arm64:ilp32: add vdso-ilp32 and use for signal return Yury Norov
2015-09-30  4:06   ` Nathan Lynch
2015-10-01 19:44     ` Yury Norov [this message]
2015-10-01 19:54       ` Dr. Philipp Tomsich
2015-09-29 22:14 ` [PATCH v5 18/23] ptrace: Allow compat to use the native siginfo Yury Norov
2015-09-29 22:14 ` [PATCH v5 19/23] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it Yury Norov
2015-09-29 22:14 ` [PATCH v5 20/23] arm64:ilp32: use the native siginfo instead of the compat siginfo Yury Norov
2015-09-29 22:14 ` [PATCH v5 21/23] arm64:ilp32: change COMPAT_ELF_PLATFORM to report a a subplatform for ILP32 Yury Norov
2015-09-29 22:14 ` [PATCH v5 22/23] aarch64: ilp32: msgrcv, msgsnd handlers Yury Norov
2015-09-29 22:14 ` [PATCH v5 23/23] arm64:ilp32: add ARM64_ILP32 to Kconfig Yury Norov
2015-09-30 10:19 ` [PATCH v5 00/23] ILP32 for ARM64 Catalin Marinas
2015-09-30 16:41   ` Mark Brown
2015-10-01 11:19     ` Catalin Marinas
2015-10-01 11:36       ` Mark Brown
2015-10-01 16:42         ` Andrey Konovalov
2015-10-01 19:33     ` Yury Norov
2015-10-01 19:15   ` Yury Norov
2015-10-01 21:28     ` Arnd Bergmann
2015-10-01 21:49       ` Pinski, Andrew
2015-10-02  9:37         ` Catalin Marinas
2015-10-03  2:18           ` Kapoor, Prasun
2015-10-05 15:58             ` Catalin Marinas
2015-10-05 21:00               ` Pinski, Andrew
2015-10-05 19:10         ` Yury Norov

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=20151001194405.GB31021@yury-N73SV \
    --to=ynorov@caviumnetworks.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox