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:	Mon, 19 Nov 2007 14:52:24 +0100
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Ulrich Drepper <drepper@...hat.com>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	mingo@...e.hu, tglx@...utronix.de, torvalds@...ux-foundation.org
Subject: Re: [PATCHv3 0/4] sys_indirect system call

On Sat, 17 Nov 2007 00:31:36 -0500
Ulrich Drepper <drepper@...hat.com> wrote:


> 
>   union indirect_params i;
>   i.file_flags.flags = O_CLOEXEC;

This setup forbids future addons to file_flags

In three years, when we want to add a new indirect feature to socket() 
call, do we need a new indirect2() syscall ?

So I suggest using :

   union indirect_params i = {
      .file_flags.flags = O_CLOEXEC,
   };
fd = syscall (__NR_indirect, &r, &i, sizeof (i));

Or better, you could avoid using 'union indirect_params' in user code, and 
only use the substructs for each function.
/* define this in some include file of course */
  struct file_flags {
	int flags;
  };
/* use it */
struct file_flags ff = { .flags = O_CLOEXEC};
fd = syscall (__NR_indirect, &r, &ff, sizeof(ff));

This to avoid to copy to kernel un-necessary data, and permitting futures changes.

-
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