search for: map_fail

Displaying 20 results from an estimated 100 matches for "map_fail".

Did you mean: map_failed
2006 Aug 17
2
dovecot on OSF/1 4.0
...I../.. -I/usr/pkg/include -ieee -O2 -I/usr/pkg/include - I/usr/pkg/include -c file-cache.c cc: Error: file-cache.c, line 70: In this statement, "cache- >mmap_base" and "(-1)" may not be compared for equality or inequality. if (cache->mmap_base == MAP_FAILED) { --------------------^ cc: Error: file-cache.c, line 79: In this statement, "cache- >mmap_base" and "(-1)" may not be compared for equality or inequality. if (cache->mmap_base == MAP_FAILED) { --------------------^ *** Exit 1 Stop. And: source='...
2007 Aug 30
2
comparing pointer to integer?
For example in src/lib/file-cache.c: if (cache->mmap_base == MAP_FAILED) { Should be fixed, probably like this: if ((int)cache->mmap_base == MAP_FAILED) { There are a lot of occurences for these in the source. GCC only warns because of this, but DEC C is known to consider this an error: Error: file-cache.c, line 79: In this statement, "new_base" an...
2001 Feb 26
0
Problems with OpenSSH 2.5.1p1 on Solaris 8
...defined(HAVE_GETUSERATTR) && !defined(S_UFSIZE_HARD) && defined(S_UFSIZE) # define S_UFSIZE_HARD S_UFSIZE "_hard" @@ -1173,6 +1177,12 @@ #endif if (!options.use_login) { +#ifdef HAVE_ETC_DEFAULT_LOGIN + int fd, pagesize; + struct stat inode; + char *onemore = MAP_FAILED, *logstr = MAP_FAILED; + char *pathstr; +#endif /* Set basic environment. */ child_set_env(&env, &envsize, "USER", pw->pw_name); child_set_env(&env, &envsize, "LOGNAME", pw->pw_name); @@ -1188,7 +1198,83 @@ * needed for loading shared librar...
2002 Jun 25
2
Help wanted: configure test for busted mmap
Linux 2.2 (and probably others) have a deficient mmap which has caused a number of problems (e.g. bug #285). A workaround is in development, but it would be helpful to have a configure test to detect the bad mmaps(). Any takers? -d
2004 Oct 05
2
[Bug 940] xmmap.c noequality compile error on DigitalUNIX 4.0F PK7
...mpat && make) cc -std1 -g -I. -I.. -I. -I./.. -I/usr/local/ssl/include -I/usr/local/include -DHAVE_CONFIG_H -c xmmap.c cc: Error: xmmap.c, line 50: In this statement, "address" and "(-1)" cannot be compared for equality or inequality. (noequality) if (address == MAP_FAILED) { ------------^ *** Exit 1 Stop. *** Exit 1 Stop. Openssh 3.8.1p1 compiles fine giving just this warning: cc -g -I. -I.. -I. -I./.. -I/usr/local/ssl/include -I/usr/local/include -DHAVE_CONFIG_H -c xmmap.c cc: Warning: xmmap.c, line 50: In this statement, "(-1)" of type "long&qu...
2002 Jul 27
1
Patch to OpenSSH-3.4p1/monitor_mm.c for Linux 2.0
...#ifdef HAVE_MMAP_ANON_SHARED +# ifdef USE_MMAP_DEV_ZERO + { + int fh; + + fh = open("/dev/zero",O_RDWR); + if (fh == -1) + fatal("mmap(`/dev/zero'): %s",strerror(errno)); + + address = mmap(NULL,size,PROT_WRITE|PROT_READ,MAP_PRIVATE,fh,0); + if (address == MAP_FAILED) + fatal("mmap(%lu,%d): %s",(u_long)size,fh,strerror(errno)); + } +# else address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED, -1, 0); if (address == MAP_FAILED) fatal("mmap(%lu): %s", (u_long)size, strerror(errno)); +# endif #else fatal(&...
2002 Jun 25
3
3.3p1 patch for Solaris 2.6
...E_MMAP) && !defined(MAP_ANON) + int fd; +#endif if (mmalloc == NULL) mm = xmalloc(sizeof(struct mm_master)); @@ -87,6 +90,13 @@ #if defined(HAVE_MMAP) && defined(MAP_ANON) address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED, -1, 0); + if (address == MAP_FAILED) + fatal("mmap(%lu): %s", (u_long)size, strerror(errno)); +#elif defined(HAVE_MMAP) && !defined(MAP_ANON) + fd = open("/dev/zero", O_RDWR); + address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED, + fd, 0); + close(fd); if (address == MAP_FAILED)...
2023 May 24
4
[PATCH 0/3] vhost-scsi: Fix IO hangs when using windows
The following patches were made over Linus's tree and fix an issue where windows guests will send iovecs with offset/lengths that result in IOs that are not aligned to 512. The LIO layer will then send them to Linux's block layer but it requires 512 byte alignment, so depending on the block driver being used we will get IO errors or hung IO. The following patches have vhost-scsi detect
2018 Sep 10
3
[msan] Failing mmap.cc test
The mmap.cc test is failing for me on aarch64 SuSE 12. The assert assert(AddrIsApp(p)) fails. The last value printed from mmap is 0xf00000000 which is indeed not MAP_FAILED but also not a valid address acoording to mmap.cc's mapping table. Is there something about SuSE 12's kernel that behaves differently from what this test expects? I am not a kernel guy... The sequence of the last handful of addresses returned and printed by the test is: 0x5600000000 0...
2018 Sep 11
2
[msan] Failing mmap.cc test
...On Mon, Sep 10, 2018 at 8:54 AM, David Greene via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > The mmap.cc test is failing for me on aarch64 SuSE 12. The assert > assert(AddrIsApp(p)) fails. The last value printed from mmap is > 0xf00000000 which is indeed not MAP_FAILED but also not a valid > address > acoording to mmap.cc's mapping table. > > Is there something about SuSE 12's kernel that behaves differently > from > what this test expects? I am not a kernel guy... > > The sequence of the last ha...
2002 Apr 03
0
[Bug 201] New: Building openssh from CVS fails on AIX 4.2.1
...: normal Priority: P2 Component: sshd AssignedTo: openssh-unix-dev at mindrot.org ReportedBy: dtucker at zip.com.au While compiling from CVS, monitor_mm.c on AIX 4.2.1, gcc gives the following error: monitor_mm.c: In function `mm_create': monitor_mm.c:87: `MAP_FAILED' undeclared (first use in this function) monitor_mm.c:87: (Each undeclared identifier is reported only once monitor_mm.c:87: for each function it appears in.) make: *** [monitor_mm.o] Error 1 This does not occur on AIX 4.3.3, where /usr/include/sys/mman.h contains "#define MAP_FAILED (...
2014 Nov 21
4
Bug#767295: [PATCH for-4.5 v2] libxc: don't leak buffer containing the uncompressed PV kernel
..., 0, sizeof(*block)); >> - block->mmap_len = size; >> - block->mmap_ptr = mmap(NULL, block->mmap_len, >> - PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, >> - -1, 0); >> - if ( block->mmap_ptr == MAP_FAILED ) >> + block->len = size; >> + block->ptr = mmap(NULL, block->len, >> + PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, >> + -1, 0); >> + if ( block->ptr == MAP_FAILED ) >> { >>...
2017 Sep 12
2
[PATCH] drm: qxl: ratelimit pr_info message, reduce log spamming
...ernel log with qxl_mmap information messages. The following example code illustrates this: int main(void) { int fd = open("/dev/dri/card0", O_RDONLY); if (fd == -1) err(1, "open failed"); for (;;) { void *m = mmap(NULL, 4096, PROT_READ, MAP_SHARED, fd, 0); if (m != MAP_FAILED) munmap(m, 4096); } } Reduce the spamming by ratelimiting the pr_info messages. Signed-off-by: Colin Ian King <colin.king at canonical.com> --- drivers/gpu/drm/qxl/qxl_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gp...
2017 Sep 12
2
[PATCH] drm: qxl: ratelimit pr_info message, reduce log spamming
...ernel log with qxl_mmap information messages. The following example code illustrates this: int main(void) { int fd = open("/dev/dri/card0", O_RDONLY); if (fd == -1) err(1, "open failed"); for (;;) { void *m = mmap(NULL, 4096, PROT_READ, MAP_SHARED, fd, 0); if (m != MAP_FAILED) munmap(m, 4096); } } Reduce the spamming by ratelimiting the pr_info messages. Signed-off-by: Colin Ian King <colin.king at canonical.com> --- drivers/gpu/drm/qxl/qxl_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gp...
2002 Jun 26
0
IRIX 6.5 patch for Compression with UsePrivilegeSeparation
...mmalloc; -#ifdef HAVE_MMAP_ANON_SHARED +#if defined(HAVE_MMAP_DEV_ZERO) + fd_zero = open ("/dev/zero", O_RDWR); + if (!fd_zero) + fatal("open(/dev/zero): %s", strerror(errno)); + address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_SHARED, + fd_zero, 0); + if (address == MAP_FAILED) + fatal("mmap(%lu): %s", (u_long)size, strerror(errno)); + close (fd_zero); +#elif defined(HAVE_MMAP_ANON_SHARED) address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED, -1, 0); if (address == MAP_FAILED) @@ -130,7 +142,7 @@ mm_freelist(mm->mmalloc, &...
2020 Jun 19
0
[PATCH 15/16] mm/hmm/test: add self tests for THP migration
...-1; + buffer->size = 2 * size; + buffer->mirror = malloc(size); + ASSERT_NE(buffer->mirror, NULL); + memset(buffer->mirror, 0xFF, size); + + buffer->ptr = mmap(NULL, 2 * size, + PROT_READ, + MAP_PRIVATE | MAP_ANONYMOUS, + buffer->fd, 0); + ASSERT_NE(buffer->ptr, MAP_FAILED); + + npages = size >> self->page_shift; + map = (void *)ALIGN((uintptr_t)buffer->ptr, size); + ret = madvise(map, size, MADV_HUGEPAGE); + ASSERT_EQ(ret, 0); + old_ptr = buffer->ptr; + buffer->ptr = map; + + /* Migrate memory to device. */ + ret = hmm_dmirror_cmd(self->fd, HM...
2019 Sep 11
6
[PATCH 0/4] HMM tests and minor fixes
These changes are based on Jason's latest hmm branch. Patch 1 was previously posted here [1] but was dropped from the orginal series. Hopefully, the tests will reduce concerns about edge conditions. I'm sure more tests could be usefully added but I thought this was a good starting point. [1] https://lore.kernel.org/linux-mm/20190726005650.2566-6-rcampbell at nvidia.com/ Ralph Campbell
2007 Mar 19
0
[PATCH 2/3] [RFC] User-space grant table device - changes to libxc
...void *addr; + + op.domid = domid; + op.ref = ref; + map.count = 1; + map.refs = &op; + + if (ioctl(xcg_handle, IOCTL_GNTDEV_MAP_GRANT_REF, &map)) { + return NULL; + } + + addr = mmap(NULL, PAGE_SIZE, prot, MAP_SHARED, xcg_handle, map.index); + if (addr == MAP_FAILED) { + return NULL; + } + + return addr; +} + +void *xc_gnttab_map_grant_refs(int xcg_handle, + uint32_t count, + uint32_t domids[count], + uint32_t refs[count], + in...
2020 Jan 13
9
[PATCH v6 0/6] mm/hmm/test: add self tests for HMM
This series adds new functions to the mmu interval notifier API to allow device drivers with MMUs to dynamically mirror a process' page tables based on device faults and invalidation callbacks. The Nouveau driver is updated to use the extended API and a set of stand alone self tests is added to help validate and maintain correctness. The patches are based on linux-5.5.0-rc6 and are for
2002 Jun 25
2
Linux 2.2 + borken mmap() round 1
...25 -0000 1.10 +++ monitor_mm.c 25 Jun 2002 00:16:09 -0000 @@ -84,13 +84,11 @@ */ mm->mmalloc = mmalloc; -#if defined(HAVE_MMAP) && defined(MAP_ANON) +#ifdef HAVE_MMAP_ANON_SHARED address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED, -1, 0); - if (address == MAP_FAILED) - fatal("mmap(%lu): %s", (u_long)size, strerror(errno)); #else - fatal("%s: UsePrivilegeSeparation=yes not supported", + fatal("%s: UsePrivilegeSeparation=yes and Compression=yes not supported", __func__); #endif Index: servconf.c =========================...