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: <20170608230616.2mi6w6llskl35bh4@yury-thinkpad>
Date:   Fri, 9 Jun 2017 02:06:16 +0300
From:   Yury Norov <ynorov@...iumnetworks.com>
To:     Catalin Marinas <catalin.marinas@....com>
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-doc@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
        Andrew Pinski <Andrew.Pinski@...iumnetworks.com>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Chris Metcalf <cmetcalf@...hip.com>,
        philipp.tomsich@...obroma-systems.com,
        Joseph Myers <joseph@...esourcery.com>,
        zhouchengming1@...wei.com,
        Steve Ellcey <sellcey@...iumnetworks.com>,
        Prasun.Kapoor@...iumnetworks.com, Andreas Schwab <schwab@...e.de>,
        agraf@...e.de, szabolcs.nagy@....com, geert@...ux-m68k.org,
        Adam Borowski <kilobyte@...band.pl>,
        manuel.montezelo@...il.com, Chris Metcalf <cmetcalf@...lanox.com>,
        Andrew Pinski <pinskia@...il.com>, linyongting@...wei.com,
        klimov.linux@...il.com, broonie@...nel.org,
        Bamvor Zhangjian <bamvor.zhangjian@...wei.com>,
        Bamvor Jian Zhang <bamvor.zhangjian@...aro.org>,
        Maxim Kuvyrkov <maxim.kuvyrkov@...aro.org>,
        Florian Weimer <fweimer@...hat.com>, Nathan_Lynch@...tor.com,
        Ramana Radhakrishnan <ramana.gcc@...glemail.com>,
        schwidefsky@...ibm.com, davem@...emloft.net,
        christoph.muellner@...obroma-systems.com
Subject: Re: [PATCH 19/20] arm64:ilp32: add vdso-ilp32 and use for signal
 return

On Thu, Jun 08, 2017 at 04:24:34PM +0100, Catalin Marinas wrote:
> On Sun, Jun 04, 2017 at 03:00:08PM +0300, Yury Norov wrote:
> > From: Philipp Tomsich <philipp.tomsich@...obroma-systems.com>
> > 
> > ILP32 VDSO exports following symbols:
> >  __kernel_rt_sigreturn;
> >  __kernel_gettimeofday;
> >  __kernel_clock_gettime;
> >  __kernel_clock_getres.
> > 
> > What shared object to use, kernel selects depending on result of
> > is_ilp32_compat_task() in arch/arm64/kernel/vdso.c, so it substitutes
> > correct pages and spec.
> > 
> > Adjusted to move the data page before code pages in sync with
> > commit 601255ae3c98 ("arm64: vdso: move data page before code pages")
> > 
> > Signed-off-by: Philipp Tomsich <philipp.tomsich@...obroma-systems.com>
> > Signed-off-by: Christoph Muellner <christoph.muellner@...obroma-systems.com>
> > Signed-off-by: Yury Norov <ynorov@...iumnetworks.com>
> > Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@...aro.org>
> > ---
> >  arch/arm64/Makefile                           |  3 +
> >  arch/arm64/include/asm/vdso.h                 |  6 ++
> >  arch/arm64/kernel/Makefile                    |  1 +
> >  arch/arm64/kernel/asm-offsets.c               |  7 ++
> >  arch/arm64/kernel/signal.c                    |  2 +
> >  arch/arm64/kernel/vdso-ilp32/.gitignore       |  2 +
> >  arch/arm64/kernel/vdso-ilp32/Makefile         | 80 ++++++++++++++++++++++
> >  arch/arm64/kernel/vdso-ilp32/vdso-ilp32.S     | 33 ++++++++++
> >  arch/arm64/kernel/vdso-ilp32/vdso-ilp32.lds.S | 95 +++++++++++++++++++++++++++
> >  arch/arm64/kernel/vdso.c                      | 65 +++++++++++++++---
> >  arch/arm64/kernel/vdso/gettimeofday.S         | 20 +++++-
> >  arch/arm64/kernel/vdso/vdso.S                 |  6 +-
> >  12 files changed, 304 insertions(+), 16 deletions(-)
> >  create mode 100644 arch/arm64/kernel/vdso-ilp32/.gitignore
> >  create mode 100644 arch/arm64/kernel/vdso-ilp32/Makefile
> >  create mode 100644 arch/arm64/kernel/vdso-ilp32/vdso-ilp32.S
> >  create mode 100644 arch/arm64/kernel/vdso-ilp32/vdso-ilp32.lds.S
> 
> Does this patch get simpler with Andrew Pinski's vdso in C proposal?
> I have to read the other thread in detail, Will followed up already.

Not much. arch/arm64/kernel/vdso/gettimeofday.S is removed by Andrew,
so it will also disappear here. New gettimeofday.c is just compiled with
mabi=ilp32, and almost don't need modifications. Makefiles will be modified
accordingly. The rest is the same. This is the draft for the changes we
need to apply ilp32 series on top of Andrew's patch (there's few typos
though, so only for reference):
http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1409447.html

> > diff --git a/arch/arm64/include/asm/vdso.h b/arch/arm64/include/asm/vdso.h
> > index 839ce0031bd5..649a9a416500 100644
> > --- a/arch/arm64/include/asm/vdso.h
> > +++ b/arch/arm64/include/asm/vdso.h
> > @@ -29,6 +29,12 @@
> >  
> >  #include <generated/vdso-offsets.h>
> >  
> > +#ifdef CONFIG_ARM64_ILP32
> > +#include <generated/vdso-ilp32-offsets.h>
> > +#else
> > +#define vdso_offset_sigtramp_ilp32
> > +#endif
> 
> BTW, here you could do something like:
> 
> #define vdso_offset_sigtramp_ilp32	({ BUILD_BUG(); 0; })

OK, will change

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ