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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y71Bo3yKcLJhe/om@hirez.programming.kicks-ass.net>
Date:   Tue, 10 Jan 2023 11:44:51 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Guenter Roeck <linux@...ck-us.net>, Marco Elver <elver@...gle.com>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Kees Cook <kees@...nel.org>, Jaegeuk Kim <jaegeuk@...nel.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        dalias@...c.org
Subject: Re: Linux 6.2-rc3

On Mon, Jan 09, 2023 at 04:18:02PM -0600, Linus Torvalds wrote:

> > In file included from <command-line>:
> > In function 'follow_pmd_mask',
> >     inlined from 'follow_pud_mask' at mm/gup.c:735:9,
> >     inlined from 'follow_p4d_mask' at mm/gup.c:752:9,
> >     inlined from 'follow_page_mask' at mm/gup.c:809:9:
> > include/linux/compiler_types.h:358:45: error: call to '__compiletime_assert_263' declared with attribute error: Unsupported access size for {READ,WRITE}_ONCE().
> >   358 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> >
> > Bisect points to commit 0862ff059c9e ("sh/mm: Make pmd_t similar to pte_t").
> > This commit introduces
> >
> > -typedef struct { unsigned long long pmd; } pmd_t;
> > +typedef struct {
> > +       struct {
> > +               unsigned long pmd_low;
> > +               unsigned long pmd_high;
> > +       };
> > +       unsigned long long pmd;
> > +} pmd_t;
> >
> > That should probably be "typedef union", not "typedef struct".
> 
> Ok, PeterZ has been off due to the holidays, but seems back. I agree,

Yup, nearly 2 weeks of no email what so ever.. glorious!

> that outer 'struct' should obviously be 'union', but let's make the
> guilty party (ie Peter) fix it up.

Urgh.. yes. How did the robots not yell at me before.

So the original patch came in through x86/mm, but this is very much a SH
only fix how do we route this? Linus you want to take this directly or
Rich do you have an urgent queue for the next -rc somewhere?

---
Subject: sh/mm: Fix pmd_t for real

Because typing is hard...

Fixes: 0862ff059c9e ("sh/mm: Make pmd_t similar to pte_t")
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
---
diff --git a/arch/sh/include/asm/pgtable-3level.h b/arch/sh/include/asm/pgtable-3level.h
index a889a3a938ba..d1ce73f3bd85 100644
--- a/arch/sh/include/asm/pgtable-3level.h
+++ b/arch/sh/include/asm/pgtable-3level.h
@@ -28,7 +28,7 @@
 #define pmd_ERROR(e) \
 	printk("%s:%d: bad pmd %016llx.\n", __FILE__, __LINE__, pmd_val(e))
 
-typedef struct {
+typedef union {
 	struct {
 		unsigned long pmd_low;
 		unsigned long pmd_high;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ