Date: Sun, 19 Oct 2008 06:10:00 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r184043 - in user/kmacy/HEAD_ECMP: gnu/usr.bin/gdb/arch/amd64 gnu/usr.bin/gdb/arch/i386 lib/libarchive lib/libarchive/test lib/libc lib/libc/stdlib lib/libc/string lib/libkvm lib/libuti... Message-ID: <200810190610.m9J6A00i035501@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kmacy Date: Sun Oct 19 06:09:59 2008 New Revision: 184043 URL: http://svn.freebsd.org/changeset/base/184043 Log: IF_HEAD 183298:184042 Added: user/kmacy/HEAD_ECMP/lib/libarchive/test/test_acl_freebsd.c user/kmacy/HEAD_ECMP/share/syscons/keymaps/eee_nordic.kbd Modified: user/kmacy/HEAD_ECMP/gnu/usr.bin/gdb/arch/amd64/Makefile user/kmacy/HEAD_ECMP/gnu/usr.bin/gdb/arch/i386/Makefile user/kmacy/HEAD_ECMP/lib/libarchive/archive_write_disk.c user/kmacy/HEAD_ECMP/lib/libarchive/test/Makefile user/kmacy/HEAD_ECMP/lib/libarchive/test/test_acl_basic.c user/kmacy/HEAD_ECMP/lib/libc/ (props changed) user/kmacy/HEAD_ECMP/lib/libc/stdlib/Makefile.inc user/kmacy/HEAD_ECMP/lib/libc/string/strxfrm.c user/kmacy/HEAD_ECMP/lib/libkvm/kvm.c user/kmacy/HEAD_ECMP/lib/libkvm/kvm_minidump_amd64.c user/kmacy/HEAD_ECMP/lib/libkvm/kvm_minidump_i386.c user/kmacy/HEAD_ECMP/lib/libutil/login_times.c user/kmacy/HEAD_ECMP/lib/libutil/logwtmp.c user/kmacy/HEAD_ECMP/lib/libutil/realhostname.c user/kmacy/HEAD_ECMP/sbin/dhclient/dhclient.c user/kmacy/HEAD_ECMP/sbin/dhclient/dhcp.h user/kmacy/HEAD_ECMP/sbin/dhclient/tables.c user/kmacy/HEAD_ECMP/share/man/man4/ddb.4 user/kmacy/HEAD_ECMP/share/syscons/keymaps/INDEX.keymaps user/kmacy/HEAD_ECMP/sys/amd64/linux32/linux32_sysvec.c user/kmacy/HEAD_ECMP/sys/arm/arm/swtch.S user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-cyrix.c user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-marvell.c user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-national.c user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-serverworks.c user/kmacy/HEAD_ECMP/sys/dev/cxgb/cxgb_sge.c user/kmacy/HEAD_ECMP/sys/dev/mii/e1000phy.c user/kmacy/HEAD_ECMP/sys/dev/mmc/mmc.c user/kmacy/HEAD_ECMP/sys/dev/mmc/mmcreg.h user/kmacy/HEAD_ECMP/sys/dev/mmc/mmcsd.c user/kmacy/HEAD_ECMP/sys/dev/mmc/mmcvar.h user/kmacy/HEAD_ECMP/sys/dev/usb/usb_quirks.c user/kmacy/HEAD_ECMP/sys/dev/usb/usbdevs user/kmacy/HEAD_ECMP/sys/i386/i386/trap.c user/kmacy/HEAD_ECMP/sys/i386/include/cpufunc.h user/kmacy/HEAD_ECMP/sys/i386/include/trap.h user/kmacy/HEAD_ECMP/sys/i386/xen/locore.s user/kmacy/HEAD_ECMP/sys/i386/xen/xen_machdep.c user/kmacy/HEAD_ECMP/sys/kern/kern_fork.c user/kmacy/HEAD_ECMP/sys/kern/kern_prot.c user/kmacy/HEAD_ECMP/sys/kern/kern_synch.c user/kmacy/HEAD_ECMP/sys/kern/kern_thread.c user/kmacy/HEAD_ECMP/sys/kern/subr_trap.c user/kmacy/HEAD_ECMP/sys/kern/subr_witness.c user/kmacy/HEAD_ECMP/sys/kern/uipc_socket.c user/kmacy/HEAD_ECMP/sys/netinet/if_ether.c user/kmacy/HEAD_ECMP/sys/netinet/ip_divert.c user/kmacy/HEAD_ECMP/sys/netinet/raw_ip.c user/kmacy/HEAD_ECMP/sys/netinet/sctp_crc32.c user/kmacy/HEAD_ECMP/sys/netinet/sctp_output.c user/kmacy/HEAD_ECMP/sys/netinet/sctp_sysctl.c user/kmacy/HEAD_ECMP/sys/netinet/sctp_uio.h user/kmacy/HEAD_ECMP/sys/netinet/sctp_usrreq.c user/kmacy/HEAD_ECMP/sys/netinet/sctputil.c user/kmacy/HEAD_ECMP/sys/netinet/tcp_subr.c user/kmacy/HEAD_ECMP/sys/netinet/udp_usrreq.c user/kmacy/HEAD_ECMP/sys/security/mac/mac_framework.h user/kmacy/HEAD_ECMP/sys/security/mac/mac_inet.c user/kmacy/HEAD_ECMP/sys/security/mac/mac_policy.h user/kmacy/HEAD_ECMP/sys/security/mac_biba/mac_biba.c user/kmacy/HEAD_ECMP/sys/security/mac_lomac/mac_lomac.c user/kmacy/HEAD_ECMP/sys/security/mac_mls/mac_mls.c user/kmacy/HEAD_ECMP/sys/security/mac_partition/mac_partition.c user/kmacy/HEAD_ECMP/sys/security/mac_seeotheruids/mac_seeotheruids.c user/kmacy/HEAD_ECMP/sys/security/mac_stub/mac_stub.c user/kmacy/HEAD_ECMP/sys/security/mac_test/mac_test.c user/kmacy/HEAD_ECMP/sys/sys/systm.h user/kmacy/HEAD_ECMP/usr.bin/ministat/Makefile user/kmacy/HEAD_ECMP/usr.bin/ministat/ministat.c user/kmacy/HEAD_ECMP/usr.bin/netstat/inet.c user/kmacy/HEAD_ECMP/usr.bin/netstat/route.c user/kmacy/HEAD_ECMP/usr.sbin/pkg_install/add/main.c user/kmacy/HEAD_ECMP/usr.sbin/setfib/setfib.c user/kmacy/HEAD_ECMP/usr.sbin/sysinstall/keymap.c Modified: user/kmacy/HEAD_ECMP/gnu/usr.bin/gdb/arch/amd64/Makefile ============================================================================== --- user/kmacy/HEAD_ECMP/gnu/usr.bin/gdb/arch/amd64/Makefile Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/gnu/usr.bin/gdb/arch/amd64/Makefile Sun Oct 19 06:09:59 2008 (r184043) @@ -7,7 +7,7 @@ LIBSRCS+= amd64-nat.c amd64bsd-nat.c amd .endif LIBSRCS+= solib.c solib-svr4.c LIBSRCS+= amd64-tdep.c amd64fbsd-tdep.c i386-tdep.c i386bsd-tdep.c \ - i386fbsd-tdep-fixed.c i387-tdep.c + i386fbsd-tdep-fixed.c i387-tdep.c nm.h: echo '#include "i386/nm-fbsd64.h"' > ${.TARGET} @@ -18,7 +18,7 @@ tm.h: xm.h: echo '#include "i386/xm-i386.h"' > ${.TARGET} +# Fix source static/extern mismatch nits that GCC 4.2 warns about. +CLEANFILES+= i386fbsd-tdep-fixed.c i386fbsd-tdep-fixed.c: i386fbsd-tdep.c sed -e '48s/^static //' ${.ALLSRC} > ${.TARGET} - -CLEANFILES+= i386fbsd-tdep-fixed.c Modified: user/kmacy/HEAD_ECMP/gnu/usr.bin/gdb/arch/i386/Makefile ============================================================================== --- user/kmacy/HEAD_ECMP/gnu/usr.bin/gdb/arch/i386/Makefile Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/gnu/usr.bin/gdb/arch/i386/Makefile Sun Oct 19 06:09:59 2008 (r184043) @@ -17,6 +17,7 @@ tm.h: xm.h: echo '#include "i386/xm-i386.h"' > ${.TARGET} +# Fix source static/extern mismatch nits that GCC 4.2 warns about. +CLEANFILES += i386fbsd-tdep-fixed.c i386fbsd-tdep-fixed.c: i386fbsd-tdep.c sed -e '48s/^static\ //' ${.ALLSRC} > ${.TARGET} -CLEANFILES += i386fbsd-tdep-fixed.c Modified: user/kmacy/HEAD_ECMP/lib/libarchive/archive_write_disk.c ============================================================================== --- user/kmacy/HEAD_ECMP/lib/libarchive/archive_write_disk.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/lib/libarchive/archive_write_disk.c Sun Oct 19 06:09:59 2008 (r184043) @@ -710,10 +710,6 @@ _archive_write_finish_entry(struct archi int r2 = set_mode(a, a->mode); if (r2 < ret) ret = r2; } - if (a->todo & TODO_TIMES) { - int r2 = set_times(a); - if (r2 < ret) ret = r2; - } if (a->todo & TODO_ACLS) { int r2 = set_acls(a); if (r2 < ret) ret = r2; @@ -726,6 +722,10 @@ _archive_write_finish_entry(struct archi int r2 = set_fflags(a); if (r2 < ret) ret = r2; } + if (a->todo & TODO_TIMES) { + int r2 = set_times(a); + if (r2 < ret) ret = r2; + } /* If there's an fd, we can close it now. */ if (a->fd >= 0) { Modified: user/kmacy/HEAD_ECMP/lib/libarchive/test/Makefile ============================================================================== --- user/kmacy/HEAD_ECMP/lib/libarchive/test/Makefile Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/lib/libarchive/test/Makefile Sun Oct 19 06:09:59 2008 (r184043) @@ -9,6 +9,7 @@ LA_SRCS!=make -f ${LA_SRCDIR}/Makefile - TESTS= \ test_acl_basic.c \ + test_acl_freebsd.c \ test_acl_pax.c \ test_archive_api_feature.c \ test_bad_fd.c \ Modified: user/kmacy/HEAD_ECMP/lib/libarchive/test/test_acl_basic.c ============================================================================== --- user/kmacy/HEAD_ECMP/lib/libarchive/test/test_acl_basic.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/lib/libarchive/test/test_acl_basic.c Sun Oct 19 06:09:59 2008 (r184043) @@ -27,8 +27,7 @@ __FBSDID("$FreeBSD$"); /* * Exercise the system-independent portion of the ACL support. - * Check that archive_entry objects can save and restore ACL data - * and that pax archive can save and restore ACL data. + * Check that archive_entry objects can save and restore ACL data. * * This should work on all systems, regardless of whether local * filesystems support ACLs or not. @@ -42,7 +41,7 @@ struct acl_t { const char *name; /* Name of user/group, depending on tag. */ }; -struct acl_t acls0[] = { +static struct acl_t acls0[] = { { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_EXECUTE, ARCHIVE_ENTRY_ACL_USER_OBJ, 0, "" }, { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_READ, @@ -51,7 +50,7 @@ struct acl_t acls0[] = { ARCHIVE_ENTRY_ACL_OTHER, 0, "" }, }; -struct acl_t acls1[] = { +static struct acl_t acls1[] = { { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_EXECUTE, ARCHIVE_ENTRY_ACL_USER_OBJ, -1, "" }, { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_READ, @@ -62,7 +61,7 @@ struct acl_t acls1[] = { ARCHIVE_ENTRY_ACL_OTHER, -1, "" }, }; -struct acl_t acls2[] = { +static struct acl_t acls2[] = { { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_EXECUTE | ARCHIVE_ENTRY_ACL_READ, ARCHIVE_ENTRY_ACL_USER_OBJ, -1, "" }, { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_READ, Added: user/kmacy/HEAD_ECMP/lib/libarchive/test/test_acl_freebsd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/kmacy/HEAD_ECMP/lib/libarchive/test/test_acl_freebsd.c Sun Oct 19 06:09:59 2008 (r184043) @@ -0,0 +1,243 @@ +/*- + * Copyright (c) 2003-2008 Tim Kientzle + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "test.h" +__FBSDID("$FreeBSD$"); + +#if defined(__FreeBSD__) && __FreeBSD__ > 4 +#include <sys/acl.h> + +struct myacl_t { + int type; /* Type of ACL: "access" or "default" */ + int permset; /* Permissions for this class of users. */ + int tag; /* Owner, User, Owning group, group, other, etc. */ + int qual; /* GID or UID of user/group, depending on tag. */ + const char *name; /* Name of user/group, depending on tag. */ +}; + +static struct myacl_t acls2[] = { + { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_EXECUTE | ARCHIVE_ENTRY_ACL_READ, + ARCHIVE_ENTRY_ACL_USER_OBJ, -1, "" }, + { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_READ, + ARCHIVE_ENTRY_ACL_USER, 77, "user77" }, + { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, 0, + ARCHIVE_ENTRY_ACL_USER, 78, "user78" }, + { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_READ, + ARCHIVE_ENTRY_ACL_GROUP_OBJ, -1, "" }, + { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, 0007, + ARCHIVE_ENTRY_ACL_GROUP, 78, "group78" }, + { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, + ARCHIVE_ENTRY_ACL_WRITE | ARCHIVE_ENTRY_ACL_EXECUTE, + ARCHIVE_ENTRY_ACL_OTHER, -1, "" }, + { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, + ARCHIVE_ENTRY_ACL_WRITE | ARCHIVE_ENTRY_ACL_READ | ARCHIVE_ENTRY_ACL_EXECUTE, + ARCHIVE_ENTRY_ACL_MASK, -1, "" }, + { 0, 0, 0, 0, NULL } +}; + +static void +set_acls(struct archive_entry *ae, struct myacl_t *acls) +{ + int i; + + archive_entry_acl_clear(ae); + for (i = 0; acls[i].name != NULL; i++) { + archive_entry_acl_add_entry(ae, + acls[i].type, acls[i].permset, acls[i].tag, acls[i].qual, + acls[i].name); + } +} + +static int +acl_match(acl_entry_t aclent, struct myacl_t *myacl) +{ + acl_tag_t tag_type; + acl_permset_t opaque_ps; + int permset = 0; + + acl_get_tag_type(aclent, &tag_type); + + /* translate the silly opaque permset to a bitmap */ + acl_get_permset(aclent, &opaque_ps); + if (acl_get_perm_np(opaque_ps, ACL_EXECUTE)) + permset |= ARCHIVE_ENTRY_ACL_EXECUTE; + if (acl_get_perm_np(opaque_ps, ACL_WRITE)) + permset |= ARCHIVE_ENTRY_ACL_WRITE; + if (acl_get_perm_np(opaque_ps, ACL_READ)) + permset |= ARCHIVE_ENTRY_ACL_READ; + + if (permset != myacl->permset) + return (0); + + switch (tag_type) { + case ACL_USER_OBJ: + if (myacl->tag != ARCHIVE_ENTRY_ACL_USER_OBJ) return (0); + break; + case ACL_USER: + if (myacl->tag != ARCHIVE_ENTRY_ACL_USER) + return (0); + if ((uid_t)myacl->qual != *(uid_t *)acl_get_qualifier(aclent)) + return (0); + break; + case ACL_GROUP_OBJ: + if (myacl->tag != ARCHIVE_ENTRY_ACL_GROUP_OBJ) return (0); + break; + case ACL_GROUP: + if (myacl->tag != ARCHIVE_ENTRY_ACL_GROUP) + return (0); + if ((gid_t)myacl->qual != *(gid_t *)acl_get_qualifier(aclent)) + return (0); + break; + case ACL_MASK: + if (myacl->tag != ARCHIVE_ENTRY_ACL_MASK) return (0); + break; + case ACL_OTHER: + if (myacl->tag != ARCHIVE_ENTRY_ACL_OTHER) return (0); + break; + } + return (1); +} + +static void +compare_acls(acl_t acl, struct myacl_t *myacls) +{ + int *marker; + int entry_id = ACL_FIRST_ENTRY; + int matched; + int i, n; + acl_entry_t acl_entry; + + /* Count ACL entries in myacls array and allocate an indirect array. */ + for (n = 0; myacls[n].name != NULL; ++n) + continue; + marker = malloc(sizeof(marker[0]) * n); + for (i = 0; i < n; i++) + marker[i] = i; + + /* + * Iterate over acls in system acl object, try to match each + * one with an item in the myacls array. + */ + while (1 == acl_get_entry(acl, entry_id, &acl_entry)) { + /* After the first time... */ + entry_id = ACL_NEXT_ENTRY; + + /* Search for a matching entry (tag and qualifier) */ + for (i = 0, matched = 0; i < n && !matched; i++) { + if (acl_match(acl_entry, &myacls[marker[i]])) { + /* We found a match; remove it. */ + marker[i] = marker[n - 1]; + n--; + matched = 1; + } + } + + /* TODO: Print out more details in this case. */ + failure("ACL entry on file that shouldn't be there"); + assert(matched == 1); + } + + /* Dump entries in the myacls array that weren't in the system acl. */ + for (i = 0; i < n; ++i) { + failure(" ACL entry missing from file: " + "type=%d,permset=%d,tag=%d,qual=%d,name=``%s''\n", + myacls[marker[i]].type, myacls[marker[i]].permset, + myacls[marker[i]].tag, myacls[marker[i]].qual, + myacls[marker[i]].name); + assert(0); /* Record this as a failure. */ + } + free(marker); +} + +#endif + + +/* + * Verify ACL restore-to-disk. This test is FreeBSD-specific. + */ + +DEFINE_TEST(test_acl_freebsd) +{ +#if !defined(__FreeBSD__) + skipping("FreeBSD-specific ACL restore test"); +#elif __FreeBSD__ < 5 + skipping("ACL restore supported only on FreeBSD 5.0 and later"); +#else + struct stat st; + struct archive *a; + struct archive_entry *ae; + int n, fd; + acl_t acl; + + /* + * First, do a quick manual set/read of ACL data to + * verify that the local filesystem does support ACLs. + * If it doesn't, we'll simply skip the remaining tests. + */ + acl = acl_from_text("u::rwx,u:1:rw,g::rwx,g:15:rx,o::rwx,m::rwx"); + assert((void *)acl != NULL); + /* Create a test file and try to set an ACL on it. */ + fd = open("pretest", O_WRONLY | O_CREAT | O_EXCL, 0777); + failure("Could not create test file?!"); + n = -1; + if (assert(fd >= 0)) { + n = acl_set_fd(fd, acl); + failure("acl_set_fd(): errno = %d (%s)", + errno, strerror(errno)); + assertEqualInt(0, n); + close(fd); + } + + if (fd < 0 || n != 0) { + skipping("ACL tests require that ACL support be enabled on the filesystem"); + return; + } + + /* Create a write-to-disk object. */ + assert(NULL != (a = archive_write_disk_new())); + archive_write_disk_set_options(a, + ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_PERM | ARCHIVE_EXTRACT_ACL); + + /* Populate an archive entry with some metadata, including ACL info */ + ae = archive_entry_new(); + assert(ae != NULL); + archive_entry_set_pathname(ae, "test0"); + archive_entry_set_mtime(ae, 123456, 7890); + archive_entry_set_size(ae, 0); + set_acls(ae, acls2); + assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae)); + archive_entry_free(ae); + + /* Close the archive. */ + assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a)); + assertEqualInt(ARCHIVE_OK, archive_write_finish(a)); + + /* Verify the data on disk. */ + assertEqualInt(0, stat("test0", &st)); + assertEqualInt(st.st_mtime, 123456); + acl = acl_get_file("test0", ACL_TYPE_ACCESS); + assert(acl != (acl_t)NULL); + compare_acls(acl, acls2); +#endif +} Modified: user/kmacy/HEAD_ECMP/lib/libc/stdlib/Makefile.inc ============================================================================== --- user/kmacy/HEAD_ECMP/lib/libc/stdlib/Makefile.inc Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/lib/libc/stdlib/Makefile.inc Sun Oct 19 06:09:59 2008 (r184043) @@ -48,3 +48,8 @@ MLINKS+=strtoul.3 strtoull.3 strtoul.3 s MLINKS+=malloc.3 calloc.3 malloc.3 free.3 malloc.3 malloc.conf.5 \ malloc.3 realloc.3 malloc.3 reallocf.3 malloc.3 malloc_usable_size.3 MLINKS+=tsearch.3 tdelete.3 tsearch.3 tfind.3 tsearch.3 twalk.3 + +.if defined(MALLOC_PRODUCTION) +CFLAGS+= -DMALLOC_PRODUCTION +.endif + Modified: user/kmacy/HEAD_ECMP/lib/libc/string/strxfrm.c ============================================================================== --- user/kmacy/HEAD_ECMP/lib/libc/string/strxfrm.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/lib/libc/string/strxfrm.c Sun Oct 19 06:09:59 2008 (r184043) @@ -51,8 +51,7 @@ strxfrm(char * __restrict dest, const ch if (slen < len) strcpy(dest, src); else { - strncpy(dest, src, len - 1); - dest[len - 1] = '\0'; + strlcpy(dest, src, len); } } return slen; Modified: user/kmacy/HEAD_ECMP/lib/libkvm/kvm.c ============================================================================== --- user/kmacy/HEAD_ECMP/lib/libkvm/kvm.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/lib/libkvm/kvm.c Sun Oct 19 06:09:59 2008 (r184043) @@ -244,11 +244,10 @@ kvm_openfiles(uf, mf, sf, flag, errout) { kvm_t *kd; - if ((kd = malloc(sizeof(*kd))) == NULL) { + if ((kd = calloc(1, sizeof(*kd))) == NULL) { (void)strlcpy(errout, strerror(errno), _POSIX2_LINE_MAX); return (0); } - memset(kd, 0, sizeof(*kd)); kd->program = 0; return (_kvm_open(kd, uf, mf, flag, errout)); } @@ -263,13 +262,12 @@ kvm_open(uf, mf, sf, flag, errstr) { kvm_t *kd; - if ((kd = malloc(sizeof(*kd))) == NULL) { + if ((kd = calloc(1, sizeof(*kd))) == NULL) { if (errstr != NULL) (void)fprintf(stderr, "%s: %s\n", errstr, strerror(errno)); return (0); } - memset(kd, 0, sizeof(*kd)); kd->program = errstr; return (_kvm_open(kd, uf, mf, flag, NULL)); } Modified: user/kmacy/HEAD_ECMP/lib/libkvm/kvm_minidump_amd64.c ============================================================================== --- user/kmacy/HEAD_ECMP/lib/libkvm/kvm_minidump_amd64.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/lib/libkvm/kvm_minidump_amd64.c Sun Oct 19 06:09:59 2008 (r184043) @@ -146,7 +146,6 @@ _kvm_minidump_initvtop(kvm_t *kd) return (-1); } kd->vmst = vmst; - bzero(vmst, sizeof(*vmst)); vmst->minidump = 1; if (pread(kd->pmfd, &vmst->hdr, sizeof(vmst->hdr), 0) != sizeof(vmst->hdr)) { Modified: user/kmacy/HEAD_ECMP/lib/libkvm/kvm_minidump_i386.c ============================================================================== --- user/kmacy/HEAD_ECMP/lib/libkvm/kvm_minidump_i386.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/lib/libkvm/kvm_minidump_i386.c Sun Oct 19 06:09:59 2008 (r184043) @@ -148,7 +148,6 @@ _kvm_minidump_initvtop(kvm_t *kd) return (-1); } kd->vmst = vmst; - bzero(vmst, sizeof(*vmst)); vmst->minidump = 1; if (pread(kd->pmfd, &vmst->hdr, sizeof(vmst->hdr), 0) != sizeof(vmst->hdr)) { Modified: user/kmacy/HEAD_ECMP/lib/libutil/login_times.c ============================================================================== --- user/kmacy/HEAD_ECMP/lib/libutil/login_times.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/lib/libutil/login_times.c Sun Oct 19 06:09:59 2008 (r184043) @@ -72,8 +72,7 @@ parse_lt(const char * str) char buf[64]; /* Make local copy and force lowercase to simplify parsing */ - p = strncpy(buf, str, sizeof buf); - buf[sizeof buf - 1] = '\0'; + p = strlcpy(buf, str, sizeof buf); for (i = 0; buf[i]; i++) buf[i] = (char)tolower(buf[i]); Modified: user/kmacy/HEAD_ECMP/lib/libutil/logwtmp.c ============================================================================== --- user/kmacy/HEAD_ECMP/lib/libutil/logwtmp.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/lib/libutil/logwtmp.c Sun Oct 19 06:09:59 2008 (r184043) @@ -59,8 +59,7 @@ logwtmp(const char *line, const char *na char fullhost[MAXHOSTNAMELEN]; int fd; - strncpy(fullhost, host, sizeof(fullhost) - 1); - fullhost[sizeof(fullhost) - 1] = '\0'; + strlcpy(fullhost, host, sizeof(fullhost)); trimdomain(fullhost, UT_HOSTSIZE); host = fullhost; Modified: user/kmacy/HEAD_ECMP/lib/libutil/realhostname.c ============================================================================== --- user/kmacy/HEAD_ECMP/lib/libutil/realhostname.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/lib/libutil/realhostname.c Sun Oct 19 06:09:59 2008 (r184043) @@ -61,8 +61,7 @@ realhostname(char *host, size_t hsize, c if (strlen(trimmed) <= hsize) { char lookup[MAXHOSTNAMELEN]; - strncpy(lookup, hp->h_name, sizeof(lookup) - 1); - lookup[sizeof(lookup) - 1] = '\0'; + strlcpy(lookup, hp->h_name, sizeof(lookup)); hp = gethostbyname(lookup); if (hp == NULL) result = HOSTNAME_INVALIDNAME; Modified: user/kmacy/HEAD_ECMP/sbin/dhclient/dhclient.c ============================================================================== --- user/kmacy/HEAD_ECMP/sbin/dhclient/dhclient.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/sbin/dhclient/dhclient.c Sun Oct 19 06:09:59 2008 (r184043) @@ -2317,12 +2317,16 @@ check_option(struct client_lease *l, int case DHO_NETBIOS_DD_SERVER: case DHO_FONT_SERVERS: case DHO_DHCP_SERVER_IDENTIFIER: + case DHO_NISPLUS_SERVERS: + case DHO_MOBILE_IP_HOME_AGENT: case DHO_SMTP_SERVER: case DHO_POP_SERVER: case DHO_NNTP_SERVER: case DHO_WWW_SERVER: case DHO_FINGER_SERVER: case DHO_IRC_SERVER: + case DHO_STREETTALK_SERVER: + case DHO_STREETTALK_DA_SERVER: if (!ipv4addrs(opbuf)) { warning("Invalid IP address in option: %s", opbuf); return (0); @@ -2330,6 +2334,8 @@ check_option(struct client_lease *l, int return (1) ; case DHO_HOST_NAME: case DHO_NIS_DOMAIN: + case DHO_NISPLUS_DOMAIN: + case DHO_TFTP_SERVER_NAME: if (!res_hnok(sbuf)) { warning("Bogus Host Name option %d: %s (%s)", option, sbuf, opbuf); @@ -2388,6 +2394,7 @@ check_option(struct client_lease *l, int case DHO_DHCP_REBINDING_TIME: case DHO_DHCP_CLASS_IDENTIFIER: case DHO_DHCP_CLIENT_IDENTIFIER: + case DHO_BOOTFILE_NAME: case DHO_DHCP_USER_CLASS_ID: case DHO_END: return (1); Modified: user/kmacy/HEAD_ECMP/sbin/dhclient/dhcp.h ============================================================================== --- user/kmacy/HEAD_ECMP/sbin/dhclient/dhcp.h Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/sbin/dhclient/dhcp.h Sun Oct 19 06:09:59 2008 (r184043) @@ -155,12 +155,19 @@ struct dhcp_packet { #define DHO_DHCP_REBINDING_TIME 59 #define DHO_DHCP_CLASS_IDENTIFIER 60 #define DHO_DHCP_CLIENT_IDENTIFIER 61 +#define DHO_NISPLUS_DOMAIN 64 +#define DHO_NISPLUS_SERVERS 65 +#define DHO_TFTP_SERVER_NAME 66 +#define DHO_BOOTFILE_NAME 67 +#define DHO_MOBILE_IP_HOME_AGENT 68 #define DHO_SMTP_SERVER 69 #define DHO_POP_SERVER 70 #define DHO_NNTP_SERVER 71 #define DHO_WWW_SERVER 72 #define DHO_FINGER_SERVER 73 #define DHO_IRC_SERVER 74 +#define DHO_STREETTALK_SERVER 75 +#define DHO_STREETTALK_DA_SERVER 76 #define DHO_DHCP_USER_CLASS_ID 77 #define DHO_CLASSLESS_ROUTES 121 #define DHO_END 255 Modified: user/kmacy/HEAD_ECMP/sbin/dhclient/tables.c ============================================================================== --- user/kmacy/HEAD_ECMP/sbin/dhclient/tables.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/sbin/dhclient/tables.c Sun Oct 19 06:09:59 2008 (r184043) @@ -387,13 +387,25 @@ unsigned char dhcp_option_default_priori DHO_FONT_SERVERS, DHO_X_DISPLAY_MANAGER, DHO_DHCP_PARAMETER_REQUEST_LIST, + DHO_NISPLUS_DOMAIN, + DHO_NISPLUS_SERVERS, + DHO_TFTP_SERVER_NAME, + DHO_BOOTFILE_NAME, + DHO_MOBILE_IP_HOME_AGENT, + DHO_SMTP_SERVER, + DHO_POP_SERVER, + DHO_NNTP_SERVER, + DHO_WWW_SERVER, + DHO_FINGER_SERVER, + DHO_IRC_SERVER, + DHO_STREETTALK_SERVER, + DHO_STREETTALK_DA_SERVER, /* Presently-undefined options... */ - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 62, 63, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, Modified: user/kmacy/HEAD_ECMP/share/man/man4/ddb.4 ============================================================================== --- user/kmacy/HEAD_ECMP/share/man/man4/ddb.4 Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/share/man/man4/ddb.4 Sun Oct 19 06:09:59 2008 (r184043) @@ -60,7 +60,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 4, 2008 +.Dd October 18, 2008 .Dt DDB 4 .Os .Sh NAME Modified: user/kmacy/HEAD_ECMP/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- user/kmacy/HEAD_ECMP/share/syscons/keymaps/INDEX.keymaps Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/share/syscons/keymaps/INDEX.keymaps Sun Oct 19 06:09:59 2008 (r184043) @@ -99,6 +99,8 @@ danish.cp865.kbd:fr:Danois Code page 865 danish.cp865.kbd:pt:Dinamarquês Codepage 865 danish.cp865.kbd:es:Danés Codepage 865 +eee_nordic.kbd:en:Nordic layout on Asus eeePC + el.iso07.kbd:en:Greek ISO-8859-7 (104 keys) el.iso07.kbd:el:Åëëçíéêü ISO-8859-7 (104 ðëÞêôñùí) Added: user/kmacy/HEAD_ECMP/share/syscons/keymaps/eee_nordic.kbd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/kmacy/HEAD_ECMP/share/syscons/keymaps/eee_nordic.kbd Sun Oct 19 06:09:59 2008 (r184043) @@ -0,0 +1,131 @@ +# $FreeBSD$ +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' nop nop nop nop nop nop O + 003 '2' '"' nul nul '@' '@' nul nul O + 004 '3' '#' nop nop 163 nop nop nop O + 005 '4' 164 nop nop '$' nop nop nop O + 006 '5' '%' nop nop nop nop nop nop O + 007 '6' '&' nop nop nop nop nop nop O +# Alt + Shift + 7 = ÷ + 008 '7' '/' nop nop '{' '÷' nop nop O + 009 '8' '(' nop nop '[' nop nop nop O + 010 '9' ')' nop nop ']' nop gs nop O + 011 '0' '=' nop nop '}' nop nop nop O + 012 '+' '?' nop nop '\' nop fs nop O +# For left of backspace key, gives with Alt=' and Alt+Shift+Key=| + 013 128 '`' nop nop 39 '|' nop nop O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C + 017 'w' 'W' etb etb 'w' 'W' etb etb C +# Alt + Ctrl + E = French e (as in café) + 018 'e' 'E' enq enq 164 'E' 'é' enq C +# Alt + R = Copyright sign + 019 'r' 'R' dc2 dc2 '®' 'R' dc2 dc2 C + 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 021 'y' 'Y' em em 'y' 'Y' em em C +# Alt + U = Mikro, Alt + Shift + U = German u + 022 'u' 'U' nak nak 'µ' 'U' 'ü' 'Ãœ' C + 023 'i' 'I' ht ht 'i' 'I' ht ht C +# Alt + O = Norwegian/Danish Ö + 024 'o' 'O' si si 'ø' 'Ø' si si C +# Alt + P = Pi + 025 'p' 'P' dle dle '¶' 'P' dle dle C + 026 229 197 nop nop '}' ']' nop nop C + 027 168 '^' nop nop '~' nop nop nop O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O +# Alt + A = At sign, Ctrl+Alt = ae, Ctrl+Alt+Shift = AE + 030 'a' 'A' soh soh '@' 'A' 'æ' 'Æ' C + 031 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 032 'd' 'D' eot eot 'd' 'D' eot eot C + 033 'f' 'F' ack ack 'f' 'F' ack ack C + 034 'g' 'G' bel bel 'g' 'G' bel bel C + 035 'h' 'H' bs bs 'h' 'H' bs bs C + 036 'j' 'J' nl nl 'j' 'J' nl nl C + 037 'k' 'K' vt vt 'k' 'K' vt vt C + 038 'l' 'L' ff ff 'l' 'L' ff ff C + 039 246 214 nop nop '|' '\' nop nop C + 040 228 196 nop nop '{' '[' nop nop C + 041 167 189 nop nop '\' '|' nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 ''' '*' nop nop nop nop nop nop O +# Alt + Z = Pipe + 044 'z' 'Z' sub sub '|' 'Z' sub sub C + 045 'x' 'X' can can 'x' 'X' can can C + 046 'c' 'C' etx etx 'c' 'C' etx etx C + 047 'v' 'V' syn syn 'v' 'V' syn syn C +# Ctrl + Shift + B = German B + 048 'b' 'B' stx 'ß' 'b' 'B' stx stx C + 049 'n' 'N' so so 'n' 'N' so so C +# Alt + M = Mikro + 050 'm' 'M' cr cr 181 'M' cr cr C +# Alt + [,/;] = < + 051 ',' ';' nop nop '<' '<' nop nop O +# Alt + [./:] = > + 052 '.' ':' nop nop '>' '>' nop nop O + 053 '-' '_' us nop '/' '?' nop nop O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' nop nop '|' nop nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' N + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O +# Alt+Arrow up = Page up + 095 fkey50 fkey50 fkey50 fkey50 fkey51 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O +# Alt+Arrow left = Home + 097 fkey53 fkey53 fkey53 fkey53 fkey49 fkey53 fkey53 fkey53 O +# Alt+Arrow right = End + 098 fkey55 fkey55 fkey55 fkey55 fkey57 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O +# Alt+Arrow down = Page down + 100 fkey58 fkey58 fkey58 fkey58 fkey59 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O Modified: user/kmacy/HEAD_ECMP/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- user/kmacy/HEAD_ECMP/sys/amd64/linux32/linux32_sysvec.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/sys/amd64/linux32/linux32_sysvec.c Sun Oct 19 06:09:59 2008 (r184043) @@ -843,7 +843,8 @@ exec_linux_setregs(td, entry, stack, ps_ fpstate_drop(td); /* Return via doreti so that we can change to a different %cs */ - pcb->pcb_flags |= PCB_FULLCTX; + pcb->pcb_flags |= PCB_FULLCTX | PCB_32BIT; + pcb->pcb_flags &= ~PCB_GS32BIT; td->td_retval[1] = 0; } Modified: user/kmacy/HEAD_ECMP/sys/arm/arm/swtch.S ============================================================================== --- user/kmacy/HEAD_ECMP/sys/arm/arm/swtch.S Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/sys/arm/arm/swtch.S Sun Oct 19 06:09:59 2008 (r184043) @@ -143,8 +143,6 @@ ENTRY(cpu_throw) ldr r9, .Lcpufuncs mov lr, pc ldr pc, [r9, #CF_IDCACHE_WBINV_ALL] - mov lr, pc - ldr pc, [r9, #CF_L2CACHE_WBINV_ALL] ldr r0, [r7, #(PCB_PL1VEC)] ldr r1, [r7, #(PCB_DACR)] /* @@ -174,8 +172,6 @@ ENTRY(cpu_throw) movne r1, #4 movne lr, pc ldrne pc, [r9, #CF_DCACHE_WB_RANGE] - movne lr, pc - ldrne pc, [r9, #CF_L2CACHE_WB_RANGE] #endif /* PMAP_INCLUDE_PTE_SYNC */ /* @@ -332,8 +328,6 @@ ENTRY(cpu_switch) ldr r1, .Lcpufuncs mov lr, pc ldr pc, [r1, #CF_IDCACHE_WBINV_ALL] - mov lr, pc - ldr pc, [r1, #CF_L2CACHE_WBINV_ALL] .Lcs_cache_purge_skipped: /* rem: r6 = lock */ /* rem: r9 = new PCB */ @@ -366,8 +360,6 @@ ENTRY(cpu_switch) mov r1, #4 mov lr, pc ldr pc, [r2, #CF_DCACHE_WB_RANGE] - mov lr, pc - ldr pc, [r2, #CF_L2CACHE_WB_RANGE] .Lcs_same_vector: #endif /* PMAP_INCLUDE_PTE_SYNC */ Modified: user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-cyrix.c ============================================================================== --- user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-cyrix.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-cyrix.c Sun Oct 19 06:09:59 2008 (r184043) @@ -109,7 +109,7 @@ ata_cyrix_setmode(device_t dev, int mode /* dont try to set the mode if we dont have the resource */ if (ctlr->r_res1) { ch->dma.alignment = 16; - ch->dma.max_iosize = 126 * DEV_BSIZE; + ch->dma.max_iosize = 64 * DEV_BSIZE; if (mode >= ATA_UDMA0) { ATA_OUTL(ch->r_io[ATA_BMCMD_PORT].res, Modified: user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-marvell.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-marvell.c Sun Oct 19 06:09:59 2008 (r184043) @@ -536,7 +536,7 @@ ata_marvell_edma_dmainit(device_t dev) ch->dma.max_address = BUS_SPACE_MAXADDR; /* chip does not reliably do 64K DMA transfers */ - ch->dma.max_iosize = 126 * DEV_BSIZE; + ch->dma.max_iosize = 64 * DEV_BSIZE; } ATA_DECLARE_DRIVER(ata_marvell); Modified: user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-national.c ============================================================================== --- user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-national.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-national.c Sun Oct 19 06:09:59 2008 (r184043) @@ -101,7 +101,7 @@ ata_national_setmode(device_t dev, int m int error; ch->dma.alignment = 16; - ch->dma.max_iosize = 126 * DEV_BSIZE; + ch->dma.max_iosize = 64 * DEV_BSIZE; mode = ata_limit_mode(dev, mode, ATA_UDMA2); Modified: user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-serverworks.c ============================================================================== --- user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-serverworks.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/sys/dev/ata/chipsets/ata-serverworks.c Sun Oct 19 06:09:59 2008 (r184043) @@ -79,7 +79,7 @@ ata_serverworks_probe(device_t dev) { ATA_CSB6, 0x00, SWKS_100, 0, ATA_UDMA5, "CSB6" }, { ATA_CSB6_1, 0x00, SWKS_66, 0, ATA_UDMA4, "CSB6" }, { ATA_HT1000, 0x00, SWKS_100, 0, ATA_UDMA5, "HT1000" }, - { ATA_HT1000_S1, 0x00, SWKS_100, 4, ATA_SA150, "HT1000" }, + { ATA_HT1000_S1, 0x00, SWKS_MIO, 4, ATA_SA150, "HT1000" }, { ATA_HT1000_S2, 0x00, SWKS_MIO, 4, ATA_SA150, "HT1000" }, { ATA_K2, 0x00, SWKS_MIO, 4, ATA_SA150, "K2" }, { ATA_FRODO4, 0x00, SWKS_MIO, 4, ATA_SA150, "Frodo4" }, @@ -184,7 +184,7 @@ ata_serverworks_allocate(device_t dev) ch->hw.tf_write = ata_serverworks_tf_write; /* chip does not reliably do 64K DMA transfers */ - ch->dma.max_iosize = 126 * DEV_BSIZE; + ch->dma.max_iosize = 64 * DEV_BSIZE; return 0; } Modified: user/kmacy/HEAD_ECMP/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- user/kmacy/HEAD_ECMP/sys/dev/cxgb/cxgb_sge.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/sys/dev/cxgb/cxgb_sge.c Sun Oct 19 06:09:59 2008 (r184043) @@ -1887,7 +1887,11 @@ t3_free_tx_desc(struct sge_txq *q, int r m_freem_iovec(&txsd->mi); buf_ring_scan(&q->txq_mr, txsd->mi.mi_base, __FILE__, __LINE__); txsd->mi.mi_base = NULL; - + /* + * XXX check for cache hit rate here + * + */ + q->port->ifp->if_opackets++; #if defined(DIAGNOSTIC) && 0 if (m_get_priority(txsd->m[0]) != cidx) printf("pri=%d cidx=%d\n", @@ -2505,6 +2509,7 @@ t3_rx_eth(struct adapter *adap, struct s m->m_pkthdr.rcvif = ifp; m->m_pkthdr.header = mtod(m, uint8_t *) + sizeof(*cpl) + ethpad; + ifp->if_ipackets++; #ifndef DISABLE_MBUF_IOVEC m_explode(m); #endif Modified: user/kmacy/HEAD_ECMP/sys/dev/mii/e1000phy.c ============================================================================== --- user/kmacy/HEAD_ECMP/sys/dev/mii/e1000phy.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/sys/dev/mii/e1000phy.c Sun Oct 19 06:09:59 2008 (r184043) @@ -153,6 +153,20 @@ e1000phy_attach(device_t dev) if (PHY_READ(sc, E1000_ESSR) & E1000_ESSR_FIBER_LINK) sc->mii_flags |= MIIF_HAVEFIBER; break; + case MII_MODEL_MARVELL_E1149: + /* + * Some 88E1149 PHY's page select is initialized to + * point to other bank instead of copper/fiber bank + * which in turn resulted in wrong registers were + * accessed during PHY operation. It is believed that + * page 0 should be used for copper PHY so reinitialize + * E1000_EADR to select default copper PHY. If parent + * device know the type of PHY(either copper or fiber), + * that information should be used to select default + * type of PHY. + */ + PHY_WRITE(sc, E1000_EADR, 0); + break; case MII_MODEL_MARVELL_E3082: /* 88E3082 10/100 Fast Ethernet PHY. */ sc->mii_anegticks = MII_ANEGTICKS; Modified: user/kmacy/HEAD_ECMP/sys/dev/mmc/mmc.c ============================================================================== --- user/kmacy/HEAD_ECMP/sys/dev/mmc/mmc.c Sun Oct 19 01:35:27 2008 (r184042) +++ user/kmacy/HEAD_ECMP/sys/dev/mmc/mmc.c Sun Oct 19 06:09:59 2008 (r184043) @@ -85,11 +85,13 @@ struct mmc_ivars { uint32_t raw_csd[4]; /* Raw bits of the CSD */ uint32_t raw_scr[2]; /* Raw bits of the SCR */ uint8_t raw_ext_csd[512]; /* Raw bits of the EXT_CSD */ + uint32_t raw_sd_status[16]; /* Raw bits of the SD_STATUS */ uint16_t rca; enum mmc_card_mode mode; struct mmc_cid cid; /* cid decoded */ struct mmc_csd csd; /* csd decoded */ struct mmc_scr scr; /* scr decoded */ + struct mmc_sd_status sd_status; /* SD_STATUS decoded */ u_char read_only; /* True when the device is read-only */ u_char bus_width; /* Bus width to use */ u_char timing; /* Bus timing support */ @@ -97,6 +99,7 @@ struct mmc_ivars { uint32_t sec_count; /* Card capacity in 512byte blocks */ uint32_t tran_speed; /* Max speed in normal mode */ uint32_t hs_tran_speed; /* Max speed in high speed mode */ + uint32_t erase_sector; /* Card native erase sector size */ }; #define CMD_RETRIES 3 @@ -723,9 +726,8 @@ mmc_test_bus_width(struct mmc_softc *sc) } static uint32_t -mmc_get_bits(uint32_t *bits, int start, int size) +mmc_get_bits(uint32_t *bits, int bit_len, int start, int size) { - const int bit_len = 128; const int i = (bit_len / 32) - (start / 32) - 1; const int shift = start & 31; uint32_t retval = bits[i] >> shift; @@ -741,14 +743,14 @@ mmc_decode_cid_sd(uint32_t *raw_cid, str /* There's no version info, so we take it on faith */ memset(cid, 0, sizeof(*cid)); - cid->mid = mmc_get_bits(raw_cid, 120, 8); - cid->oid = mmc_get_bits(raw_cid, 104, 16); + cid->mid = mmc_get_bits(raw_cid, 128, 120, 8); + cid->oid = mmc_get_bits(raw_cid, 128, 104, 16); for (i = 0; i < 5; i++) - cid->pnm[i] = mmc_get_bits(raw_cid, 96 - i * 8, 8); - cid->prv = mmc_get_bits(raw_cid, 56, 8); - cid->psn = mmc_get_bits(raw_cid, 24, 32); - cid->mdt_year = mmc_get_bits(raw_cid, 12, 8) + 2001; - cid->mdt_month = mmc_get_bits(raw_cid, 8, 4); + cid->pnm[i] = mmc_get_bits(raw_cid, 128, 96 - i * 8, 8); + cid->prv = mmc_get_bits(raw_cid, 128, 56, 8); + cid->psn = mmc_get_bits(raw_cid, 128, 24, 32); + cid->mdt_year = mmc_get_bits(raw_cid, 128, 12, 8) + 2001; + cid->mdt_month = mmc_get_bits(raw_cid, 128, 8, 4); } static void @@ -758,14 +760,14 @@ mmc_decode_cid_mmc(uint32_t *raw_cid, st /* There's no version info, so we take it on faith */ memset(cid, 0, sizeof(*cid)); - cid->mid = mmc_get_bits(raw_cid, 120, 8); - cid->oid = mmc_get_bits(raw_cid, 104, 8); + cid->mid = mmc_get_bits(raw_cid, 128, 120, 8); + cid->oid = mmc_get_bits(raw_cid, 128, 104, 8); for (i = 0; i < 6; i++) - cid->pnm[i] = mmc_get_bits(raw_cid, 96 - i * 8, 8); - cid->prv = mmc_get_bits(raw_cid, 48, 8); - cid->psn = mmc_get_bits(raw_cid, 16, 32); - cid->mdt_month = mmc_get_bits(raw_cid, 12, 4); - cid->mdt_year = mmc_get_bits(raw_cid, 8, 4) + 1997; + cid->pnm[i] = mmc_get_bits(raw_cid, 128, 96 - i * 8, 8); + cid->prv = mmc_get_bits(raw_cid, 128, 48, 8); + cid->psn = mmc_get_bits(raw_cid, 128, 16, 32); + cid->mdt_month = mmc_get_bits(raw_cid, 128, 12, 4); + cid->mdt_year = mmc_get_bits(raw_cid, 128, 8, 4) + 1997; } static const int exp[8] = { @@ -789,58 +791,58 @@ mmc_decode_csd_sd(uint32_t *raw_csd, str int e; memset(csd, 0, sizeof(*csd)); - csd->csd_structure = v = mmc_get_bits(raw_csd, 126, 2); + csd->csd_structure = v = mmc_get_bits(raw_csd, 128, 126, 2); if (v == 0) { - m = mmc_get_bits(raw_csd, 115, 4); - e = mmc_get_bits(raw_csd, 112, 3); + m = mmc_get_bits(raw_csd, 128, 115, 4); + e = mmc_get_bits(raw_csd, 128, 112, 3); csd->tacc = exp[e] * mant[m] + 9 / 10; - csd->nsac = mmc_get_bits(raw_csd, 104, 8) * 100; - m = mmc_get_bits(raw_csd, 99, 4); - e = mmc_get_bits(raw_csd, 96, 3); + csd->nsac = mmc_get_bits(raw_csd, 128, 104, 8) * 100; + m = mmc_get_bits(raw_csd, 128, 99, 4); + e = mmc_get_bits(raw_csd, 128, 96, 3); csd->tran_speed = exp[e] * 10000 * mant[m]; - csd->ccc = mmc_get_bits(raw_csd, 84, 12); - csd->read_bl_len = 1 << mmc_get_bits(raw_csd, 80, 4); - csd->read_bl_partial = mmc_get_bits(raw_csd, 79, 1); - csd->write_blk_misalign = mmc_get_bits(raw_csd, 78, 1); - csd->read_blk_misalign = mmc_get_bits(raw_csd, 77, 1); - csd->dsr_imp = mmc_get_bits(raw_csd, 76, 1); - csd->vdd_r_curr_min = cur_min[mmc_get_bits(raw_csd, 59, 3)]; - csd->vdd_r_curr_max = cur_max[mmc_get_bits(raw_csd, 56, 3)]; - csd->vdd_w_curr_min = cur_min[mmc_get_bits(raw_csd, 53, 3)]; - csd->vdd_w_curr_max = cur_max[mmc_get_bits(raw_csd, 50, 3)]; - m = mmc_get_bits(raw_csd, 62, 12); - e = mmc_get_bits(raw_csd, 47, 3); + csd->ccc = mmc_get_bits(raw_csd, 128, 84, 12); + csd->read_bl_len = 1 << mmc_get_bits(raw_csd, 128, 80, 4); + csd->read_bl_partial = mmc_get_bits(raw_csd, 128, 79, 1); + csd->write_blk_misalign = mmc_get_bits(raw_csd, 128, 78, 1); + csd->read_blk_misalign = mmc_get_bits(raw_csd, 128, 77, 1); + csd->dsr_imp = mmc_get_bits(raw_csd, 128, 76, 1); + csd->vdd_r_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 59, 3)]; + csd->vdd_r_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 56, 3)]; + csd->vdd_w_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 53, 3)]; + csd->vdd_w_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 50, 3)]; + m = mmc_get_bits(raw_csd, 128, 62, 12); + e = mmc_get_bits(raw_csd, 128, 47, 3); csd->capacity = ((1 + m) << (e + 2)) * csd->read_bl_len; - csd->erase_blk_en = mmc_get_bits(raw_csd, 46, 1); - csd->sector_size = mmc_get_bits(raw_csd, 39, 7); - csd->wp_grp_size = mmc_get_bits(raw_csd, 32, 7); - csd->wp_grp_enable = mmc_get_bits(raw_csd, 31, 1); - csd->r2w_factor = 1 << mmc_get_bits(raw_csd, 26, 3); - csd->write_bl_len = 1 << mmc_get_bits(raw_csd, 22, 4); - csd->write_bl_partial = mmc_get_bits(raw_csd, 21, 1); + csd->erase_blk_en = mmc_get_bits(raw_csd, 128, 46, 1); + csd->erase_sector = mmc_get_bits(raw_csd, 128, 39, 7) + 1; + csd->wp_grp_size = mmc_get_bits(raw_csd, 128, 32, 7); + csd->wp_grp_enable = mmc_get_bits(raw_csd, 128, 31, 1); + csd->r2w_factor = 1 << mmc_get_bits(raw_csd, 128, 26, 3); + csd->write_bl_len = 1 << mmc_get_bits(raw_csd, 128, 22, 4); + csd->write_bl_partial = mmc_get_bits(raw_csd, 128, 21, 1); } else if (v == 1) { - m = mmc_get_bits(raw_csd, 115, 4); - e = mmc_get_bits(raw_csd, 112, 3); + m = mmc_get_bits(raw_csd, 128, 115, 4); + e = mmc_get_bits(raw_csd, 128, 112, 3); csd->tacc = exp[e] * mant[m] + 9 / 10; - csd->nsac = mmc_get_bits(raw_csd, 104, 8) * 100; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810190610.m9J6A00i035501>