All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: Henrik Nordstrom <uml@hno.marasystems.com>
Cc: Jeff Dike <jdike@addtoit.com>,
	user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [PATCH] uml: move TMP default from /tmp to /dev/shm.
Date: Mon, 28 Nov 2005 15:47:40 -0600	[thread overview]
Message-ID: <200511281547.41319.rob@landley.net> (raw)
In-Reply-To: <Pine.LNX.4.61.0511282025560.2231@filer.marasystems.com>

[-- Attachment #1: Type: text/plain, Size: 866 bytes --]

On Monday 28 November 2005 13:27, Henrik Nordstrom wrote:
> On Mon, 28 Nov 2005, Jeff Dike wrote:
> > On Mon, Nov 28, 2005 at 11:52:15AM -0600, Rob Landley wrote:
> >> I sent a second copy that hopefully is less mangled.  Did it make it
> >> through ok?
> >
> > By eye, both looked the same.
>
> Not entirely, the first not only munged the whitespace, it also
> word-wrapped the diff lines..
>
> The second only munged the whitespace.
>
> Sending patches as attachments is generally safer than inline when using
> GUI mail programs.

Inline is linux-kernel policy, but here the darn thing is as an attachment.  
(No, I seem to have no control whatsoever over the type of the attachment.  I 
have checkboxes for "compress, encrypt, and sign" though, in case I can't 
figure out how to do that to the actual file...)

I need to find a real mail client, it seems.

Rob

[-- Attachment #2: devshm.patch --]
[-- Type: text/x-diff, Size: 1906 bytes --]

diff -ur linux-2.6.15-rc2/arch/um-old/os-Linux/mem.c linux-2.6.15-rc2/arch/um/os-Linux/mem.c
--- linux-2.6.15-rc2/arch/um-old/os-Linux/mem.c	2005-11-23 02:35:49.000000000 -0600
+++ linux-2.6.15-rc2/arch/um/os-Linux/mem.c	2005-11-28 09:33:21.158395976 -0600
@@ -34,7 +34,7 @@
 			break;
 	}
 	if((dir == NULL) || (*dir == '\0'))
-		dir = "/tmp";
+		dir = "/dev/shm";
 
 	tempdir = malloc(strlen(dir) + 2);
 	if(tempdir == NULL){
@@ -159,3 +159,26 @@
 	}
 	return(fd);
 }
+
+
+void check_tmpexec(void)
+{
+	void *addr;
+	int err, fd = create_tmp_file(UM_KERN_PAGE_SIZE);
+
+	addr = mmap(NULL, UM_KERN_PAGE_SIZE,
+		    PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, fd, 0);
+	printf("Checking PROT_EXEC mmap in %s...",tempdir);
+	fflush(stdout);
+	if(addr == MAP_FAILED){
+		err = errno;
+		perror("failed");
+		if(err == EPERM)
+			printf("%s must be not mounted noexec\n",tempdir);
+		exit(1);
+	}
+	printf("OK\n");
+	munmap(addr, UM_KERN_PAGE_SIZE);
+
+	close(fd);
+}
diff -ur linux-2.6.15-rc2/arch/um-old/os-Linux/start_up.c linux-2.6.15-rc2/arch/um/os-Linux/start_up.c
--- linux-2.6.15-rc2/arch/um-old/os-Linux/start_up.c	2005-11-23 02:35:49.000000000 -0600
+++ linux-2.6.15-rc2/arch/um/os-Linux/start_up.c	2005-11-28 09:41:04.051025600 -0600
@@ -296,29 +296,7 @@
 	check_sysemu();
 }
 
-extern int create_tmp_file(unsigned long long len);
-
-static void check_tmpexec(void)
-{
-	void *addr;
-	int err, fd = create_tmp_file(UM_KERN_PAGE_SIZE);
-
-	addr = mmap(NULL, UM_KERN_PAGE_SIZE,
-		    PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, fd, 0);
-	printf("Checking PROT_EXEC mmap in /tmp...");
-	fflush(stdout);
-	if(addr == MAP_FAILED){
-		err = errno;
-		perror("failed");
-		if(err == EPERM)
-			printf("/tmp must be not mounted noexec\n");
-		exit(1);
-	}
-	printf("OK\n");
-	munmap(addr, UM_KERN_PAGE_SIZE);
-
-	close(fd);
-}
+extern void check_tmpexec(void);
 
 void os_early_checks(void)
 {

  reply	other threads:[~2005-11-28 21:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-28 16:29 [uml-devel] [PATCH] uml: move TMP default from /tmp to /dev/shm Rob Landley
2005-11-28 18:36 ` Jeff Dike
2005-11-28 17:52   ` Rob Landley
2005-11-28 20:05     ` Jeff Dike
2005-11-28 19:27       ` Henrik Nordstrom
2005-11-28 21:47         ` Rob Landley [this message]
2005-11-29 16:54           ` Blaisorblade
2005-11-28 21:53       ` Rob Landley
  -- strict thread matches above, loose matches on Subject: below --
2005-11-28 15:58 Rob Landley

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=200511281547.41319.rob@landley.net \
    --to=rob@landley.net \
    --cc=jdike@addtoit.com \
    --cc=uml@hno.marasystems.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.