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]
Date:	Fri, 27 Mar 2009 20:19:53 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Sam Ravnborg <sam@...nborg.org>
Cc:	liqin.chen@...plusct.com, linux-arch@...r.kernel.org,
	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org
Subject: Re: [PATCH 5/13] score - New architecure port to SunplusCT S+CORE processor

On Friday 27 March 2009, Sam Ravnborg wrote:
> > +struct shmid64_ds {
> > +       struct ipc64_perm       shm_perm;       /* operation perms */
> > +       size_t                  shm_segsz;      /* size of segment (bytes) 
> > */
> > +       __kernel_time_t         shm_atime;      /* last attach time */
> > +       __kernel_time_t         shm_dtime;      /* last detach time */
> > +       __kernel_time_t         shm_ctime;      /* last change time */
> > +       __kernel_pid_t          shm_cpid;       /* pid of creator */
> > +       __kernel_pid_t          shm_lpid;       /* pid of last operator */
> > +       unsigned long           shm_nattch;     /* no. of current attaches 
> > */
> > +       unsigned long           __unused1;
> > +       unsigned long           __unused2;
> > +};
> 
> This is an exported header and you mix wide specific and generic types.
> The recommended way is to stick to the __[u]{32,64}int versions + the kernel
> specific types as __kernel_pid_t.
> In other words avoid use of int, long etc in your exported headers.
> 

This is correct in general, but in this particular case (SysV IPC) it is
exactly what most of the other architectures do. It's basically impossible
to get this right, so simply doing the same as x86 is the best option
I found (unlike most of the other headers).

	Arnd <><
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ