From owner-freebsd-hackers@FreeBSD.ORG Sun May 20 02:54:05 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF0D316A421 for ; Sun, 20 May 2007 02:54:05 +0000 (UTC) (envelope-from SRS0=AAamUv=KV=vvelox.net=v.velox@yourhostingaccount.com) Received: from mailout04.yourhostingaccount.com (mailout04.yourhostingaccount.com [65.254.254.70]) by mx1.freebsd.org (Postfix) with ESMTP id B104B13C447 for ; Sun, 20 May 2007 02:54:05 +0000 (UTC) (envelope-from SRS0=AAamUv=KV=vvelox.net=v.velox@yourhostingaccount.com) Received: from mailscan40.yourhostingaccount.com ([10.1.15.40] helo=mailscan40.yourhostingaccount.com) by mailout04.yourhostingaccount.com with esmtp (Exim) id 1Hpb16-00061Y-Ik for hackers@FreeBSD.ORG; Sat, 19 May 2007 22:19:28 -0400 Received: from authsmtp09.yourhostingaccount.com ([10.1.18.9] ident=exim) by mailscan40.yourhostingaccount.com with spamscanlookuphost (Exim) id 1Hpb16-0000Lr-Eu for hackers@FreeBSD.ORG; Sat, 19 May 2007 22:19:28 -0400 Received: from authsmtp09.yourhostingaccount.com ([10.1.18.9] helo=authsmtp09.yourhostingaccount.com) by mailscan40.yourhostingaccount.com with esmtp (Exim) id 1Hpb15-0000Li-Ms; Sat, 19 May 2007 22:19:27 -0400 Received: from cpe-65-185-51-114.columbus.res.rr.com ([65.185.51.114] helo=vixen42) by authsmtp09.yourhostingaccount.com with esmtpa (Exim) id 1Hpb15-0006mH-9w; Sat, 19 May 2007 22:19:27 -0400 Date: Sat, 19 May 2007 22:21:51 -0400 From: "Zane C.B." To: Nikolay Pavlov Message-ID: <20070519222151.4634b8ec@vixen42> In-Reply-To: <20070519214518.GA55896@zone3000.net> References: <20070519133557.4dbe3751@vixen42> <20070519214518.GA55896@zone3000.net> X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.12; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EN-UserInfo: 0d1ca1697cdb7a831d4877828571b7ab:1570f0de6936c69fef9e164fffc541bc X-EN-AuthUser: vvelox2 Sender: "Zane C.B." X-EN-OrigIP: 65.185.51.114 X-EN-OrigHost: cpe-65-185-51-114.columbus.res.rr.com Cc: hackers@FreeBSD.ORG Subject: Re: pam_exec patch and mount_smbfs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2007 02:54:06 -0000 On Sun, 20 May 2007 00:45:18 +0300 Nikolay Pavlov wrote: > On Saturday, 19 May 2007 at 13:35:57 -0400, Zane C.B. wrote: > > Figured some one may find this interesting. The patch modifies > > pam_exec to export PAM_AUTHTOK as a environmental variable. > > > > I am currently working on modifying mount_smbfs to be able to use > > a specified environmental variable password instead of asking for > > one. > > > > The purpose of this is to be able to use pam_exec to be able to > > mount a user's home directory from samba. > > > --- pam_exec.c.orig Sat May 19 12:51:42 2007 > > +++ pam_exec.c Sat May 19 12:56:50 2007 > > @@ -57,6 +57,7 @@ > > ENV_ITEM(PAM_TTY), > > ENV_ITEM(PAM_RHOST), > > ENV_ITEM(PAM_RUSER), > > + ENV_ITEM(PAM_AUTHTOK), > > }; > > > > static int > > Hi Zane. The is a pam module for exactly this purposes: > > http://pam-mount.sourceforge.net/ Been mucked around with it enough to get it to compile, but it will most likely have the same issue I now have with mount_smbfs. It is not possible to pass a password to mount_smbfs, non-interactively. From owner-freebsd-hackers@FreeBSD.ORG Sun May 20 06:55:36 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81ED916A421 for ; Sun, 20 May 2007 06:55:36 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by mx1.freebsd.org (Postfix) with ESMTP id 2524713C48A for ; Sun, 20 May 2007 06:55:36 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by wx-out-0506.google.com with SMTP id s7so3363wxc for ; Sat, 19 May 2007 23:55:35 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:date:from:to:subject:message-id:x-mailer:mime-version:content-type; b=DERyx4C6hIxYSmXf099nfU2FxMypssrZg8hVpb8QB4zuXvnVRuOWViyJk9/TT8zuw1tLXYjFLNqayKesTyiolQrOHbe27DJfVJ4L/EVQUHi5Tvlz3uVNctW1Z2V2z7Nwxyrxk1bGp1yX+wA5cnhJGze6nxVLWC9j+R01XGWe8OU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:subject:message-id:x-mailer:mime-version:content-type; b=UMsgbrMIqSS8ows/RGh3Wopj7R+3KHUpx/F9K58TLEqCsTJDg8SCNp8PwaVc4xX+4wuYDLs+A2LzVil3/GL/hWmOxgRkV1DnxDFKIIVNf9BNlbs7pKcuyhiqrhebRR2L/epwp/Ju5vayyjIZqMPTtBH25m4HyDD29z0OQ52HH/I= Received: by 10.70.83.8 with SMTP id g8mr4114636wxb.1179642690553; Sat, 19 May 2007 23:31:30 -0700 (PDT) Received: from kan.dnsalias.net ( [24.34.98.164]) by mx.google.com with ESMTP id 27sm7756049wra.2007.05.19.23.31.28; Sat, 19 May 2007 23:31:29 -0700 (PDT) Date: Sun, 20 May 2007 02:31:27 -0400 From: Alexander Kabaev To: freebsd-hackers@freebsd.org Message-ID: <20070520023127.5101cc4a@kan.dnsalias.net> X-Mailer: Claws Mail 2.8.1 (GTK+ 2.10.11; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_2dnqLNGXJaEEuD7uOiY8Jun; protocol="application/pgp-signature"; micalg=PGP-SHA1 Subject: HEADS UP: OpenSSL problems after GCC 4.2 upgrade X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2007 06:55:36 -0000 --Sig_2dnqLNGXJaEEuD7uOiY8Jun Content-Type: multipart/mixed; boundary=MP_gwpbckXYsyOJQ20BHb2H.kY --MP_gwpbckXYsyOJQ20BHb2H.kY Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi all, there were several reports of OpenSSL being broken when compiled with GCC 4.2. It turns out OpenSSL uses function casting feature that was aggressively de-supported by GCC 4.2 and GCC goes as far as inserting invalid instructions ON PURPOSE to discourage the practice. Consequently, OpenSSL need the patch similar to attached one to work. Just in case mailing list will eat the attachment, the patch can be found at http://people.freebsd.org/~kan/openssl-gcc42.diff Unfortunately, our OpenSSL maintainer(s) are currently en-route from BSDCan and cannot attend to the matters. Once we figure the best way to fix the code and to integrate the fix into OpenSSL, we will check the fix info CVS. People are advised to patch their sources locally until then.=20 --=20 Alexander Kabaev --MP_gwpbckXYsyOJQ20BHb2H.kY Content-Type: text/x-patch; name=openssl-gcc42.diff Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=openssl-gcc42.diff Index: openssl/crypto/asn1/asn1.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/crypto/openssl/crypto/asn1/asn1.h,v retrieving revision 1.1.1.8 diff -u -r1.1.1.8 asn1.h --- openssl/crypto/asn1/asn1.h 29 Jul 2006 19:10:16 -0000 1.1.1.8 +++ openssl/crypto/asn1/asn1.h 20 May 2007 05:01:40 -0000 @@ -903,22 +903,22 @@ /* Used to implement other functions */ void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, char *x); #define ASN1_dup_of(type,i2d,d2i,x) \ - ((type *(*)(I2D_OF(type),D2I_OF(type),type *))openssl_fcast(ASN1_dup))(i2= d,d2i,x) + ((type *)ASN1_dup((i2d_of_void *)(i2d), (d2i_of_void *)(d2i), (char *= )(x))) #define ASN1_dup_of_const(type,i2d,d2i,x) \ - ((type *(*)(I2D_OF_const(type),D2I_OF(type),type *))openssl_fcast(ASN1_du= p))(i2d,d2i,x) + ((type *)ASN1_dup((i2d_of_void *)(i2d), (d2i_of_void *)(d2i), (char *= )(x))) =20 void *ASN1_item_dup(const ASN1_ITEM *it, void *x); =20 #ifndef OPENSSL_NO_FP_API void *ASN1_d2i_fp(void *(*xnew)(void), d2i_of_void *d2i, FILE *in, void **= x); #define ASN1_d2i_fp_of(type,xnew,d2i,in,x) \ - ((type *(*)(type *(*)(void),D2I_OF(type),FILE *,type **))openssl_fcast(AS= N1_d2i_fp))(xnew,d2i,in,x) + ((type *)ASN1_d2i_fp((void *(*)(void))(xnew), (d2i_of_void *)(d2i), (in),= (void **)(x))) void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x); int ASN1_i2d_fp(i2d_of_void *i2d,FILE *out,void *x); #define ASN1_i2d_fp_of(type,i2d,out,x) \ - ((int (*)(I2D_OF(type),FILE *,type *))openssl_fcast(ASN1_i2d_fp))(i2d,out= ,x) + (ASN1_i2d_fp((i2d_of_void *)(i2d), (out), (x))) #define ASN1_i2d_fp_of_const(type,i2d,out,x) \ - ((int (*)(I2D_OF_const(type),FILE *,type *))openssl_fcast(ASN1_i2d_fp))(i= 2d,out,x) + (ASN1_i2d_fp((i2d_of_void *)(i2d), (out), (x))) int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x); int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flag= s); #endif @@ -928,13 +928,13 @@ #ifndef OPENSSL_NO_BIO void *ASN1_d2i_bio(void *(*xnew)(void), d2i_of_void *d2i, BIO *in, void **= x); #define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \ - ((type *(*)(type *(*)(void),D2I_OF(type),BIO *,type **))openssl_fcast(ASN= 1_d2i_bio))(xnew,d2i,in,x) + ((type *)ASN1_d2i_bio( (void *(*)(void))(xnew), (d2i_of_void *)(d2i), (in= ), (void **)(x))) void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x); int ASN1_i2d_bio(i2d_of_void *i2d,BIO *out, unsigned char *x); #define ASN1_i2d_bio_of(type,i2d,out,x) \ - ((int (*)(I2D_OF(type),BIO *,type *))openssl_fcast(ASN1_i2d_bio))(i2d,out= ,x) + (ASN1_i2d_bio((i2d_of_void *)(i2d), (out), (void *)(x))) #define ASN1_i2d_bio_of_const(type,i2d,out,x) \ - ((int (*)(I2D_OF_const(type),BIO *,const type *))openssl_fcast(ASN1_i2d_b= io))(i2d,out,x) + (ASN1_i2d_bio((i2d_of_void *)(i2d), (out), (void *)(x))) int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x); int ASN1_UTCTIME_print(BIO *fp,ASN1_UTCTIME *a); int ASN1_GENERALIZEDTIME_print(BIO *fp,ASN1_GENERALIZEDTIME *a); @@ -978,7 +978,7 @@ ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d, ASN1_OCTET_STRING **oct); #define ASN1_pack_string_of(type,obj,i2d,oct) \ - ((ASN1_STRING *(*)(type *,I2D_OF(type),ASN1_OCTET_STRING **))openssl_fcas= t(ASN1_pack_string))(obj,i2d,oct) + (ASN1_pack_string((obj), (i2d_of_void *)(i2d), (oct))) ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STR= ING **oct); =20 void ASN1_STRING_set_default_mask(unsigned long mask); Index: openssl/crypto/ocsp/ocsp.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/crypto/openssl/crypto/ocsp/ocsp.h,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 ocsp.h --- openssl/crypto/ocsp/ocsp.h 29 Jul 2006 19:10:18 -0000 1.1.1.2 +++ openssl/crypto/ocsp/ocsp.h 20 May 2007 05:13:06 -0000 @@ -469,7 +469,7 @@ ASN1_STRING *ASN1_STRING_encode(ASN1_STRING *s, i2d_of_void *i2d, void *data, STACK_OF(ASN1_OBJECT) *sk); #define ASN1_STRING_encode_of(type,s,i2d,data,sk) \ -((ASN1_STRING *(*)(ASN1_STRING *,I2D_OF(type),type *,STACK_OF(ASN1_OBJECT)= *))openssl_fcast(ASN1_STRING_encode))(s,i2d,data,sk) +(ASN1_STRING_encode((s), (i2d_of_void *)(i2d), (data), (STACK_OF(ASN1_OBJE= CT) *)(sk))) =20 X509_EXTENSION *OCSP_crlID_new(char *url, long *n, char *tim); =20 Index: openssl/crypto/pem/pem.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/crypto/openssl/crypto/pem/pem.h,v retrieving revision 1.1.1.7 diff -u -r1.1.1.7 pem.h --- openssl/crypto/pem/pem.h 15 Mar 2007 20:03:01 -0000 1.1.1.7 +++ openssl/crypto/pem/pem.h 20 May 2007 06:02:41 -0000 @@ -220,19 +220,20 @@ #define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \ type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\ { \ -return(((type *(*)(D2I_OF(type),char *,FILE *,type **,pem_password_cb *,vo= id *))openssl_fcast(PEM_ASN1_read))(d2i_##asn1, str,fp,x,cb,u)); \ -}=20 +return((type *)PEM_ASN1_read( \ + (d2i_of_void *)d2i_##asn1,str,fp,(void **)x,cb,u)); \ +} =20 #define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \ int PEM_write_##name(FILE *fp, type *x) \ { \ -return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHER= *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_wr= ite))(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \ +return(PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,(char *)x,NULL,NULL= ,0,NULL,NULL)); \ } =20 #define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \ int PEM_write_##name(FILE *fp, const type *x) \ { \ -return(((int (*)(I2D_OF_const(type),const char *,FILE *, const type *, con= st EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcas= t(PEM_ASN1_write))(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \ +return(PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,(char *)x,NULL,NULL= ,0,NULL,NULL)); \ } =20 #define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \ @@ -240,7 +241,7 @@ unsigned char *kstr, int klen, pem_password_cb *cb, \ void *u) \ { \ - return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHE= R *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_w= rite))(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \ +return(PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,(char *)x,enc,kstr,= klen,cb,u)); \ } =20 #define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \ @@ -248,7 +249,7 @@ unsigned char *kstr, int klen, pem_password_cb *cb, \ void *u) \ { \ - return(((int (*)(I2D_OF_const(type),const char *,FILE *,type *, const EVP= _CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_= ASN1_write))(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \ +return(PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,(char *)x,enc,kstr,= klen,cb,u)); \ } =20 #endif @@ -256,33 +257,34 @@ #define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\ { \ -return(((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb= *,void *))openssl_fcast(PEM_ASN1_read_bio))(d2i_##asn1, str,bp,x,cb,u)); \ +return((type *)PEM_ASN1_read_bio( \ + (d2i_of_void *)d2i_##asn1,str,bp,(void **)x,cb,u)); \ } =20 #define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ int PEM_write_bio_##name(BIO *bp, type *x) \ { \ -return(((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER = *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_wri= te_bio))(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \ +return(PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(char *)x,NULL,= NULL,0,NULL,NULL)); \ } =20 #define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ int PEM_write_bio_##name(BIO *bp, const type *x) \ { \ -return(((int (*)(I2D_OF_const(type),const char *,BIO *,const type *, const= EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(= PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \ +return(PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(char *)x,NULL,= NULL,0,NULL,NULL)); \ } =20 #define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ { \ - return(((int (*)(I2D_OF(type),const char *,BIO *,type *,const EVP_CIPHER = *,unsigned char *,int,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_writ= e_bio))(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \ +return(PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(char *)x,enc,k= str,klen,cb,u)); \ } =20 #define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ { \ - return(((int (*)(I2D_OF_const(type),const char *,BIO *,type *,const EVP_C= IPHER *,unsigned char *,int,pem_password_cb *,void *))openssl_fcast(PEM_ASN= 1_write_bio))(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \ +return(PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(char *)x,enc,k= str,klen,cb,u)); \ } =20 #define IMPLEMENT_PEM_write(name, type, str, asn1) \ @@ -546,12 +548,12 @@ void * PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x, pem_password_cb *cb, void *u); #define PEM_ASN1_read_bio_of(type,d2i,name,bp,x,cb,u) \ -((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void= *))openssl_fcast(PEM_ASN1_read_bio))(d2i,name,bp,x,cb,u) +((type *)PEM_ASN1_read_bio((d2i_of_void *)d2i,name,bp,(void **)x,cb,u)) int PEM_ASN1_write_bio(i2d_of_void *i2d,const char *name,BIO *bp,char *x, const EVP_CIPHER *enc,unsigned char *kstr,int klen, pem_password_cb *cb, void *u); #define PEM_ASN1_write_bio_of(type,i2d,name,bp,x,enc,kstr,klen,cb,u) \ - ((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER *,unsi= gned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio= ))(i2d,name,bp,x,enc,kstr,klen,cb,u) + (PEM_ASN1_write_bio)((i2d_of_void *)i2d,name,bp,(char *)x,enc,kstr,klen,c= b,u) =20 STACK_OF(X509_INFO) * PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) = *sk, pem_password_cb *cb, void *u); int PEM_X509_INFO_write_bio(BIO *bp,X509_INFO *xi, EVP_CIPHER *enc, --MP_gwpbckXYsyOJQ20BHb2H.kY-- --Sig_2dnqLNGXJaEEuD7uOiY8Jun Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGT+s/Q6z1jMm+XZYRAhjfAJ9s4uaxWC/Wfsn8BNO4cW1KoKwg6QCfTIQi jBuOpCWsntcZgnXAun1PBZU= =j6dY -----END PGP SIGNATURE----- --Sig_2dnqLNGXJaEEuD7uOiY8Jun-- From owner-freebsd-hackers@FreeBSD.ORG Sun May 20 10:29:24 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4BDE016A56C for ; Sun, 20 May 2007 10:29:24 +0000 (UTC) (envelope-from redcrash@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 02D7113C469 for ; Sun, 20 May 2007 10:29:23 +0000 (UTC) (envelope-from redcrash@gmail.com) Received: by an-out-0708.google.com with SMTP id d23so317324and for ; Sun, 20 May 2007 03:29:23 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=S80bys47GWrAg7wF4NJ8s5zk9akKcRHH392Ltgvj3jSpoUpgZXEguNT8ZJrslxFJjOk9/hb+4Hc9NCr0xYmauzpaV2czmzwUv9qz3l3I+hgfR1ZbEHcXrYahPfsUXfSAAG7q6MnDXmuqs/jheAafosn22Bs0ANkA8d3GRR/U7Sk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=Q9bJ1go1dgolRnVQ47MST+M6Dr2E1OCAYixbMQBBJv6UOiaZwS3MTya8wYmiXQpEtwWVxD0vV40XlPCf75FKNhLfCgtb91xyqLka6d236dHZAbeQAPv7hxUwFZDIJZq8nLOUPzKnUelE29g7rrQ7e1Zy33gHXEfASbpX6swkv80= Received: by 10.100.11.7 with SMTP id 7mr2260610ank.1179656963242; Sun, 20 May 2007 03:29:23 -0700 (PDT) Received: by 10.100.109.2 with HTTP; Sun, 20 May 2007 03:29:23 -0700 (PDT) Message-ID: Date: Sun, 20 May 2007 12:29:23 +0200 From: "Harald Servat" To: freebsd-hackers@freebsd.org, freebsd-hpc@freebsd.org, freebsd-performance@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: testers wanted for PAPI / FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2007 10:29:24 -0000 Hello, I'm porting PAPI to FreeBSD. I was wondering if you could give a try to the package I'm porting. It would be great to have more feedback than just that my laptop is able to provide me :) First of all, you can download the code at http://code.google.com/p/papi-for-freebsd Next, see man hwpmc(4) and compile a kernel with options HWPMC_HOOKS device hwpmc (you'll require device apic if you're running on i386 machines). When you boot your dmesg should print something like hwpmc: TSC/1/0x20 P6/2/0x1fe Once the machine is up and running, just untar the file you've downloaded, run ./configure and just run make (not make install). Could you send me the output of the following commands? # dmesg | grep hwpmc # utils/papi_avail # utils/papi_decode # utils/papi_native_avail # ctests/low-level # ctests/high-level Thank you very much, -- _________________________________________________________________ Empty your memory, with a free()... like a pointer! If you cast a pointer to an integer, it becomes an integer, if you cast a pointer to a struct, it becomes a struct. The pointer can crash..., and can overflow. Be a pointer my friend... From owner-freebsd-hackers@FreeBSD.ORG Sun May 20 12:29:08 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9599016A400 for ; Sun, 20 May 2007 12:29:08 +0000 (UTC) (envelope-from m.pahlevanzadeh@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.230]) by mx1.freebsd.org (Postfix) with ESMTP id 55F2913C458 for ; Sun, 20 May 2007 12:29:08 +0000 (UTC) (envelope-from m.pahlevanzadeh@gmail.com) Received: by nz-out-0506.google.com with SMTP id s1so1936120nze for ; Sun, 20 May 2007 05:29:07 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=D4xfxhyWr2NjA1HRW48u66hSy5EKVdB1gYc/E/PT4GgGVlNHz30Bjag7Lk1dEObccAkvr61Yv0ZNoUcKOgaAUgC5vKUvCvIQwVdbyOtlfcvJgabYvPFH25g5/ckfcbRgkJxQLgAlE0gWWsj5cdyD1YL557Ti4eCpuCmfjU1quqE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=LC/7QfesY3LUWUmTD9dvkt2o7U6/HFALDaicGe8HcPVn7SwnKa9nxxEyFsW8pXc/+7ZeRYrbprjs5gp8qN7wfswk6Eb0ZCqBXKj+AEB6TVf4h1A+MOdSJrIIxc/bu5i6Eh1a4luypbn2tCLCvGNib2LXX6/NoM/1lprb0xidoZ8= Received: by 10.65.219.20 with SMTP id w20mr9046087qbq.1179664147720; Sun, 20 May 2007 05:29:07 -0700 (PDT) Received: by 10.65.126.13 with HTTP; Sun, 20 May 2007 05:29:07 -0700 (PDT) Message-ID: Date: Sun, 20 May 2007 15:59:07 +0330 From: "Mohsen Pahlevanzadeh" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: module for kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mohsen@pahlevanzadeh.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2007 12:29:08 -0000 Dear all, When you wanna write a module for linux kernel,you have 2 function: init_module() & cleanup_module() But now i need to write a little module for FreeBSD kernel.Please guide me..... --Mohsen From owner-freebsd-hackers@FreeBSD.ORG Sun May 20 12:50:45 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6CF3516A400 for ; Sun, 20 May 2007 12:50:45 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.freebsd.org (Postfix) with ESMTP id F22A513C455 for ; Sun, 20 May 2007 12:50:43 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from localhost (localhost.int.ru [127.0.0.1] (may be forged)) by mp2.macomnet.net (8.13.7/8.13.8) with ESMTP id l4KCaxPR009839; Sun, 20 May 2007 16:36:59 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Sun, 20 May 2007 16:36:58 +0400 (MSD) From: Maxim Konovalov To: mohsen@pahlevanzadeh.org In-Reply-To: Message-ID: <20070520163622.D72989@mp2.macomnet.net> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-hackers@freebsd.org Subject: Re: module for kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2007 12:50:45 -0000 On Sun, 20 May 2007, 15:59+0330, Mohsen Pahlevanzadeh wrote: > Dear all, > When you wanna write a module for linux kernel,you have 2 function: > init_module() & cleanup_module() > But now i need to write a little module for FreeBSD kernel.Please guide > me..... Check /usr/share/examples/kld/ . -- Maxim Konovalov From owner-freebsd-hackers@FreeBSD.ORG Sun May 20 13:04:33 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E54316A41F for ; Sun, 20 May 2007 13:04:33 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.swip.net [212.247.154.161]) by mx1.freebsd.org (Postfix) with ESMTP id 9ED7613C45D for ; Sun, 20 May 2007 13:04:32 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [193.217.102.48] (account mc467741@c2i.net HELO [10.0.0.249]) by mailfe06.swip.net (CommuniGate Pro SMTP 5.1.7) with ESMTPA id 494761266; Sun, 20 May 2007 15:04:30 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Sun, 20 May 2007 15:04:18 +0200 User-Agent: KMail/1.9.5 References: <20070520163622.D72989@mp2.macomnet.net> In-Reply-To: <20070520163622.D72989@mp2.macomnet.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705201504.18871.hselasky@c2i.net> Cc: Subject: Re: module for kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2007 13:04:33 -0000 On Sunday 20 May 2007 14:36, Maxim Konovalov wrote: > On Sun, 20 May 2007, 15:59+0330, Mohsen Pahlevanzadeh wrote: > > Dear all, > > When you wanna write a module for linux kernel,you have 2 function: > > init_module() & cleanup_module() > > But now i need to write a little module for FreeBSD kernel.Please guide > > me..... > > Check /usr/share/examples/kld/ . Also check out SYSINIT() : SYSINIT(id,SI_SUB_KLD,SI_ORDER_FIRST,usb_linux_register,p_usb_drv); SYSUNINIT(id,SI_SUB_KLD,SI_ORDER_ANY,usb_linux_deregister,p_usb_drv); --HPS From owner-freebsd-hackers@FreeBSD.ORG Sun May 20 13:07:11 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 56EB916A469 for ; Sun, 20 May 2007 13:07:11 +0000 (UTC) (envelope-from n.cormier@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by mx1.freebsd.org (Postfix) with ESMTP id 0110313C44C for ; Sun, 20 May 2007 13:07:10 +0000 (UTC) (envelope-from n.cormier@gmail.com) Received: by py-out-1112.google.com with SMTP id f31so1602912pyh for ; Sun, 20 May 2007 06:07:10 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=f+FZoK/EbVqorug8FOyOeOXwPOq50RUUj0McCcsEIc1uYasr+mtxsyL1wWtqCw8emm3uvJXezmXOZoBiU8NDX4KBgN7Sow9EgCviBvgPaeNi/uoxQhBsHighdRSZ3QiO5/ICtq1PnyVSA+sf7LP+gEUjV5D0wue0lsYg9d6ktPw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Ahxyuv7A/EaGQ3qHKJrez3aWv2Lrel2KtcezHl+B3UhGwmuAkrbO5WHtcT1TxgQJBp7kVxhi0/+pN+lYiqxvznvScW0Jswqmz4CdIExGbOzJecfRPkWQvZ974d9BoSkqkpZpvr7Mspfl2Uv5XiPHo1w3qpYTeToK+6ewKgZs+Pk= Received: by 10.35.111.14 with SMTP id o14mr6645199pym.1179664966281; Sun, 20 May 2007 05:42:46 -0700 (PDT) Received: by 10.35.41.4 with HTTP; Sun, 20 May 2007 05:42:46 -0700 (PDT) Message-ID: Date: Sun, 20 May 2007 14:42:46 +0200 From: "Nicolas Cormier" To: mohsen@pahlevanzadeh.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: freebsd-hackers@freebsd.org Subject: Re: module for kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2007 13:07:11 -0000 On 5/20/07, Mohsen Pahlevanzadeh wrote: > Dear all, > When you wanna write a module for linux kernel,you have 2 function: > init_module() & cleanup_module() > But now i need to write a little module for FreeBSD kernel.Please guide > me..... > --Mohsen http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/ http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/ http://ezine.daemonnews.org/200007/newbus-intro.html http://ezine.daemonnews.org/200010/blueprints.html Hope it can help you. -- Nicolas Cormier From owner-freebsd-hackers@FreeBSD.ORG Sun May 20 15:04:01 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D6FE816A400 for ; Sun, 20 May 2007 15:04:01 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 988E013C455 for ; Sun, 20 May 2007 15:04:01 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 22DB12084; Sun, 20 May 2007 17:03:58 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 0AA0C2083; Sun, 20 May 2007 17:03:58 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id DA08A5070; Sun, 20 May 2007 17:03:57 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexander Kabaev References: <20070520023127.5101cc4a@kan.dnsalias.net> Date: Sun, 20 May 2007 17:03:57 +0200 In-Reply-To: <20070520023127.5101cc4a@kan.dnsalias.net> (Alexander Kabaev's message of "Sun\, 20 May 2007 02\:31\:27 -0400") Message-ID: <86k5v3h6zm.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: HEADS UP: OpenSSL problems after GCC 4.2 upgrade X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2007 15:04:01 -0000 Alexander Kabaev writes: > there were several reports of OpenSSL being broken when compiled with > GCC 4.2. It turns out OpenSSL uses function casting feature that was > aggressively de-supported by GCC 4.2 and GCC goes as far as inserting > invalid instructions ON PURPOSE to discourage the practice. Is there a web page somewhere (or an archived mailing list discussion, or whatever) which discusses the issue and explains the rationale for intentionally generating incorrect code? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Sun May 20 15:11:42 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E156216A468 for ; Sun, 20 May 2007 15:11:42 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id 416BD13C447 for ; Sun, 20 May 2007 15:11:41 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id E60C6E7A3F9 for ; Sun, 20 May 2007 15:11:38 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id 379DA7E92; Sun, 20 May 2007 17:11:26 +0200 (CEST) Date: Sun, 20 May 2007 17:11:25 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20070520151125.GA8244@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20070520023127.5101cc4a@kan.dnsalias.net> <86k5v3h6zm.fsf@dwp.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86k5v3h6zm.fsf@dwp.des.no> User-Agent: Mutt/1.5.13 (2006-08-11) Subject: Re: HEADS UP: OpenSSL problems after GCC 4.2 upgrade X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2007 15:11:43 -0000 On Sun, May 20, 2007 at 05:03:57PM +0200, Dag-Erling Smørgrav wrote: > Alexander Kabaev writes: > > there were several reports of OpenSSL being broken when compiled with > > GCC 4.2. It turns out OpenSSL uses function casting feature that was > > aggressively de-supported by GCC 4.2 and GCC goes as far as inserting > > invalid instructions ON PURPOSE to discourage the practice. > > Is there a web page somewhere (or an archived mailing list discussion, > or whatever) which discusses the issue and explains the rationale for > intentionally generating incorrect code? It happened in the past, e.g. with va_arg. In that case gcc creates explicit abort() calls, because it can't refuse the code (syntactically correct C), but the runtime behaviour is completely implementation defined. Joerg From owner-freebsd-hackers@FreeBSD.ORG Sun May 20 16:02:46 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 51DA316A400 for ; Sun, 20 May 2007 16:02:46 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id 33E4813C4BF for ; Sun, 20 May 2007 16:02:46 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.1/8.13.8) with ESMTP id l4KG2F9V032810; Sun, 20 May 2007 09:02:15 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.1/8.13.8/Submit) id l4KG2B4w032809; Sun, 20 May 2007 09:02:11 -0700 (PDT) (envelope-from sgk) Date: Sun, 20 May 2007 09:02:11 -0700 From: Steve Kargl To: Dag-Erling Sm??rgrav Message-ID: <20070520160211.GA32414@troutmask.apl.washington.edu> References: <20070520023127.5101cc4a@kan.dnsalias.net> <86k5v3h6zm.fsf@dwp.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86k5v3h6zm.fsf@dwp.des.no> User-Agent: Mutt/1.4.2.2i Cc: freebsd-hackers@freebsd.org Subject: Re: HEADS UP: OpenSSL problems after GCC 4.2 upgrade X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2007 16:02:46 -0000 On Sun, May 20, 2007 at 05:03:57PM +0200, Dag-Erling Sm??rgrav wrote: > Alexander Kabaev writes: > > there were several reports of OpenSSL being broken when compiled with > > GCC 4.2. It turns out OpenSSL uses function casting feature that was > > aggressively de-supported by GCC 4.2 and GCC goes as far as inserting > > invalid instructions ON PURPOSE to discourage the practice. > > Is there a web page somewhere (or an archived mailing list discussion, > or whatever) which discusses the issue and explains the rationale for > intentionally generating incorrect code? > http://gcc.gnu.org/ml/gcc/2006-07/msg00037.html PS: http://mx.gw.com/pipermail/tcsh-bugs/2007-May/ -- Steve From owner-freebsd-hackers@FreeBSD.ORG Sun May 20 22:31:58 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03E4616A421 for ; Sun, 20 May 2007 22:31:58 +0000 (UTC) (envelope-from dmw@unete.cl) Received: from mail03.ifxnetworks.com (mail03.ifxnetworks.com [190.61.128.13]) by mx1.freebsd.org (Postfix) with ESMTP id B63BC13C44C for ; Sun, 20 May 2007 22:31:57 +0000 (UTC) (envelope-from dmw@unete.cl) Received: (qmail 25658 invoked from network); 20 May 2007 22:31:55 -0000 X-Spam-DCC: : mail03.ifxnetworks.com 1113; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail03.ifxnetworks.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=6.0 tests=none autolearn=disabled version=3.1.8 Received: from unknown (HELO quake) (dmw@unete.cl@[200.73.29.218]) (envelope-sender ) by mail03.ifxnetworks.com (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 20 May 2007 22:31:55 -0000 From: Daniel Molina Wegener Organization: DMW To: FreeBSD Hackers Date: Sun, 20 May 2007 18:31:38 -0400 User-Agent: KMail/1.9.6 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705201831.38828.dmw@unete.cl> Subject: kqueue implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dmw@unete.cl List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2007 22:31:58 -0000 Hello, I'm coding an application using the kqueue facility, but I see that I can't handle open and read events. Is planned to implement these handlings in the future?. Also, which facility can I use to handle these kind of events? Regards, -- .O. | Daniel Molina Wegener | C/C++ Developer ..O | dmw [at] unete [dot] cl | FOSS Coding Adict OOO | BSD & Linux User | Standards Rocks! From owner-freebsd-hackers@FreeBSD.ORG Sun May 20 23:15:58 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 25DEE16A41F for ; Sun, 20 May 2007 23:15:58 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout7.cac.washington.edu (mxout7.cac.washington.edu [140.142.32.178]) by mx1.freebsd.org (Postfix) with ESMTP id 0144E13C44C for ; Sun, 20 May 2007 23:15:57 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout7.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l4KNFvh2008585 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 20 May 2007 16:15:57 -0700 X-Auth-Received: from [192.168.10.45] (c-67-166-149-71.hsd1.ca.comcast.net [67.166.149.71]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l4KNFubo015500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 20 May 2007 16:15:57 -0700 Message-ID: <4650D6AC.4050405@u.washington.edu> Date: Sun, 20 May 2007 16:15:56 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <20070513040651.GB1017@dwpc.dwlabs.ca> <4647F627.7020408@u.washington.edu> <20070514202922.GF1017@dwpc.dwlabs.ca> <4649426F.8050601@u.washington.edu> <1179214317.1791.38.camel@zoot.mintel.co.uk> <464969B3.3050306@u.washington.edu> <20070515213026.GI1017@dwpc.dwlabs.ca> <464D2195.3020309@u.washington.edu> <464F4FD9.9020308@u.washington.edu> In-Reply-To: <464F4FD9.9020308@u.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.1.294258, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.5.20.155635 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Re: SoC X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2007 23:15:58 -0000 Garrett Cooper wrote: > Garrett Cooper wrote: >> Duane Whitty wrote: >>> On Tuesday, 15 May 2007 at 1:05:07 -0700, Garrett Cooper wrote: >>>> Tom Evans wrote: >>>>> On Mon, 2007-05-14 at 22:17 -0700, Garrett Cooper wrote: >>>>>> Ruby's nice, but it's built on Perl so I have suspicions on its >>>>>> overall usability / speed given my experience with Perl over the >>>>>> past 4 months daily for work :(.. Ruby's just the new big thing >>>>>> for programming languages, so everyone's into it. Kind of like how >>>>>> Java was compared to C/C++ a few years back. But once everything >>>>>> dies down people will realize that they'll still have to program >>>>>> in C/C++/Perl for real-world applications. >>>>>> >>>>>> Python seems better than Ruby from what I can see, but I really >>>>>> don't like the mandatory indentation thing. Ew.. >>>>>> >>>>> Rubies are better Perls. That's the only connection between the >>>>> two. One >>>>> day, a Japanese programmer got fed up with Perl, and wrote a better >>>>> language (for varying meanings of better). >>>>> >>>>> Its not based or built on Perl in any respect. >>>>> >>>>> Python and Ruby both have the same targets; to speed development time >>>>> and increase programmer productivity. >>>> But one must make a Perl before one can make a Ruby. Maybe that was >>>> what I was trying to aim for. >>>> >>>> Ruby's nice, but it seems like it's going to be a bit passe in a few >>>> years like Java was for compilable / interpretable languages. >>>> >>>> -Garrett >> > >>> None of this matters >>> >>> >>> My only point is that if you need something quick to explore the >>> format of >>> pkgdb.db or INDEX.db you are pretty well assured of finding a tool you >>> can work with; Perl, Python, or Ruby. If these aren't sufficient use C. >>> >>> The pkg_* tools are written in C so in C they will be modified; but no >>> harm in doing initial exploration and prototyping with something else. >>> >>> Let's stay focused! >>> >>> Duane >> >> Ok, finally dumped the full database. Will analyze closely later on >> tonight. >> >> Cheers, >> -Garrett >> >> PS If you installed ruby-bdb, simply running "make config" in the >> ports-mgmt/portupgrade directory and selecting ruby-bdb1 won't do. You >> have to go into databases/ruby-bdb, do make deinstall, then go to >> databases/ruby-bdb1 and do make install, or something similar. > > If you haven't seen my entry yet, and you're interested, I've posted > my analysis of the INDEX-*.db file at: > . > I'd like to really discuss the additional metadata that gets tacked > onto each database file, in particular, is it necessary, and is there a > better way to do that? > Also, the whole Ruby ports tools writing to the ports db > consistently instead of at exit is another item which probably should be > discussed too (someone brought this up earlier). > Thanks, > -Garrett Posted more results here: . Needless to say, I'm not happy with Portupgrade. -Garret From owner-freebsd-hackers@FreeBSD.ORG Sun May 20 23:25:39 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15B8B16A469 for ; Sun, 20 May 2007 23:25:39 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout1.cac.washington.edu (mxout1.cac.washington.edu [140.142.32.134]) by mx1.freebsd.org (Postfix) with ESMTP id EA95713C455 for ; Sun, 20 May 2007 23:25:38 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.7] (may be forged)) by mxout1.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l4KNPcaQ023684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 20 May 2007 16:25:38 -0700 X-Auth-Received: from [192.168.10.45] (c-67-166-149-71.hsd1.ca.comcast.net [67.166.149.71]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l4KNPb7W031437 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 20 May 2007 16:25:38 -0700 Message-ID: <4650D8F1.3060701@u.washington.edu> Date: Sun, 20 May 2007 16:25:37 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.1.294258, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.5.20.160839 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: More questions about BDB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2007 23:25:39 -0000 Ok, I've run into a strange issue with BDB's hash tables. Does anyone know what the following means? db_dump185: seq: Invalid argument Backstory: When dumping out a large amount of data it appears that there's an expected directive which isn't being inserted by Ruby's BDB1.85 facility into the database, or the directive is inappropriately expected by the dumping tool that I'm using (possible byte precision overlap, incorrect coding/heuristics somewhere). The only thing I can find regarding the directive under the /usr/src/lib/libc/db/hash directory is something in hash.c and ndbm.c, where it looks like seq according to ndbm.c links together two (or more) sets of data, because of a data length issue and integer sizes, I think. Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon May 21 02:10:29 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 27D7316A41F for ; Mon, 21 May 2007 02:10:29 +0000 (UTC) (envelope-from sean@cyberwang.net) Received: from spunkymail-a10.g.dreamhost.com (d06184ca.dreamhost.com [208.97.132.202]) by mx1.freebsd.org (Postfix) with ESMTP id 1725713C43E for ; Mon, 21 May 2007 02:10:28 +0000 (UTC) (envelope-from sean@cyberwang.net) Received: from [10.0.1.2] (68-184-120-224.dhcp.smyr.ga.charter.com [68.184.120.224]) by spunkymail-a10.g.dreamhost.com (Postfix) with ESMTP id 6CA0F16335B; Sun, 20 May 2007 19:10:26 -0700 (PDT) Message-ID: <4650FF62.1060000@cyberwang.net> Date: Sun, 20 May 2007 22:09:38 -0400 From: Sean Bryant User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Garrett Cooper References: <4650D8F1.3060701@u.washington.edu> In-Reply-To: <4650D8F1.3060701@u.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: More questions about BDB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 02:10:29 -0000 Garrett Cooper wrote: > Ok, I've run into a strange issue with BDB's hash tables. > > Does anyone know what the following means? > > db_dump185: seq: Invalid argument > > Backstory: > When dumping out a large amount of data it appears that there's an > expected directive which isn't being inserted by Ruby's BDB1.85 > facility into the database, or the directive is inappropriately > expected by the dumping tool that I'm using (possible byte precision > overlap, incorrect coding/heuristics somewhere). > > The only thing I can find regarding the directive under the > /usr/src/lib/libc/db/hash directory is something in hash.c and ndbm.c, > where it looks like seq according to ndbm.c links together two (or > more) sets of data, because of a data length issue and integer sizes, > I think. > > Thanks, > -Garrett > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" Just a personal curiosity. Is there a particular reason why FreeBSD is holding on to BDB 1.85? From owner-freebsd-hackers@FreeBSD.ORG Mon May 21 02:32:28 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F16FD16A421 for ; Mon, 21 May 2007 02:32:28 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 94B3513C45B for ; Mon, 21 May 2007 02:32:26 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.1/8.13.8) id l4L2M935042732; Sun, 20 May 2007 21:22:09 -0500 (CDT) (envelope-from dan) Date: Sun, 20 May 2007 21:22:08 -0500 From: Dan Nelson To: Sean Bryant Message-ID: <20070521022208.GD13345@dan.emsphone.com> References: <4650D8F1.3060701@u.washington.edu> <4650FF62.1060000@cyberwang.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4650FF62.1060000@cyberwang.net> X-OS: FreeBSD 6.2-STABLE User-Agent: Mutt/1.5.15 (2007-04-06) Cc: freebsd-hackers@freebsd.org, Garrett Cooper Subject: Re: More questions about BDB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 02:32:29 -0000 In the last episode (May 20), Sean Bryant said: > Just a personal curiosity. Is there a particular reason why FreeBSD > is holding on to BDB 1.85? All later versions have a non-BSD license (a source redistribution requirement was added), which means it can't go in the base system. BDB is built into libc and is used for the hashed passwd & termcap databases. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Mon May 21 02:45:08 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D54BF16A421 for ; Mon, 21 May 2007 02:45:08 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout1.cac.washington.edu (mxout1.cac.washington.edu [140.142.32.134]) by mx1.freebsd.org (Postfix) with ESMTP id B3BEC13C484 for ; Mon, 21 May 2007 02:45:08 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.7] (may be forged)) by mxout1.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l4L2j81I020079 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 20 May 2007 19:45:08 -0700 X-Auth-Received: from [192.168.10.45] (c-67-166-149-71.hsd1.ca.comcast.net [67.166.149.71]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l4L2iv8f008117 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 20 May 2007 19:45:06 -0700 Message-ID: <465107A5.3070903@u.washington.edu> Date: Sun, 20 May 2007 19:44:53 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4650D8F1.3060701@u.washington.edu> <4650FF62.1060000@cyberwang.net> <20070521022208.GD13345@dan.emsphone.com> In-Reply-To: <20070521022208.GD13345@dan.emsphone.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.1.294258, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.5.20.192435 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Re: More questions about BDB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 02:45:08 -0000 Dan Nelson wrote: > In the last episode (May 20), Sean Bryant said: >> Just a personal curiosity. Is there a particular reason why FreeBSD >> is holding on to BDB 1.85? > > All later versions have a non-BSD license (a source redistribution > requirement was added), which means it can't go in the base system. > BDB is built into libc and is used for the hashed passwd & termcap > databases. Correct. BDB 1.85 is also packaged in gnu libc I believe, which makes it a more portable means for representing databases without external libraries. -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon May 21 03:02:10 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3017516A400 for ; Mon, 21 May 2007 03:02:10 +0000 (UTC) (envelope-from SRS0=P9Shik=KW=vvelox.net=v.velox@yourhostingaccount.com) Received: from mailout19.yourhostingaccount.com (mailout19.yourhostingaccount.com [65.254.253.154]) by mx1.freebsd.org (Postfix) with ESMTP id DB31513C448 for ; Mon, 21 May 2007 03:02:07 +0000 (UTC) (envelope-from SRS0=P9Shik=KW=vvelox.net=v.velox@yourhostingaccount.com) Received: from mailscan02.yourhostingaccount.com ([10.1.15.2] helo=mailscan02.yourhostingaccount.com) by mailout19.yourhostingaccount.com with esmtp (Exim) id 1Hpxfu-0000ii-QU for freebsd-hackers@freebsd.org; Sun, 20 May 2007 22:31:06 -0400 Received: from authsmtp08.yourhostingaccount.com ([10.1.18.8] ident=exim) by mailscan02.yourhostingaccount.com with spamscanlookuphost (Exim) id 1Hpxfu-0004IM-Nz for freebsd-hackers@freebsd.org; Sun, 20 May 2007 22:31:06 -0400 Received: from authsmtp08.yourhostingaccount.com ([10.1.18.8] helo=authsmtp08.yourhostingaccount.com) by mailscan02.yourhostingaccount.com with esmtp (Exim) id 1Hpxft-0004IB-QJ; Sun, 20 May 2007 22:31:05 -0400 Received: from cpe-65-185-51-114.columbus.res.rr.com ([65.185.51.114] helo=vixen42) by authsmtp08.yourhostingaccount.com with esmtpa (Exim) id 1Hpxft-0001nJ-AV; Sun, 20 May 2007 22:31:05 -0400 Date: Sun, 20 May 2007 22:33:38 -0400 From: "Zane C.B." To: Dan Lukes Message-ID: <20070520223338.49409574@vixen42> In-Reply-To: <4650F93A.3080603@obluda.cz> References: <20070519130533.722e8b57@vixen42> <86bqgfh4w0.fsf@dwp.des.no> <20070520120142.39e86eae@vixen42> <86tzu7ifp2.fsf@dwp.des.no> <20070520132410.58989605@vixen42> <4650939B.6020004@obluda.cz> <20070520200310.4a79954e@vixen42> <4650F93A.3080603@obluda.cz> X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.12; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EN-UserInfo: 0d1ca1697cdb7a831d4877828571b7ab:1570f0de6936c69fef9e164fffc541bc X-EN-AuthUser: vvelox2 Sender: "Zane C.B." X-EN-OrigIP: 65.185.51.114 X-EN-OrigHost: cpe-65-185-51-114.columbus.res.rr.com Cc: freebsd-hackers@freebsd.org Subject: Re: PAM exec patch to allow PAM_AUTHTOK to be exported. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 03:02:10 -0000 On Mon, 21 May 2007 03:43:22 +0200 Dan Lukes wrote: > Zane C.B. napsal/wrote, On 05/21/07 02:03: > >> 3. want's to be PAM aware, but it's programmer is too lazy to > >> write it the clean way (as regular pam module) - we need the > >> patch > >> > >> The patch shall be rejected because the only purpose of > >> it is to support lazy programmers creating hacks instead of > >> solutions. > > > > Actually it does not support lazy programming, but makes life of a > > makes life of a administrator easier. > > The contrib/smbfs/mount_smbfs/mount_smbfs.c is very short > and simple. Writing PAM module with same functionality require > almost the same amount of time as patching it. In advance, you need > catch not only pam_sm_session_open but pam_sm_session_close (i > assume you plan to umount resource also). Unfortunately (unless I > miss something) pam_exec has no way to pass about 'direction' to > called program. You can't use simple heuristic "when not mounted > mount it and vice versa" also because the same user can have more > than one simultaneous active session. True. That would be another issue. Regardless, it is going to need a daemon to run in the background or something. I don't think using PAM to figure out if it should be unmounted is a good idea, unless you kill all processes owned by that user upon session close. IMO it would be best to check if there are any processes running owned by that user before unmounting it and if there are, leave it for the cleanup daemon. > The logic you need to implement seems to require much more > coding than simple patch on either pam_exec nor mount_smbfs ... > > pam_exec in chain more hurts than helps. IMHO, of course. > > But further discussion about it seems not to be security > related, so we should not continue here. Yup. Moving to hackers. :) From owner-freebsd-hackers@FreeBSD.ORG Mon May 21 07:58:03 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1AA0616A421 for ; Mon, 21 May 2007 07:58:03 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id EB54E13C46A for ; Mon, 21 May 2007 07:58:02 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (k0zppwk9c8xc713x@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l4L7vxfJ047497; Mon, 21 May 2007 00:57:59 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l4L7vw8J047496; Mon, 21 May 2007 00:57:58 -0700 (PDT) (envelope-from jmg) Date: Mon, 21 May 2007 00:57:58 -0700 From: John-Mark Gurney To: Daniel Molina Wegener Message-ID: <20070521075757.GG4602@funkthat.com> Mail-Followup-To: Daniel Molina Wegener , FreeBSD Hackers References: <200705201831.38828.dmw@unete.cl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200705201831.38828.dmw@unete.cl> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: FreeBSD Hackers Subject: Re: kqueue implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 07:58:03 -0000 Daniel Molina Wegener wrote this message on Sun, May 20, 2007 at 18:31 -0400: > I'm coding an application using the kqueue facility, but > I see that I can't handle open and read events. Is planned to > implement these handlings in the future?. Also, which facility > can I use to handle these kind of events? I'm unsure what you mean by open and read events? Do you mean getting an event when another process opens are file? or? As for read, they work fine for sockets, as w/ select, files are always ready to read even though they may block to read from disk... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Mon May 21 08:52:19 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4730E16A421 for ; Mon, 21 May 2007 08:52:19 +0000 (UTC) (envelope-from lstewart@room52.net) Received: from swin.edu.au (gpo4.cc.swin.edu.au [136.186.1.224]) by mx1.freebsd.org (Postfix) with ESMTP id 8F3A213C45D for ; Mon, 21 May 2007 08:52:18 +0000 (UTC) (envelope-from lstewart@room52.net) Received: from [136.186.229.95] (lstewart.caia.swin.edu.au [136.186.229.95]) by swin.edu.au (8.13.6.20060614/8.13.1) with ESMTP id l4L8q3bh017535; Mon, 21 May 2007 18:52:04 +1000 Message-ID: <46515DE0.20209@room52.net> Date: Mon, 21 May 2007 18:52:48 +1000 From: Lawrence Stewart User-Agent: Thunderbird 1.5.0.9 (X11/20070123) MIME-Version: 1.0 To: Ivan Voras References: <4649349D.4060101@room52.net> <200705150847.38838.marc.loerner@hob.de> <46499491.2010205@room52.net> In-Reply-To: Content-Type: multipart/mixed; boundary="------------020600060706080902050400" X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on gpo4.cc.swin.edu.au Cc: freebsd-hackers@freebsd.org Subject: Re: Writing a plain text file to disk from kernel space X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 08:52:19 -0000 This is a multi-part message in MIME format. --------------020600060706080902050400 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Will do Ivan as soon as I've figured everything out. However, I need some more help from you knowledgeable people. Attached is a fully self contained kernel module and associated makefile that demonstrates the problem I'm having. I've also attached a compiled version of the module for FreeBSD 6.2 RELEASE. The module does the following: - In its init function, it opens a file descriptor to /var/log/test23.log - In its init function, it writes a line of text to the opened file descriptor - In its shutdown function, writes a line of text to the opened file descriptor - In its shutdown function, closes the opened file descriptor The opening of the file descriptor and writing of text done in the module's init function works as expected. The writing of text done in the shutdown function fails with an errno of 9 (bad file descriptor) returned. The closing of the file descriptor doesn't appear to return an error, but I suspect it isn't working either. From what I've deduced so far, it appears to be a thread related issue. I have verified that the thread struct pointer pointed to by "curthread" in the module's init function is different to that in the shutdown function. I suspect that you can't use a file descriptor that was opened in one thread in a completely different thread, but I'm not sure if this is true, and if it is true, how to get around it. Any ideas, explanations, help or suggestions regarding how file IO and threading work and how I can get cross-thread file IO working would be most welcome. Cheers, Lawrence Ivan Voras wrote: > Lawrence Stewart wrote: > >> I'll have a play around and report back to the list what I find for >> archival purposes. > > Please do, and also consider writing a short and instructive tutorial > on it! Many people have asked this same question without a > to-the-point answer. > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" --------------020600060706080902050400 Content-Type: text/plain; name="filewriter.c" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="filewriter.c" Ly8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioKLy8gZmlsZXdyaXRlcgovLwovLyBBIEZyZWVCU0Qga2VybmVsIG1vZHVsZSB0aGF0IGRl bW9uc3RyYXRlcyBob3cgdG8gb3BlbiBhbmQKLy8gd3JpdGUgYSB0ZXh0IGZpbGUgZnJvbSB3 aXRoaW4gdGhlIGtlcm5lbC4KLy8KLy8gRGF0ZTogTWF5IDIwMDcKLy8gQVVUSE9SUzoKLy8g ICBKYW1lcyBIZWFseSA8amhlYWx5QHN3aW4uZWR1LmF1PgovLyAgIExhd3JlbmNlIFN0ZXdh cnQgPGxhc3Rld2FydEBzd2luLmVkdS5hdT4KLy8qKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioKCiNpbmNsdWRlIDxzeXMvcGFyYW0uaD4K I2luY2x1ZGUgPHN5cy9tb2R1bGUuaD4KI2luY2x1ZGUgPHN5cy9rZXJuZWwuaD4KI2luY2x1 ZGUgPHN5cy9zeXN0bS5oPgojaW5jbHVkZSA8c3lzL3BjcHUuaD4KI2luY2x1ZGUgPHN5cy9w cm9jLmg+CiNpbmNsdWRlIDxzeX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fb3JkZXIgZW51bWVyYXRpb24gaW4gL3Vzci9pbmNsdWRlL3N5 cy9rZXJuZWwuaAovLyAgICAgICAgIERlZmluZXMgdGhlIG9yZGVyIG9mIHRoaXMga2xkJ3Mg aW5pdGlhbGl6YXRpb24gd2l0aGluIHRoZSBzdWJzeXN0ZW0gZGVmaW5lZCBieSBwYXJhbSAz CkRFQ0xBUkVfTU9EVUxFKGZpbGV3cml0ZXIsIGZpbGV3cml0ZXJfbW9kLCBTSV9TVUJfS0xE LCBTSV9PUkRFUl9BTlkpOwo= --------------020600060706080902050400 Content-Type: application/octet-stream; name="filewriter.ko" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="filewriter.ko" f0VMRgEBAQkAAAAAAAAAAAMAAwABAAAA3AUAADQAAACQCgAAAAAAADQAIAADACgAEQAOAAEA AAAAAAAAAAAAAAAAAAAsCQAALAkAAAUAAAAAEAAAAQAAACwJAAAsGQAALBkAALAAAAC4AAAA BgAAAAAQAAACAAAAWAkAAFgZAABYGQAAeAAAAHgAAAAGAAAABAAAABEAAAAgAAAAEgAAABoA AAAbAAAAHwAAAB0AAAAAAAAAFAAAABYAAAAPAAAAAAAAABkAAAAeAAAAFwAAABwAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAAAAABEAAAAAAAAA DgAAAAAAAAAAAAAAFQAAABAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlAAAAAAA AAADAAEAAAAAAGABAAAAAAAAAwACAAAAAABgAwAAAAAAAAMAAwAAAAAATAQAAAAAAAADAAQA AAAAANwFAAAAAAAAAwAFAAAAAAAVCAAAAAAAAAMABgAAAAAAJAkAAAAAAAADAAcAAAAAACgJ AAAAAAAAAwAIAAAAAAAsGQAAAAAAAAMACQAAAAAAWBkAAAAAA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AAAAA EADx/wkBAABYGQAAAAAAABEA8f8SAQAAAAAAAAAAAAAQAAAAGgEAAAAAAAAAAAAAEAAAAC8B AAAAAAAAAAAAABAAAAA1AQAAKAkAAAAAAAAQAPH/TAEAAAAAAAAAAAAAEAAAAFgBAAAAAAAA AAAAABAAAABiAQAAJAkAAAAAAAAQAPH/egEAANwZAAAAAAAAEADx/4YBAAAAAAAAAAAAABAA AACOAQAA3BkAAAAAAAAQAPH/lQEAANAZAAAAAAAAEQDx/6sBAADkGQAAAAAAABAA8f+wAQAA AAAAAAAAAAAQAAAAtwEAACwJAAAAAAAAEADx/9IBAAAAAAAAAAAAABAAAAAAX19zZXRfc3lz aW5pdF9zZXRfc3ltX2ZpbGV3cml0ZXJtb2R1bGVfc3lzX2luaXQAZmlsZXdyaXRlcm1vZHVs ZV9zeXNfaW5pdABmaWxld3JpdGVyX21vZABsb2FkX2hhbmRsZXIAX19zZXRfbW9kbWV0YWRh dGFfc2V0X3N5bV9fbW9kX21ldGFkYXRhX21kX2ZpbGV3cml0ZXIAX21vZF9tZXRhZGF0YV9t ZF9maWxld3JpdGVyAHRlc3RmZABmaWxld3JpdGVyX2hvb2tlZABmaWxld3JpdGVyX3dyaXRl bG9nAHByaW50ZgBfX3N0YXJ0X3NldF9tb2RtZXRhZGF0YV9zZXQAX0RZTkFNSUMAdXByaW50 ZgBtb2R1bGVfcmVnaXN0ZXJfaW5pdABiemVybwBfX3N0b3Bfc2V0X3N5c2luaXRfc2V0AGtl cm5fd3JpdGV2AGtlcm5fb3BlbgBfX3N0YXJ0X3NldF9zeXNpbml0X3NldABfX2Jzc19zdGFy dABzcHJpbnRmAF9lZGF0YQBfR0xPQkFMX09GRlNFVF9UQUJMRV8AX2VuZABzdHJsZW4AX19z dG9wX3NldF9tb2RtZXRhZGF0YV9zZXQAY2xvc2UA --------------020600060706080902050400 Content-Type: text/plain; name="Makefile" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="Makefile" U1JDUz1maWxld3JpdGVyLmMKS01PRD1maWxld3JpdGVyCgouaW5jbHVkZSA8YnNkLmttb2Qu bWs+IAoKCg== --------------020600060706080902050400-- From owner-freebsd-hackers@FreeBSD.ORG Mon May 21 09:43:10 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 48B5316A400 for ; Mon, 21 May 2007 09:43:10 +0000 (UTC) (envelope-from nico-freebsd-hackers@schottelius.org) Received: from denkbrett.schottelius.org (natgw.netstream.ch [62.65.128.28]) by mx1.freebsd.org (Postfix) with ESMTP id 0C23F13C458 for ; Mon, 21 May 2007 09:43:07 +0000 (UTC) (envelope-from nico-freebsd-hackers@schottelius.org) Received: by denkbrett.schottelius.org (Postfix, from userid 1000) id A47D25B33A; Mon, 21 May 2007 11:24:43 +0200 (CEST) Date: Mon, 21 May 2007 11:24:43 +0200 From: Nico -telmich- Schottelius To: freebsd-hackers@freebsd.org Message-ID: <20070521092443.GC1101@schottelius.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2JFBq9zoW8cOFH7v" Content-Disposition: inline User-Agent: echo $message | gpg -e $sender -s | netcat mailhost 25 X-Unix-Info: http://unix.schottelius.org/ X-Netzseite: http://nico.schottelius.org/ X-System-Info: denkbrett running Linux 2.6.21-denkbrett on i686 Subject: disk i/o problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 09:43:10 -0000 --2JFBq9zoW8cOFH7v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello everyone, I did some tests on our Dell Poweredge SC 1425, because our new mailserver had one outage (reason unknown) and was onetime running extremly slow. So I took another brand new sc1425 and run http://home.schottelius.org/~nico/unix/freebsd/testdisks.sh on it. The result is that the machine is practically dead, when the script is running. I started the script in a screen, in which also top, gstat, systat -iostat and vmstat -a runs in. I can navigate through the screen, but if I type 'ls' in a open shell it will never return until I stop the testscript. Connecting to the machine via ssh is impossible within this time, existing connections are still there. Configuration of the machine: - 1x dual core 3.2ghz xeon - 2x scsi disks (u320) combined via gmirror to raid1 - RAID bus controller: Adaptec ASC-39320(B) U320 w/HostRAID (rev 10) - mount: /dev/mirror/raid1s1a on / (ufs, local, soft-updates) My question regarding this issue: - it seems not to be normal to me, that a system is practically dead when running some i/o heavy processes and it also does not look to me like a general freebsd issue; what could be the reason for it? - is it possible to choose i/o schedulars in freebsd like linux offers it with sfq/deadline/cbq? - what's the general / normal behaviour of freebsd when doing i/o scheduling? I'll also post a more detailled description about the problem in the other server on -questions in the next minutes. Sincerly Nico --=20 Think about Free and Open Source Software (FOSS). http://nico.schottelius.org/documentations/foss/the-term-foss/ PGP: BFE4 C736 ABE5 406F 8F42 F7CF B8BE F92A 9885 188C --2JFBq9zoW8cOFH7v Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGUWVbuL75KpiFGIwRAifbAKCKknC4Wl4u6g+v7JNCaeopBwz39QCfcFRJ iCzviuvErQOGCggO+IHtHA8= =zYeG -----END PGP SIGNATURE----- --2JFBq9zoW8cOFH7v-- From owner-freebsd-hackers@FreeBSD.ORG Mon May 21 10:58:41 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8CBFD16A400 for ; Mon, 21 May 2007 10:58:41 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 4D8CC13C43E for ; Mon, 21 May 2007 10:58:41 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 7E2722084; Mon, 21 May 2007 12:58:35 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 011892083; Mon, 21 May 2007 12:58:35 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id DD2355747; Mon, 21 May 2007 12:58:34 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Lawrence Stewart References: <4649349D.4060101@room52.net> <200705150847.38838.marc.loerner@hob.de> <46499491.2010205@room52.net> <46515DE0.20209@room52.net> Date: Mon, 21 May 2007 12:58:34 +0200 In-Reply-To: <46515DE0.20209@room52.net> (Lawrence Stewart's message of "Mon\, 21 May 2007 18\:52\:48 +1000") Message-ID: <86sl9qtpd1.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: Writing a plain text file to disk from kernel space X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 10:58:41 -0000 Lawrence Stewart writes: > I suspect that you can't use a file descriptor that was opened in one > thread in a completely different thread, but I'm not sure if this is > true, and if it is true, how to get around it. A file descriptor is an index into a file table. Different threads have different file tables. If you want to read from or write to files within the kernel, you need to operate directly on vnodes, not on file descriptors. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon May 21 11:06:46 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8AC0C16A480 for ; Mon, 21 May 2007 11:06:46 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.176]) by mx1.freebsd.org (Postfix) with ESMTP id 4A9DC13C447 for ; Mon, 21 May 2007 11:06:46 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: by py-out-1112.google.com with SMTP id f31so1815133pyh for ; Mon, 21 May 2007 04:06:45 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=aDqBPjA6X8+2m1+djKoFjPfxF4xiaxCTqFv71JR0PXtH3XIwwGPLwZsbve3b2bZ7UqHmnBq35Ypb5aYFd/gOnjPnUXVMTYHuM+PU7JVlNAiQKgLSAdVAFc8K0Nd0+zeM0Sga8IgC7jDAlYXikgACxxke830NcKn6aS9Plj3U5sk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NA4gvCZdlx2vZPSkDw9MzCbzpRWKQpY6G8Ly8kiJ8EnauXNEFZDjmxBO8ZP42lRQiz8LCcNNsm01tj/mYoc3o09yVNfOs7q1qOBZkKj+mfkTDuoJsaHRM+PjoIRweI00nUlP4aLxbzJKqJHSTrCdnjKXlm/4b9jys83ZISplIjo= Received: by 10.65.43.5 with SMTP id v5mr10531867qbj.1179745605217; Mon, 21 May 2007 04:06:45 -0700 (PDT) Received: by 10.65.59.5 with HTTP; Mon, 21 May 2007 04:06:45 -0700 (PDT) Message-ID: <84dead720705210406s79da5cf7t753394d9374fd3f2@mail.gmail.com> Date: Mon, 21 May 2007 11:06:45 +0000 From: "Joseph Koshy" To: "=?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?=" In-Reply-To: <86646ugywf.fsf@dwp.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4649349D.4060101@room52.net> <86646ugywf.fsf@dwp.des.no> Cc: Lawrence Stewart , freebsd-hackers@freebsd.org Subject: Re: Writing a plain text file to disk from kernel space X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 11:06:46 -0000 ls> So, I'm looking for a way to manually open up a file from within ls> kernel space and dump characters into it. des> Note that it opens the file in userland and passes it down to the des> kernel. You may want to consider a similar mechanism. hwpmc(4) takes a similar approach, using a dedicated kthread to to perform writes. -- FreeBSD Volunteer, http://people.freebsd.org/~jkoshy From owner-freebsd-hackers@FreeBSD.ORG Mon May 21 12:23:43 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EE01916A421 for ; Mon, 21 May 2007 12:23:43 +0000 (UTC) (envelope-from dan@obluda.cz) Received: from smtp1.kolej.mff.cuni.cz (smtp1.kolej.mff.cuni.cz [195.113.24.4]) by mx1.freebsd.org (Postfix) with ESMTP id 91FD613C44B for ; Mon, 21 May 2007 12:23:43 +0000 (UTC) (envelope-from dan@obluda.cz) X-Envelope-From: dan@obluda.cz Received: from kulesh.obluda.cz (openvpn.ms.mff.cuni.cz [195.113.20.87]) by smtp1.kolej.mff.cuni.cz (8.13.8/8.13.8) with ESMTP id l4LBrfOl096375; Mon, 21 May 2007 13:53:47 +0200 (CEST) (envelope-from dan@obluda.cz) Message-ID: <46518845.1000406@obluda.cz> Date: Mon, 21 May 2007 13:53:41 +0200 From: Dan Lukes User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.2) Gecko/20070327 SeaMonkey/1.1.1 MIME-Version: 1.0 To: "Zane C.B." References: <20070519130533.722e8b57@vixen42> <86bqgfh4w0.fsf@dwp.des.no> <20070520120142.39e86eae@vixen42> <86tzu7ifp2.fsf@dwp.des.no> <20070520132410.58989605@vixen42> <4650939B.6020004@obluda.cz> <20070520200310.4a79954e@vixen42> <4650F93A.3080603@obluda.cz> <20070520223338.49409574@vixen42> In-Reply-To: <20070520223338.49409574@vixen42> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 21 May 2007 12:31:12 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: PAM exec patch to allow PAM_AUTHTOK to be exported. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 12:23:44 -0000 Zane C.B. napsal/wrote, On 05/21/07 04:33: >> In advance, you need >> catch not only pam_sm_session_open but pam_sm_session_close (i >> assume you plan to umount resource also). Unfortunately (unless I >> miss something) pam_exec has no way to pass about 'direction' to >> called program. You can't use simple heuristic "when not mounted >> mount it and vice versa" also because the same user can have more >> than one simultaneous active session. > > True. That would be another issue. Regardless, it is going to need a > daemon to run in the background or something. In the fact, you are in trouble because the OS doesn't know "user session" so it didn't help you to maintain the information. User session is PAM category. You are true - you need a system-wide persistent object that hold information "a session for user X remain active". You can create a daemon, you can create a file in the filesystem or so. But it's not solution of your main problem - where to catch information the session start/ends. At the first, you have with session start whenever PAM not used for authentication. It's not only telnetd which doesn't use PAM at all. There are many daemons that can start user-scripts but not as part of (PAM) user session. For example CRON, SENDMAIL (when "| script.sh" used in .forward) and so on. Even worse is catching of session-end. At the first, it's application responsibility to call PAM's session close and the close may not be called in some cases of abnormal end. Even if we ignore those abnormal cases, regular exit of the application authenticating the user into system constitute end of PAM's session, but it doesn't mean that no user proces is running in the system. There are may be tenths of proceses started during session that run in the background, detached from terminal and owned by INIT as parent process. To make things more complicated, a process can have more than one effective user during lifetime. If euid chages - are you ready to remap directories accordingly ? > I don't think using PAM to figure out if it should be unmounted is a good idea In the fact, I don't thing the PAM is good place to figure out the directory needs to be mounted as well. PAM may be the place where you can stealth the user name and password an store it somewhere for later use. You can create kernel module monitoring process creation and EUID changes. It can map/unmap user's directories. Unfortunately, you need secure persistent storage of every user name and password (user processes may be started shortly after the start of system - before the user log-in first time, so in-memory only storage is not sufficient). By the way, we still speak about "name+password" authentication only. Your system can't work when user authenticate itself by other system (digital signature, OTP, challenge-response, magnetic or chip card, a biometric based authentication and so on). If your system allow access via ssh and a user will use authentication wia key, then you have no way to do what you want automagicaly. Even if we forget other authentication system than "name+pwd", persistent password database is security risk. Persistent storage of user credentials without it's approval may have law consequences also. If we speak about proprietary solutions (for your only) it may not be problem. If we speak about "standard distribution solution" we can't forged about it. > unless you kill all processes owned by that user upon session close. Insufficient. Process with effective rights as a user can be started later, not as a part of a session. You need global knowledge about all processes and their efective UIDs. > IMO it > would be best to check if there are any processes running owned by > that user before unmounting it and if there are, leave it for the > cleanup daemon. "Cleanup daemon" is "end-session" solution. Not "start-session". You need kernel module for "is a process runing for a user" tracking. PAM may help with creating persistent system password database used by this module for real mounting. Or you can reevaluate what you want. If you need "automagic mouting" avaiable during interactive user sessions only then things become simpler. > Yup. Moving to hackers. :) I'm not a member. Dan -- Dan Lukes SISAL MFF UK AKA: dan at obluda.cz, dan at freebsd.cz, dan at (kolej.)mff.cuni.cz From owner-freebsd-hackers@FreeBSD.ORG Mon May 21 13:48:54 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5181B16A400 for ; Mon, 21 May 2007 13:48:54 +0000 (UTC) (envelope-from dmw@unete.cl) Received: from mail07.ifxnetworks.com (mail07.ifxnetworks.com [190.61.128.17]) by mx1.freebsd.org (Postfix) with ESMTP id E74C013C45E for ; Mon, 21 May 2007 13:48:53 +0000 (UTC) (envelope-from dmw@unete.cl) Received: (qmail 7488 invoked from network); 21 May 2007 13:48:52 -0000 X-Spam-DCC: CTc-dcc1: mail07.ifxnetworks.com 1030; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail07.ifxnetworks.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=6.0 tests=none autolearn=disabled version=3.1.8 Received: from unknown (HELO quake) (dmw@unete.cl@[200.73.29.218]) (envelope-sender ) by mail07.ifxnetworks.com (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 21 May 2007 13:48:51 -0000 From: Daniel Molina Wegener Organization: DMW To: freebsd-hackers@freebsd.org, John-Mark Gurney Date: Mon, 21 May 2007 09:48:35 -0400 User-Agent: KMail/1.9.6 References: <200705201831.38828.dmw@unete.cl> <20070521075757.GG4602@funkthat.com> In-Reply-To: <20070521075757.GG4602@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705210948.36033.dmw@unete.cl> Cc: Subject: Re: kqueue implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dmw@unete.cl List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 13:48:54 -0000 On Monday 21 May 2007 03:57:58 John-Mark Gurney wrote: > Daniel Molina Wegener wrote this message on Sun, May 20, 2007 at 18:31 -0400: > > I'm coding an application using the kqueue facility, but > > I see that I can't handle open and read events. Is planned > > to implement these handlings in the future?. Also, which > > facility can I use to handle these kind of events? > > I'm unsure what you mean by open and read events? Do you > mean getting an event when another process opens are file? > or? As for read, they work fine for sockets, as w/ select, > files are always ready to read even though they may block to > read from disk... Hello, I mean vnode events, in the manual page I see NOTE_WRITE, but I need NOTE_OPEN and NOTE_READ. Is there any chance to get these kind of events? Regards, -- .O. | Daniel Molina Wegener | C/C++ Developer ..O | dmw [at] unete [dot] cl | FOSS Coding Adict OOO | BSD & Linux User | Standards Rocks! From owner-freebsd-hackers@FreeBSD.ORG Mon May 21 23:23:29 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3607516A46B for ; Mon, 21 May 2007 23:23:29 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id E616913C4BD for ; Mon, 21 May 2007 23:23:28 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (vutq1rgdq5gr0hzz@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l4LNNRoa062971; Mon, 21 May 2007 16:23:27 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l4LNNRvh062970; Mon, 21 May 2007 16:23:27 -0700 (PDT) (envelope-from jmg) Date: Mon, 21 May 2007 16:23:26 -0700 From: John-Mark Gurney To: Daniel Molina Wegener Message-ID: <20070521232326.GJ4602@funkthat.com> Mail-Followup-To: Daniel Molina Wegener , freebsd-hackers@freebsd.org, Suleiman Souhlal References: <200705201831.38828.dmw@unete.cl> <20070521075757.GG4602@funkthat.com> <200705210948.36033.dmw@unete.cl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200705210948.36033.dmw@unete.cl> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-hackers@freebsd.org, Suleiman Souhlal Subject: Re: kqueue implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 23:23:29 -0000 Daniel Molina Wegener wrote this message on Mon, May 21, 2007 at 09:48 -0400: > On Monday 21 May 2007 03:57:58 John-Mark Gurney wrote: > > Daniel Molina Wegener wrote this message on Sun, May 20, 2007 > at 18:31 -0400: > > > I'm coding an application using the kqueue facility, but > > > I see that I can't handle open and read events. Is planned > > > to implement these handlings in the future?. Also, which > > > facility can I use to handle these kind of events? > > > > I'm unsure what you mean by open and read events? Do you > > mean getting an event when another process opens are file? > > or? As for read, they work fine for sockets, as w/ select, > > files are always ready to read even though they may block to > > read from disk... > > I mean vnode events, in the manual page I see NOTE_WRITE, but I > need NOTE_OPEN and NOTE_READ. Is there any chance to get these > kind of events? Yes, it should be possible... You should ask Suleiman Souhlal (cc'd) (ssouhlal) who did some recent work in that area... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 07:23:30 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A6BB16A400 for ; Tue, 22 May 2007 07:23:30 +0000 (UTC) (envelope-from nico-freebsd-hackers@schottelius.org) Received: from denkbrett.schottelius.org (natgw.netstream.ch [62.65.128.28]) by mx1.freebsd.org (Postfix) with ESMTP id 5E1DE13C458 for ; Tue, 22 May 2007 07:23:30 +0000 (UTC) (envelope-from nico-freebsd-hackers@schottelius.org) Received: by denkbrett.schottelius.org (Postfix, from userid 1000) id 92D73FE9AA; Tue, 22 May 2007 09:23:35 +0200 (CEST) Date: Tue, 22 May 2007 09:23:35 +0200 From: Nico -telmich- Schottelius To: freebsd-hackers@freebsd.org Message-ID: <20070522072335.GA5145@schottelius.org> References: <20070521092443.GC1101@schottelius.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline In-Reply-To: <20070521092443.GC1101@schottelius.org> User-Agent: echo $message | gpg -e $sender -s | netcat mailhost 25 X-Unix-Info: http://unix.schottelius.org/ X-Netzseite: http://nico.schottelius.org/ X-System-Info: denkbrett running Linux 2.6.21-denkbrett on i686 Subject: Re: disk i/o problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 07:23:30 -0000 --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Nico -telmich- Schottelius [Mon, May 21, 2007 at 11:24:43AM +0200]: > [...] > I did some tests on our Dell Poweredge SC 1425, because our new > mailserver had one outage (reason unknown) and was onetime running > extremly slow. > [...] Update: I removed da1 from the array, rebooted, used da1s1a as root filesystem and retested. Result: The same behaviour. This at least kicks out gmirror problems, though I am still pretty confused why the system freezes. Nico --=20 Think about Free and Open Source Software (FOSS). http://nico.schottelius.org/documentations/foss/the-term-foss/ PGP: BFE4 C736 ABE5 406F 8F42 F7CF B8BE F92A 9885 188C --6TrnltStXW4iwmi0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGUpp3uL75KpiFGIwRAk8qAKDieKgSVwBwRMmUWiPfKeY25dB/5ACfU0wI o21QT4DPt2XlD0G+u58ZKpU= =tsyZ -----END PGP SIGNATURE----- --6TrnltStXW4iwmi0-- From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 07:31:16 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 304EF16A400; Tue, 22 May 2007 07:31:16 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from mx-out.forthnet.gr (mx-out.forthnet.gr [193.92.150.103]) by mx1.freebsd.org (Postfix) with ESMTP id 9E4FC13C487; Tue, 22 May 2007 07:31:15 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from mx-av-04.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-02.forthnet.gr (8.14.0/8.14.0) with ESMTP id l4M7VDDn011019; Tue, 22 May 2007 10:31:13 +0300 Received: from MX-IN-04.forthnet.gr (mx-in-04.forthnet.gr [193.92.150.163]) by mx-av-04.forthnet.gr (8.14.1/8.14.1) with ESMTP id l4M7VD41021961; Tue, 22 May 2007 10:31:13 +0300 Received: from [192.168.136.22] (ppp125-70.adsl.forthnet.gr [193.92.232.70]) by MX-IN-04.forthnet.gr (8.14.1/8.14.1) with ESMTP id l4M7V5Dp032661; Tue, 22 May 2007 10:31:06 +0300 Authentication-Results: MX-IN-04.forthnet.gr from=dds@aueb.gr; sender-id=neutral; spf=neutral Message-ID: <46529C30.2090906@aueb.gr> Date: Tue, 22 May 2007 10:30:56 +0300 From: Diomidis Spinellis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070222 SeaMonkey/1.1.1 MIME-Version: 1.0 To: freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org, freebsd-current@freebsd.org References: <461958CC.4040804@aueb.gr> <20070414170218.M76326@fledge.watson.org> <4621E826.6050306@aueb.gr> <20070415105157.J84174@fledge.watson.org> <46231C64.9010707@aueb.gr> <20070419101815.Y2913@fledge.watson.org> <4627A6C3.2070409@aueb.gr> <20070419212253.L2913@fledge.watson.org> <4627E311.6080500@aueb.gr> <463B581E.6070804@aueb.gr> In-Reply-To: <463B581E.6070804@aueb.gr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Process accounting changes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 07:31:16 -0000 The accounting changes discussed in arch@ about a month ago are now part of the CURRENT tree. The changes increase the precision of the time values stored in acct(5) from 15ms (which for most commands was too large) to 1 microsecond. The userland programs sa(8) and lastcomm(1) provide backward compatibility with existing record and file formats (including accounting files including both old and new records); regression tests are included to verify this. The changes have been tested on i386, amd64, and (partly) sparc64; please drop me an email if you suspect a problem with your particular setup. Many thanks to Garance A Drosehn, Bruce Evans, Peter Jeremy, Poul-Henning Kamp, Sam Leffler, Rick C. Petty, Erik Trulsson, and Robert Watson for their earlier comments; to Eric Anderson, Carl Johan Gustavsson, Larry Rosenman, and Derek Tattersall for responding to my hackers@ request with test data, and especially to Larry Rosenman for arranging access to an additional test machine. Diomidis Spinellis - http://www.spinellis.gr From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 07:57:53 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ECF2316A41F for ; Tue, 22 May 2007 07:57:53 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 7B98913C468 for ; Tue, 22 May 2007 07:57:53 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HqPFe-0000xW-Mq for freebsd-hackers@freebsd.org; Tue, 22 May 2007 09:57:50 +0200 Received: from 78-0-82-27.adsl.net.t-com.hr ([78.0.82.27]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 May 2007 09:57:50 +0200 Received: from ivoras by 78-0-82-27.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 May 2007 09:57:50 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Tue, 22 May 2007 09:57:34 +0200 Lines: 70 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD0F433E148B0D5BEABDA97F3" X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 78-0-82-27.adsl.net.t-com.hr User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) X-Enigmail-Version: 0.94.3.0 Sender: news Subject: GPT boot loader? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 07:57:54 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD0F433E148B0D5BEABDA97F3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi! I've had the opportunity to talk to Adam Martin, Marcel Moolenaar and Peter Wemm about making GPT bootable, but not all of them at the same time, so I'd like this thread to be the meeting point on the subject. (Adam and Peter have offered to modify the boot loader chain, but differently.) Summary: The idea is to replace bsdlabels with GPT. The problem is that GPT is intended to be used with EFI and not to be bootable by regular BIOS machines. For FreeBSD, there are two distinct cases: 1. the machine is GPT-only, there are no other MSDOS and bsdlabel partiti= ons 2. the machine is dual-boot or has some other need to retain MSDOS partitions. The second case is more convoluted as it means the MBR will hold a regular MSDOS partition table, and one of those partitions will hold a GPT - which is trivially done with GEOM but completely non-standard. The problems: On EFI based machines this firmware deals with partition issues so there's no problem, but BIOS machines will probably need some tweaking, up to the point of using more-or-less nonstandard GPT format. GPT details are available here: http://technet2.microsoft.com/windowsserver/en/library/bdeda920-1f08-4683= -9ffb-7b4b50df0b5a1033.mspx?mfr=3Dtrue and some useful tips are here: http://developer.apple.com/technotes/tn2006/tn2166.html Some of the breaking points are small "details" such as the requirement that the protective MBR be marked non-bootable, that there's no "bootable" flag among the official flags, and that the fields in the GPT are supposed to be disk-absolute (which is not a problem on FreeBSD but may be on other systems). Full support for GPT will require modifying boot0..boot2 but also the loader executable (since it parses UFS). I'd like to hear more from Adam and Peter (and others!) about their ideas= =2E.. --------------enigD0F433E148B0D5BEABDA97F3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGUqJuldnAQVacBcgRAoJUAKDGSJsJ3oBCicCZijzVuxE7dMb/PQCdEPUV zWzA4TpmB07OSiDnKHWNnpM= =3WJR -----END PGP SIGNATURE----- --------------enigD0F433E148B0D5BEABDA97F3-- From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 08:44:19 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E4E516A421 for ; Tue, 22 May 2007 08:44:19 +0000 (UTC) (envelope-from lstewart@room52.net) Received: from swin.edu.au (gpo4.cc.swin.edu.au [136.186.1.224]) by mx1.freebsd.org (Postfix) with ESMTP id 93A7113C458 for ; Tue, 22 May 2007 08:44:17 +0000 (UTC) (envelope-from lstewart@room52.net) Received: from [136.186.229.95] (lstewart.caia.swin.edu.au [136.186.229.95]) by swin.edu.au (8.13.6.20060614/8.13.1) with ESMTP id l4M8iCCU009256; Tue, 22 May 2007 18:44:13 +1000 Message-ID: <4652AD8C.7000605@room52.net> Date: Tue, 22 May 2007 18:45:00 +1000 From: Lawrence Stewart User-Agent: Thunderbird 1.5.0.9 (X11/20070123) MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <4649349D.4060101@room52.net> <200705150847.38838.marc.loerner@hob.de> <46499491.2010205@room52.net> <46515DE0.20209@room52.net> <86sl9qtpd1.fsf@dwp.des.no> In-Reply-To: <86sl9qtpd1.fsf@dwp.des.no> Content-Type: multipart/mixed; boundary="------------050508090406060108000201" X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on gpo4.cc.swin.edu.au Cc: freebsd-hackers@freebsd.org Subject: Re: Writing a plain text file to disk from kernel space X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 08:44:19 -0000 This is a multi-part message in MIME format. --------------050508090406060108000201 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit OK well that's cleared up. Thanks DES. So I went back to trying the kernio code I found here (http://people.freebsd.org/~pjd/misc/kernio/) which does operate directly on vnodes (first time I tried it I was getting kernel panics, so I assumed the code was a bit dated and carried on down the path of trying to get file descriptors working). Anyways, I modified the filewriter kernel module that I attached to my previous post so that it used the kio code, and verified that the code does work when called across different threads (in the module's init and deinit functions). However, when I ported it into my other module that I'm actually working on that uses the pfil hooks, I started getting hard resets again. After further investigation, it turns out that the pfil input hook I'm using, which catches packets as they traverse up the network stack, has no problems, and will happily write to the file using the kio_write function. However, in the pfil output hook, a call to kio_write causes a hard reset, with the following text shown on tty0: Sleeping thread (tid 100069, pid 613) owns a non-sleepable lock panic: sleeping thread If I comment out the kio_write code and put a printf instead, there are no such problems, so it seems the kio_write function is doing something that is upsetting the kernel, but only when called from a function that is acting as a pfil output hook? Strikes me as odd behaviour. I don't understand which thread the error is in relation to, why that thread is sleeping or which lock it is referring to. I tried wrapping the call to kio_write in a mutex, in case there was a race condition caused by multiple threads trying to write to the file at the one time, but that hasn't made a difference at all. I've attached the code that demonstrates the problem, but be warned: I've intentionally left it in a state that demonstrates the problem, and it will therefore hard reset any machine you run it on. Any thoughts on what's going on and how I can make the kio code not break the kernel when called from within a function that is acting as a pfil output hook? Cheers, Lawrence Dag-Erling Smørgrav wrote: > Lawrence Stewart writes: > >> I suspect that you can't use a file descriptor that was opened in one >> thread in a completely different thread, but I'm not sure if this is >> true, and if it is true, how to get around it. >> > > A file descriptor is an index into a file table. Different threads have > different file tables. > > If you want to read from or write to files within the kernel, you need > to operate directly on vnodes, not on file descriptors. > > DES > --------------050508090406060108000201 Content-Type: application/octet-stream; name="filewriter.ko" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="filewriter.ko" f0VMRgEBAQkAAAAAAAAAAAMAAwABAAAAyAgAADQAAADEDgAAAAAAADQAIAADACgAEQAOAAEA AAAAAAAAAAAAAAAAAAAUDQAAFA0AAAUAAAAAEAAAAQAAABQNAAAUHQAAFB0AALAAAAAQAQAA BgAAAAAQAAACAAAAQA0AAEAdAABAHQAAeAAAAHgAAAAGAAAABAAAACUAAAAuAAAAAAAAAAAA AAAcAAAAHgAAAAAAAAAkAAAAGwAAABAAAAAtAAAAAAAAAB8AAAAAAAAAAAAAACkAAAAAAAA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aW5pdAB2bl9maW5pc2hlZF93cml0ZQBt b2R1bGVfcmVnaXN0ZXJfaW5pdABwZmlsX2FkZF9ob29rAGJ6ZXJvAF9fc3RvcF9zZXRfc3lz aW5pdF9zZXQAdm5fb3Blbl9jcmVkAF9tdHhfdW5sb2NrX2ZsYWdzAFZPUF9XUklURV9BUFYA X19zdGFydF9zZXRfc3lzaW5pdF9zZXQAdm9wX2xlYXNlX2Rlc2MAX19ic3Nfc3RhcnQAdm9w X3dyaXRlX2Rlc2MAcGZpbF9oZWFkX2dldAB2b3BfdW5sb2NrX2Rlc2MAVk9QX1VOTE9DS19B UFYAVk9QX0xFQVNFX0FQVgBfZWRhdGEAX0dMT0JBTF9PRkZTRVRfVEFCTEVfAF9lbmQATkRG UkVFAHZuX2Nsb3NlAHJvb3R2bm9kZQBfX3N0b3Bfc2V0X21vZG1ldGFkYXRhX3NldABwZmls X3JlbW92ZV9ob29rAA== --------------050508090406060108000201 Content-Type: text/plain; name="kernio.h" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="kernio.h" LyotCiAqIENvcHlyaWdodCAoYykgMjAwNiBQYXdlbCBKYWt1YiBEYXdpZGVrIDxwLmRhd2lk ZWtAd2hlZWwucGw+CiAqIEFsbCByaWdodHMgcmVzZXJ2ZWQuCiAqCiAqIERvd25sb2FkZWQg ZnJvbSBodHRwOi8vcGVvcGxlLmZyZWVic2Qub3JnL35wamQvbWlzYy9rZXJuaW8vCiAqLwoK I2lmbmRlZiBfU1lTX0tFUk5JT19IXwojZGVmaW5lCV9TWVNfS0VSTklPX0hfCgpzdHJ1Y3Qg dm5vZGUgKmtpb19vcGVuKGNvbnN0IGNoYXIgKmZpbGUsIGludCBmbGFncywgaW50IGNtb2Rl KTsKdm9pZCBraW9fY2xvc2Uoc3RydWN0IHZub2RlICp2cCk7CmludCBraW9fd3JpdGUoc3Ry dWN0IHZub2RlICp2cCwgdm9pZCAqYnVmLCBzaXplX3Qgc2l6ZSk7CgojZW5kaWYJLyogX1NZ U19LRVJOSU9fSF8gKi8K --------------050508090406060108000201 Content-Type: text/plain; name="Makefile" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="Makefile" U1JDUz12bm9kZV9pZi5oIHN1YnJfa2VybmlvLmMgZmlsZXdyaXRlci5jCktNT0Q9ZmlsZXdy aXRlcgoKLmluY2x1ZGUgPGJzZC5rbW9kLm1rPiAKCgo= --------------050508090406060108000201 Content-Type: text/plain; name="subr_kernio.c" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="subr_kernio.c" LyotCiAqIENvcHlyaWdodCAoYykgMjAwNiBQYXdlbCBKYWt1YiBEYXdpZGVrIDxwLmRhd2lk ZWtAd2hlZWwucGw+CiAqIEFsbCByaWdodHMgcmVzZXJ2ZWQuCiAqCiAqIERvd25sb2FkZWQg ZnJvbSBodHRwOi8vcGVvcGxlLmZyZWVic2Qub3JnL35wamQvbWlzYy9rZXJuaW8vCiAqLwoK I2luY2x1ZGUgPHN5cy9jZGVmcy5oPgpfX0ZCU0RJRCgiJEZyZWVCU0QkIik7CgojaW5jbHVk ZSA8c3lzL3BhcmFtLmg+CiNpbmNsdWRlIDxzeXMvc3lzdG0uaD4KI2luY2x1ZGUgPHN5cy9r ZXJuZWwuaD4KI2luY2x1ZGUgPHN5cy9rdGhyZWFkLmg+CiNpbmNsdWRlIDxzeXMvbmFtZWku aD4KI2luY2x1ZGUgPHN5cy9wcm9jLmg+CiNpbmNsdWRlIDxzeXMvZmlsZWRlc2MuaD4KI2lu Y2x1ZGUgPHN5cy92bm9kZS5oPgojaW5jbHVkZSA8c3lzL21hbGxvYy5oPgojaW5jbHVkZSA8 c3lzL3VuaXN0ZC5oPgojaW5jbHVkZSA8c3lzL2ZjbnRsLmg+CgojaW5jbHVkZSAia2Vybmlv LmgiCgpzdHJ1Y3Qgdm5vZGUgKgpraW9fb3Blbihjb25zdCBjaGFyICpmaWxlLCBpbnQgZmxh Z3MsIGludCBjbW9kZSkKewoJc3RydWN0IHRocmVhZCAqdGQ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8oJmFpb3YsIHNpemVvZihhaW92KSk7CgliemVybygmYXVpbywgc2l6ZW9m KGF1aW8pKTsKCglhaW92Lmlvdl9iYXNlID0gYnVmOwoJYWlvdi5pb3ZfbGVuID0gc2l6ZTsK CglhdWlvLnVpb19pb3YgPSAmYWlvdjsKCWF1aW8udWlvX29mZnNldCA9IDA7CglhdWlvLnVp b19zZWdmbGcgPSBVSU9fU1lTU1BBQ0U7CglhdWlvLnVpb19ydyA9IFVJT19XUklURTsKCWF1 aW8udWlvX2lvdmNudCA9IDE7CglhdWlvLnVpb19yZXNpZCA9IHNpemU7CglhdWlvLnVpb190 ZCA9IHRkOwoKCS8qCgkgKiBEbyBhbGwgb2YgdGhlIGp1bmsgcmVxdWlyZWQgdG8gd3JpdGUg bm93LgoJICovCgl2bl9zdGFydF93cml0ZSh2cCwgJm1wLCBWX1dBSVQpOwoJdm5fbG9jayh2 cCwgTEtfRVhDTFVTSVZFIHwgTEtfUkVUUlksIHRkKTsKCVZPUF9MRUFTRSh2cCwgdGQsIHRk LT50ZF91Y3JlZCwgTEVBU0VfV1JJVEUpOwogIC8vIFRPRE86IElkZWFsbHksIHRoZSBmbGFn cyBwYXNzZWQgaW50byBWT1BfV1JJVEUgb24gdGhlIG5leHQgbGluZSBzaG91bGRuJ3QKICAv LyAgICAgICBiZSBoYXJkY29kZWQuIElzIHRoZXJlIGEgd2F5IHRvIGNhbGN1bGF0ZSB0aGVt IGJhc2VkIG9uIHRoZSBmbGFncwogIC8vICAgICAgIHBhc3NlZCBpbnRvIGtpb19vcGVuPwoJ Vk9QX1dSSVRFKHZwLCAmYXVpbywgSU9fVU5JVCB8IElPX1NZTkMgfCBJT19BUFBFTkQsIHRk LT50ZF91Y3JlZCk7CglWT1BfVU5MT0NLKHZwLCAwLCB0ZCk7Cgl2bl9maW5pc2hlZF93cml0 ZShtcCk7CglyZXR1cm4gKDApOwp9Cg== --------------050508090406060108000201-- From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 09:18:13 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B53116A421 for ; Tue, 22 May 2007 09:18:13 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id CFB1C13C465 for ; Tue, 22 May 2007 09:18:12 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 340A82084; Tue, 22 May 2007 11:18:09 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 1A6362083; Tue, 22 May 2007 11:18:09 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id F275957A6; Tue, 22 May 2007 11:18:08 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Lawrence Stewart References: <4649349D.4060101@room52.net> <200705150847.38838.marc.loerner@hob.de> <46499491.2010205@room52.net> <46515DE0.20209@room52.net> <86sl9qtpd1.fsf@dwp.des.no> <4652AD8C.7000605@room52.net> Date: Tue, 22 May 2007 11:18:08 +0200 In-Reply-To: <4652AD8C.7000605@room52.net> (Lawrence Stewart's message of "Tue\, 22 May 2007 18\:45\:00 +1000") Message-ID: <86r6p9md2n.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Writing a plain text file to disk from kernel space X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 09:18:13 -0000 Lawrence Stewart writes: > After further investigation, it turns out that the pfil input hook I'm > using, which catches packets as they traverse up the network stack, > has no problems, and will happily write to the file using the > kio_write function. However, in the pfil output hook, a call to > kio_write causes a hard reset, with the following text shown on tty0: > > Sleeping thread (tid 100069, pid 613) owns a non-sleepable lock > panic: sleeping thread This is a panic, not a hard reset. Since you are writing kernel code, I assume you have KDB/DDB in your kernel and know how to use it. > If I comment out the kio_write code and put a printf instead, there > are no such problems, so it seems the kio_write function is doing > something that is upsetting the kernel, but only when called from a > function that is acting as a pfil output hook? Strikes me as odd > behaviour. I don't understand which thread the error is in relation > to, why that thread is sleeping or which lock it is referring to. kio_write probably blocks waiting for the write to complete. You can't do that while holding a non-sleepable lock. > I tried wrapping the call to kio_write in a mutex, in case there was a > race condition caused by multiple threads trying to write to the file > at the one time, but that hasn't made a difference at all. It complains about sleeping with a non-sleepable lock held, and your solution is to add another non-sleepable lock? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 08:51:00 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 051B816A46B for ; Tue, 22 May 2007 08:51:00 +0000 (UTC) (envelope-from schwabe@uni-paderborn.de) Received: from mail.blinkt.de (mail.blinkt.de [88.198.169.219]) by mx1.freebsd.org (Postfix) with ESMTP id C014113C4DD for ; Tue, 22 May 2007 08:50:59 +0000 (UTC) (envelope-from schwabe@uni-paderborn.de) Received: from dslb-084-061-177-076.pools.arcor-ip.net ([84.61.177.76] helo=styx.local) by mail.blinkt.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1HqPcq-0000FL-Rh; Tue, 22 May 2007 10:21:48 +0200 Message-ID: <4652A81B.1070301@uni-paderborn.de> Date: Tue, 22 May 2007 10:21:47 +0200 From: Arne Schwabe User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; de; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: Ivan Voras References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 22 May 2007 11:57:23 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: GPT boot loader? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 08:51:00 -0000 Ivan Voras schrieb: > Hi! > > I've had the opportunity to talk to Adam Martin, Marcel Moolenaar and > Peter Wemm about making GPT bootable, but not all of them at the same > time, so I'd like this thread to be the meeting point on the subject. > > (Adam and Peter have offered to modify the boot loader chain, but > differently.) > > Summary: > > The idea is to replace bsdlabels with GPT. The problem is that GPT is > intended to be used with EFI and not to be bootable by regular BIOS > machines. For FreeBSD, there are two distinct cases: > > 1. the machine is GPT-only, there are no other MSDOS and bsdlabel partitions > 2. the machine is dual-boot or has some other need to retain MSDOS > partitions. > > The second case is more convoluted as it means the MBR will hold a > regular MSDOS partition table, and one of those partitions will hold a > GPT - which is trivially done with GEOM but completely non-standard. > 3. Use the GPT + MBR Format EFI Macs use. It has a normal MBR and a GPT and the MBR mirrors a subset of the GPT. The most challenging but conforms with EFI/GPT Arne From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 13:45:27 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4D43C16A468 for ; Tue, 22 May 2007 13:45:27 +0000 (UTC) (envelope-from ivoras@fer.hr) Received: from pinus.cc.fer.hr (pinus.cc.fer.hr [161.53.73.18]) by mx1.freebsd.org (Postfix) with ESMTP id CF87613C458 for ; Tue, 22 May 2007 13:45:26 +0000 (UTC) (envelope-from ivoras@fer.hr) Received: from [161.53.72.113] (lara.cc.fer.hr [161.53.72.113]) by pinus.cc.fer.hr (8.12.2/8.12.2) with ESMTP id l4MDtU3f002509; Tue, 22 May 2007 15:55:30 +0200 (MEST) Message-ID: <4652F3F3.8040201@fer.hr> Date: Tue, 22 May 2007 15:45:23 +0200 From: Ivan Voras User-Agent: Thunderbird 1.5.0.10 (X11/20060911) MIME-Version: 1.0 To: Craig Boston , freebsd-hackers@freebsd.org References: <20070522134224.GA15806@nowhere> In-Reply-To: <20070522134224.GA15806@nowhere> X-Enigmail-Version: 0.94.2.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig5AB9168D7EE8B93598BA0609" Cc: Subject: Re: GPT boot loader? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 13:45:27 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5AB9168D7EE8B93598BA0609 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Craig Boston wrote: > It's quite annoying to not be able to simply dd a partition without > having to fix up the offsets. The GEOM container-like metaphor is very= > nice but it sucks that the on-disk formats don't match. Well, if enough people get annoyed, we might make our own modern=20 partition format, let's call it "bsdlabels II" :)) --------------enig5AB9168D7EE8B93598BA0609 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGUvPzldnAQVacBcgRAmiDAKC1M/HpdY+fLOeatWY2nf9cKTnXOACePXUE J6DMTJLxawiMZz73398xBfg= =K/sD -----END PGP SIGNATURE----- --------------enig5AB9168D7EE8B93598BA0609-- From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 13:47:15 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7977816A468 for ; Tue, 22 May 2007 13:47:15 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 31C5013C44B for ; Tue, 22 May 2007 13:47:14 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HqUhg-0006AP-Mj for freebsd-hackers@freebsd.org; Tue, 22 May 2007 15:47:08 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 May 2007 15:47:08 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 May 2007 15:47:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Tue, 22 May 2007 15:46:58 +0200 Lines: 31 Message-ID: References: <4650D8F1.3060701@u.washington.edu> <4650FF62.1060000@cyberwang.net> <20070521022208.GD13345@dan.emsphone.com> <465107A5.3070903@u.washington.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD5DC7A56664E8F4DCFF0840D" X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 1.5.0.10 (X11/20060911) In-Reply-To: <465107A5.3070903@u.washington.edu> X-Enigmail-Version: 0.94.2.0 Sender: news Subject: Re: More questions about BDB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 13:47:15 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD5DC7A56664E8F4DCFF0840D Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Garrett Cooper wrote: > Correct. > BDB 1.85 is also packaged in gnu libc I believe, which makes it a=20 > more portable means for representing databases without external librari= es. AFAIK it was thrown out from GNU libc some time ago (but some=20 distributions, like Slackware, have added it again). --------------enigD5DC7A56664E8F4DCFF0840D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGUvRSldnAQVacBcgRApT7AJ9PXS3mMukVRBR4v+tdSMUCNp7otACfbIEY 2w8Zm3wct1lBemadlUV/ZNQ= =EsCn -----END PGP SIGNATURE----- --------------enigD5DC7A56664E8F4DCFF0840D-- From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 13:59:47 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B834816A421 for ; Tue, 22 May 2007 13:59:47 +0000 (UTC) (envelope-from craig@tobuj.gank.org) Received: from ion.gank.org (ion.gank.org [69.55.238.164]) by mx1.freebsd.org (Postfix) with ESMTP id A51B313C457 for ; Tue, 22 May 2007 13:59:47 +0000 (UTC) (envelope-from craig@tobuj.gank.org) Received: by ion.gank.org (Postfix, from userid 1001) id 27FA811555; Tue, 22 May 2007 08:42:29 -0500 (CDT) Date: Tue, 22 May 2007 08:42:25 -0500 From: Craig Boston To: Ivan Voras Message-ID: <20070522134224.GA15806@nowhere> Mail-Followup-To: Craig Boston , Ivan Voras , freebsd-hackers@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Cc: freebsd-hackers@freebsd.org Subject: Re: GPT boot loader? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 13:59:47 -0000 On Tue, May 22, 2007 at 09:57:34AM +0200, Ivan Voras wrote: > and that the fields in the GPT are supposed to be disk-absolute (which > is not a problem on FreeBSD but may be on other systems). Grrr, this is one design "feature" of BSD disklabels that I was hoping might finally go away. But it seems the GPT designers made the same mistake :( It's quite annoying to not be able to simply dd a partition without having to fix up the offsets. The GEOM container-like metaphor is very nice but it sucks that the on-disk formats don't match. Craig From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 17:25:32 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 39E2316A473 for ; Tue, 22 May 2007 17:25:32 +0000 (UTC) (envelope-from ssouhlal@FreeBSD.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 283F313C4C1 for ; Tue, 22 May 2007 17:25:32 +0000 (UTC) (envelope-from ssouhlal@FreeBSD.org) Received: from [192.168.0.97] (c-76-21-32-5.hsd1.ca.comcast.net [76.21.32.5]) by elvis.mu.org (Postfix) with ESMTP id A684D1A3C19; Tue, 22 May 2007 10:05:39 -0700 (PDT) In-Reply-To: <200705210948.36033.dmw@unete.cl> References: <200705201831.38828.dmw@unete.cl> <20070521075757.GG4602@funkthat.com> <200705210948.36033.dmw@unete.cl> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <23B4A664-5916-47D3-8D42-282817F6CC70@FreeBSD.org> Content-Transfer-Encoding: 7bit From: Suleiman Souhlal Date: Tue, 22 May 2007 10:04:37 -0700 To: dmw@unete.cl X-Mailer: Apple Mail (2.752.3) Cc: freebsd-hackers@freebsd.org, John-Mark Gurney Subject: Re: kqueue implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 17:25:32 -0000 On May 21, 2007, at 6:48 AM, Daniel Molina Wegener wrote: > On Monday 21 May 2007 03:57:58 John-Mark Gurney wrote: >> Daniel Molina Wegener wrote this message on Sun, May 20, 2007 > at 18:31 -0400: >>> I'm coding an application using the kqueue facility, but >>> I see that I can't handle open and read events. Is planned >>> to implement these handlings in the future?. Also, which >>> facility can I use to handle these kind of events? >> >> I'm unsure what you mean by open and read events? Do you >> mean getting an event when another process opens are file? >> or? As for read, they work fine for sockets, as w/ select, >> files are always ready to read even though they may block to >> read from disk... > > Hello, > > I mean vnode events, in the manual page I see NOTE_WRITE, but I > need NOTE_OPEN and NOTE_READ. Is there any chance to get these > kind of events? They should be easy to add.. All you would need to do for NOTE_OPEN would be to add a vop_open_post hook to VOP_OPEN that calls VFS_KNOTE_LOCKED(..., NOTE_OPEN). Similarly for read. Take a look at how, for example, NOTE_CREATE is implemented (vop_create_post in sys/kern/vfs_subr.c) and how we add VOP hooks (sys/kern/vnode_if.src). Why do you need these? -- Suleiman From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 18:07:10 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3868A16A41F for ; Tue, 22 May 2007 18:07:10 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id E8C5E13C489 for ; Tue, 22 May 2007 18:07:09 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id 5D465E7A3FA for ; Tue, 22 May 2007 18:07:06 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id 62DAB7D3D; Tue, 22 May 2007 20:06:50 +0200 (CEST) Date: Tue, 22 May 2007 20:06:48 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20070522180647.GA11365@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <200705201831.38828.dmw@unete.cl> <20070521075757.GG4602@funkthat.com> <200705210948.36033.dmw@unete.cl> <23B4A664-5916-47D3-8D42-282817F6CC70@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23B4A664-5916-47D3-8D42-282817F6CC70@FreeBSD.org> User-Agent: Mutt/1.5.13 (2006-08-11) Subject: Re: kqueue implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 18:07:10 -0000 On Tue, May 22, 2007 at 10:04:37AM -0700, Suleiman Souhlal wrote: > >I mean vnode events, in the manual page I see NOTE_WRITE, but I > >need NOTE_OPEN and NOTE_READ. Is there any chance to get these > >kind of events? > > They should be easy to add.. All you would need to do for NOTE_OPEN > would be to add a vop_open_post hook to VOP_OPEN that calls > VFS_KNOTE_LOCKED(..., NOTE_OPEN). Similarly for read. If this is done, it should be done very carefully. There are some non-trivial security implications by this, for example the process hiding can be at least partly circumvented by adding a open filter on rtld or libc.so. Joerg From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 18:34:26 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9733A16A400 for ; Tue, 22 May 2007 18:34:26 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.183]) by mx1.freebsd.org (Postfix) with ESMTP id 81AC113C45D for ; Tue, 22 May 2007 18:34:26 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (smtpin08-en2 [10.13.10.153]) by smtpout.mac.com (Xserve/smtpout13/MantshX 4.0) with ESMTP id l4MIYMpG025586; Tue, 22 May 2007 11:34:22 -0700 (PDT) Received: from [172.24.104.227] (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mac.com (Xserve/smtpin08/MantshX 4.0) with ESMTP id l4MIYC1O003220 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 22 May 2007 11:34:15 -0700 (PDT) In-Reply-To: <20070522134224.GA15806@nowhere> References: <20070522134224.GA15806@nowhere> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <947EA233-415A-4086-A965-76C6EF6A8830@mac.com> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Tue, 22 May 2007 14:34:02 -0400 To: Craig Boston X-Mailer: Apple Mail (2.752.3) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: GPT boot loader? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 18:34:26 -0000 On May 22, 2007, at 9:42 AM, Craig Boston wrote: > On Tue, May 22, 2007 at 09:57:34AM +0200, Ivan Voras wrote: >> and that the fields in the GPT are supposed to be disk-absolute >> (which >> is not a problem on FreeBSD but may be on other systems). > > Grrr, this is one design "feature" of BSD disklabels that I was hoping > might finally go away. But it seems the GPT designers made the same > mistake :( GPT is not designed to be a sub-partitioning scheme. It can not be used within a partition. As such, absolute block addresses are the same as relative block addresses. As such, no mistake has been made yet. FreeBSD actually creates a GPT with relative addresses, which means that if we allow it to be used to sub-partition partitions, it would not have the same problem as the BSD label. FYI, -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 18:58:52 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8ED0516A469 for ; Tue, 22 May 2007 18:58:52 +0000 (UTC) (envelope-from craig@tobuj.gank.org) Received: from ion.gank.org (ion.gank.org [69.55.238.164]) by mx1.freebsd.org (Postfix) with ESMTP id 7A90013C45E for ; Tue, 22 May 2007 18:58:50 +0000 (UTC) (envelope-from craig@tobuj.gank.org) Received: by ion.gank.org (Postfix, from userid 1001) id 2167011245; Tue, 22 May 2007 13:58:50 -0500 (CDT) Date: Tue, 22 May 2007 13:58:43 -0500 From: Craig Boston To: Marcel Moolenaar Message-ID: <20070522185843.GB15806@nowhere> Mail-Followup-To: Craig Boston , Marcel Moolenaar , freebsd-hackers@freebsd.org, Ivan Voras References: <20070522134224.GA15806@nowhere> <947EA233-415A-4086-A965-76C6EF6A8830@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <947EA233-415A-4086-A965-76C6EF6A8830@mac.com> User-Agent: Mutt/1.4.2.2i Cc: freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: GPT boot loader? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 18:58:52 -0000 On Tue, May 22, 2007 at 02:34:02PM -0400, Marcel Moolenaar wrote: > GPT is not designed to be a sub-partitioning scheme. It can not be > used within a partition. As such, absolute block addresses are the > same as relative block addresses. As such, no mistake has been made > yet. Ah, that does make sense. Does the GPT specification actually say absolute block addresses? That would seem to be redundant if the spec also forbids its use inside a partition. I can't seem to find the actual documents for GPT anywhere. > FreeBSD actually creates a GPT with relative addresses, which means > that if we allow it to be used to sub-partition partitions, it would > not have the same problem as the BSD label. I suppose we're being nonstandard either way, so I'll keep my fingers crossed that this continues to be the case :) Thanks for the clarification. Craig From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 19:14:45 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5BBA916A400 for ; Tue, 22 May 2007 19:14:45 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.173]) by mx1.freebsd.org (Postfix) with ESMTP id 4608413C44B for ; Tue, 22 May 2007 19:14:45 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (smtpin08-en2 [10.13.10.153]) by smtpout.mac.com (Xserve/smtpout03/MantshX 4.0) with ESMTP id l4MJEh0L001602; Tue, 22 May 2007 12:14:43 -0700 (PDT) Received: from [172.24.104.227] (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mac.com (Xserve/smtpin08/MantshX 4.0) with ESMTP id l4MJEDrV022462 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 22 May 2007 12:14:20 -0700 (PDT) In-Reply-To: <20070522185843.GB15806@nowhere> References: <20070522134224.GA15806@nowhere> <947EA233-415A-4086-A965-76C6EF6A8830@mac.com> <20070522185843.GB15806@nowhere> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Tue, 22 May 2007 12:14:12 -0700 To: Craig Boston X-Mailer: Apple Mail (2.752.3) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: GPT boot loader? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 19:14:45 -0000 On May 22, 2007, at 11:58 AM, Craig Boston wrote: > On Tue, May 22, 2007 at 02:34:02PM -0400, Marcel Moolenaar wrote: >> GPT is not designed to be a sub-partitioning scheme. It can not be >> used within a partition. As such, absolute block addresses are the >> same as relative block addresses. As such, no mistake has been made >> yet. > > Ah, that does make sense. Does the GPT specification actually say > absolute block addresses? No. It actually hints strongly towards relative addressing: "The EFI firmware produces a logical BLOCK_IO device for each EFI Partition Entry, El Torito logical device volume, and if no EFI Partition Table is present any partitions found in the partition tables. Logical block address zero of the BLOCK_IO device will correspond to the first logical block of the partition." ... "EFI supports the nesting of legacy MBR partitions, by allowing any legacy MBR partition to contain more legacy MBR partitions. This is accomplished by supporting the same partition discovery algorithm on every logical block device. It should be noted that the GUID Partition Table does not allow nesting of GUID Partition Table Headers. Nesting is not needed since a GUID Partition Table Header can support an arbitrary number of partitions (the addressability limits of a 64-bit LBA is the limiting factor)." So: addressing is relative by implication (i.e. by the use of logical block addresses) and the only reason GPT cannot be nested is that it's considered unnessesary. Not because GPT is not to use relative/logical block addresses. > That would seem to be redundant if the spec > also forbids its use inside a partition. I can't seem to find the > actual documents for GPT anywhere. GPT is defined in the EFI specification. Look for the EFI specification. I consider that the authoritative specification. >> FreeBSD actually creates a GPT with relative addresses, which means >> that if we allow it to be used to sub-partition partitions, it would >> not have the same problem as the BSD label. > > I suppose we're being nonstandard either way, so I'll keep my fingers > crossed that this continues to be the case :) Not is this respect. We still don't allow GPTs to be nested so the issue is moot :-) -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 20:32:25 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D4BF916A469 for ; Tue, 22 May 2007 20:32:25 +0000 (UTC) (envelope-from ap@bnc.net) Received: from bis.bonn.org (www.bis.bonn.org [217.110.117.102]) by mx1.freebsd.org (Postfix) with ESMTP id 3C40B13C465 for ; Tue, 22 May 2007 20:32:24 +0000 (UTC) (envelope-from ap@bnc.net) Received: from [194.39.192.125] (account bnc-mail@mailrelay.mailomat.net HELO bnc.net) by bis.bonn.org (CommuniGate Pro SMTP 5.1.8) with ESMTPSA id 5480800 for freebsd-hackers@freebsd.org; Tue, 22 May 2007 21:32:20 +0200 X-SpamCatcher-Score: 2 [X] Received: from [194.39.194.134] (account ap HELO [194.39.194.134]) by bnc.net (CommuniGate Pro SMTP 5.1.9) with ESMTPSA id 2781745 for freebsd-hackers@freebsd.org; Tue, 22 May 2007 21:30:47 +0200 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <4652A81B.1070301@uni-paderborn.de> References: <4652A81B.1070301@uni-paderborn.de> Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-1--308363677; protocol="application/pkcs7-signature" Message-Id: From: Achim Patzner Date: Tue, 22 May 2007 21:31:38 +0200 To: freebsd-hackers@freebsd.org X-Mailer: Apple Mail (2.752.3) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: GPT boot loader? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 20:32:25 -0000 --Apple-Mail-1--308363677 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On 22.05.2007, at 10:21, Arne Schwabe wrote: > 3. Use the GPT + MBR Format EFI Macs use. It has a normal MBR and a > GPT > and the MBR mirrors a subset of the GPT. The most challenging but > conforms with EFI/GPT Mac OS is not even using the (protected) EFI boot partition (take a look at it yourself - it's empty), keeping all the EFI stuff on the (quite a bit harder to find) Mac OS boot partition (which isusing yet another FS instead of a FAT 32 FS to make things worse). And the MBR "partitioning" is just a protection against any OS that might not understand GPT partitions and threaten to abuse the medium. It is meant to contain _one_ partition occupying the entire disk. Achim --Apple-Mail-1--308363677-- From owner-freebsd-hackers@FreeBSD.ORG Wed May 23 01:24:37 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2DDEF16A400 for ; Wed, 23 May 2007 01:24:37 +0000 (UTC) (envelope-from lstewart@room52.net) Received: from swin.edu.au (gpo5.cc.swin.edu.au [136.186.1.225]) by mx1.freebsd.org (Postfix) with ESMTP id BA89013C44B for ; Wed, 23 May 2007 01:24:36 +0000 (UTC) (envelope-from lstewart@room52.net) Received: from [136.186.229.95] (lstewart.caia.swin.edu.au [136.186.229.95]) by swin.edu.au (8.13.6.20060614/8.13.1) with ESMTP id l4N1OPpY014688; Wed, 23 May 2007 11:24:26 +1000 Message-ID: <465397FB.9080309@room52.net> Date: Wed, 23 May 2007 11:25:15 +1000 From: Lawrence Stewart User-Agent: Thunderbird 1.5.0.9 (X11/20070123) MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <4649349D.4060101@room52.net> <200705150847.38838.marc.loerner@hob.de> <46499491.2010205@room52.net> <46515DE0.20209@room52.net> <86sl9qtpd1.fsf@dwp.des.no> <4652AD8C.7000605@room52.net> <86r6p9md2n.fsf@dwp.des.no> In-Reply-To: <86r6p9md2n.fsf@dwp.des.no> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on gpo5.cc.swin.edu.au Cc: freebsd-hackers@freebsd.org Subject: Re: Writing a plain text file to disk from kernel space X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2007 01:24:37 -0000 Comments inline... Dag-Erling Smørgrav wrote: > Lawrence Stewart writes: > >> After further investigation, it turns out that the pfil input hook I'm >> using, which catches packets as they traverse up the network stack, >> has no problems, and will happily write to the file using the >> kio_write function. However, in the pfil output hook, a call to >> kio_write causes a hard reset, with the following text shown on tty0: >> >> Sleeping thread (tid 100069, pid 613) owns a non-sleepable lock >> panic: sleeping thread >> > > This is a panic, not a hard reset. > > Since you are writing kernel code, I assume you have KDB/DDB in your > kernel and know how to use it. > I don't know how to use them really. Thus far I haven't had a need for really low level debugging tools... seems that may have changed though! Any good tutorials/pointers on how to get started with kernel debugging? > >> If I comment out the kio_write code and put a printf instead, there >> are no such problems, so it seems the kio_write function is doing >> something that is upsetting the kernel, but only when called from a >> function that is acting as a pfil output hook? Strikes me as odd >> behaviour. I don't understand which thread the error is in relation >> to, why that thread is sleeping or which lock it is referring to. >> > > kio_write probably blocks waiting for the write to complete. You can't > do that while holding a non-sleepable lock. > So this is where my knowledge/understanding gets very hazy... When a thread blocks waiting for some operation to complete or event to happen, the thread effectively goes to sleep, correct? Looking at the kio_write code in subr_kernio.c, I'm guessing the lock that is causing the trouble is related to the "vn_lock" function call? I don't understand though why the vnode lock would be set up in such a way that when the write blocks whilst waiting for the underlying filesystem to signal everything is ok, it causes the kernel to panic! How do I make the lock "sleepable" or make sure the thread doesn't try go to sleep whilst holding the lock? > >> I tried wrapping the call to kio_write in a mutex, in case there was a >> race condition caused by multiple threads trying to write to the file >> at the one time, but that hasn't made a difference at all. >> > > It complains about sleeping with a non-sleepable lock held, and your > solution is to add another non-sleepable lock? > I didn't realise and don't understand why a mutex is considered a non-sleepable lock? Reading the mutex man page, it seems clear that creation of a standard mutex can indeed allow an interrupt or other kernel event to preempt the current thread holding the mutex, and therefore allow the thread to sleep whilst the higher priority event is handled? Doesn't sound like it's non-sleepable to me, but I could very well be misunderstanding the terminology. All of that aside, why don't I get a "sleeping thread" panic when only the pfil input hook is put in place? If I was getting the panic when either an input or output hook was set, I wouldn't be so perplexed. But the fact that I only see this panic behaviour when the output hook (catching packets travelling down the network stack) is installed doesn't seem to add up. Any ideas? Cheers, Lawrence From owner-freebsd-hackers@FreeBSD.ORG Wed May 23 01:41:25 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6DE316A468 for ; Wed, 23 May 2007 01:41:25 +0000 (UTC) (envelope-from dmw@unete.cl) Received: from mail02.ifxnetworks.com (mail02.ifxnetworks.com [190.61.128.12]) by mx1.freebsd.org (Postfix) with ESMTP id 467A313C457 for ; Wed, 23 May 2007 01:41:25 +0000 (UTC) (envelope-from dmw@unete.cl) Received: (qmail 17972 invoked from network); 23 May 2007 01:41:24 -0000 X-Spam-DCC: dcc1: mail02.ifxnetworks.com 1182; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail02.ifxnetworks.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=6.0 tests=none autolearn=disabled version=3.1.8 Received: from unknown (HELO quake) (dmw@unete.cl@[200.73.29.73]) (envelope-sender ) by mail02.ifxnetworks.com (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 23 May 2007 01:41:23 -0000 From: Daniel Molina Wegener Organization: DMW To: freebsd-hackers@freebsd.org Date: Tue, 22 May 2007 21:41:05 -0400 User-Agent: KMail/1.9.6 References: <200705201831.38828.dmw@unete.cl> <23B4A664-5916-47D3-8D42-282817F6CC70@FreeBSD.org> <20070522180647.GA11365@britannica.bec.de> In-Reply-To: <20070522180647.GA11365@britannica.bec.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705222141.06123.dmw@unete.cl> Cc: Joerg Sonnenberger Subject: Re: kqueue implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dmw@unete.cl List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2007 01:41:25 -0000 On Tuesday 22 May 2007 14:06:48 Joerg Sonnenberger wrote: > On Tue, May 22, 2007 at 10:04:37AM -0700, Suleiman Souhlal wrote: > > >I mean vnode events, in the manual page I see NOTE_WRITE, > > > but I need NOTE_OPEN and NOTE_READ. Is there any chance > > > to get these kind of events? > > > > They should be easy to add.. All you would need to do for > > NOTE_OPEN would be to add a vop_open_post hook to VOP_OPEN > > that calls VFS_KNOTE_LOCKED(..., NOTE_OPEN). Similarly for > > read. > > If this is done, it should be done very carefully. There are > some non-trivial security implications by this, for example > the process hiding can be at least partly circumvented by > adding a open filter on rtld or libc.so. Why?, I can't understand the point. On Linux the inotify interface does the job. Why on FreeBSD shouldn't be applicable?. > > Joerg > > [SNIP] Regards, -- .O. | Daniel Molina Wegener | C/C++ Developer ..O | dmw [at] unete [dot] cl | FOSS Coding Adict OOO | BSD & Linux User | Standards Rocks! From owner-freebsd-hackers@FreeBSD.ORG Wed May 23 01:42:55 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 78FAF16A469 for ; Wed, 23 May 2007 01:42:55 +0000 (UTC) (envelope-from dmw@unete.cl) Received: from mail09.ifxnetworks.com (mail09.ifxnetworks.com [190.61.128.19]) by mx1.freebsd.org (Postfix) with ESMTP id 188AA13C44B for ; Wed, 23 May 2007 01:42:54 +0000 (UTC) (envelope-from dmw@unete.cl) Received: (qmail 27000 invoked from network); 23 May 2007 01:42:54 -0000 X-Spam-DCC: CTc-dcc1: mail09.ifxnetworks.com 1030; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail09.ifxnetworks.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=6.0 tests=none autolearn=disabled version=3.1.8 Received: from unknown (HELO quake) (dmw@unete.cl@[200.73.29.73]) (envelope-sender ) by mail09.ifxnetworks.com (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 23 May 2007 01:42:53 -0000 From: Daniel Molina Wegener Organization: DMW To: freebsd-hackers@freebsd.org Date: Tue, 22 May 2007 21:42:36 -0400 User-Agent: KMail/1.9.6 References: <200705201831.38828.dmw@unete.cl> <200705210948.36033.dmw@unete.cl> <23B4A664-5916-47D3-8D42-282817F6CC70@FreeBSD.org> In-Reply-To: <23B4A664-5916-47D3-8D42-282817F6CC70@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705222142.36556.dmw@unete.cl> Cc: John-Mark Gurney , Suleiman Souhlal Subject: Re: kqueue implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dmw@unete.cl List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2007 01:42:55 -0000 On Tuesday 22 May 2007 13:04:37 Suleiman Souhlal wrote: > On May 21, 2007, at 6:48 AM, Daniel Molina Wegener wrote: > > On Monday 21 May 2007 03:57:58 John-Mark Gurney wrote: > >> Daniel Molina Wegener wrote this message on Sun, May 20, > >> 2007 > > > > at 18:31 -0400: > >>> I'm coding an application using the kqueue facility, > >>> but I see that I can't handle open and read events. Is > >>> planned to implement these handlings in the future?. > >>> Also, which facility can I use to handle these kind of > >>> events? > >> > >> I'm unsure what you mean by open and read events? Do you > >> mean getting an event when another process opens are file? > >> or? As for read, they work fine for sockets, as w/ > >> select, files are always ready to read even though they > >> may block to read from disk... > > > > Hello, > > > > I mean vnode events, in the manual page I see NOTE_WRITE, > > but I need NOTE_OPEN and NOTE_READ. Is there any chance to > > get these kind of events? > > They should be easy to add.. All you would need to do for > NOTE_OPEN would be to add a vop_open_post hook to VOP_OPEN > that calls VFS_KNOTE_LOCKED(..., NOTE_OPEN). Similarly for > read. > > Take a look at how, for example, NOTE_CREATE is implemented > (vop_create_post in sys/kern/vfs_subr.c) and how we add VOP > hooks (sys/kern/vnode_if.src). > > Why do you need these? I'm working on a log file monitor, with programable tasks on certain events. > > -- Suleiman > > [SNIP] Regards, -- .O. | Daniel Molina Wegener | C/C++ Developer ..O | dmw [at] unete [dot] cl | FOSS Coding Adict OOO | BSD & Linux User | Standards Rocks! From owner-freebsd-hackers@FreeBSD.ORG Wed May 23 02:23:34 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D62F716A400 for ; Wed, 23 May 2007 02:23:34 +0000 (UTC) (envelope-from lstewart@room52.net) Received: from swin.edu.au (gpo1.cc.swin.edu.au [136.186.1.221]) by mx1.freebsd.org (Postfix) with ESMTP id 6EF2213C465 for ; Wed, 23 May 2007 02:23:34 +0000 (UTC) (envelope-from lstewart@room52.net) Received: from [136.186.229.95] (lstewart.caia.swin.edu.au [136.186.229.95]) by swin.edu.au (8.13.6.20060614/8.13.1) with ESMTP id l4N2NSxT017628; Wed, 23 May 2007 12:23:28 +1000 Message-ID: <4653A5D2.4070209@room52.net> Date: Wed, 23 May 2007 12:24:18 +1000 From: Lawrence Stewart User-Agent: Thunderbird 1.5.0.9 (X11/20070123) MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <4649349D.4060101@room52.net> <200705150847.38838.marc.loerner@hob.de> <46499491.2010205@room52.net> <46515DE0.20209@room52.net> <86sl9qtpd1.fsf@dwp.des.no> <4652AD8C.7000605@room52.net> <86r6p9md2n.fsf@dwp.des.no> <465397FB.9080309@room52.net> In-Reply-To: <465397FB.9080309@room52.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on gpo1.cc.swin.edu.au Cc: freebsd-hackers@freebsd.org Subject: Re: Writing a plain text file to disk from kernel space X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2007 02:23:35 -0000 To add another interesting bit to the puzzle... if I install both input and output pfil hooks, and use ping to generate network traffic, the writing to file in both the input and output hook works perfectly as well - even at high packet rates. Here's the weird bit: the second I try and initiate a TCP connection, I get a kernel panic. So it seems that it is only when I generate TCP outbound traffic that the kernel panic happens. If I telnet to a closed port on a valid IP, I don't get a panic. If I telnet to an open port on a valid IP, it doesn't panic until I attempt to send the first bit of user data down the socket... so it seems that it's panicing on threads that are sheparding outbound TCP user data through the kernel. Outbound TCP SYN and ACK pkts used in the 3 way handshake to establish TCP connection don't cause the panic. To me, that says that there is something funky going on with the threads that TCP connections use when sending packets down through the network stack. Can anyone shed some light on why threads that handle the processing of outbound TCP packets containing user data would cause a vnode write to fail because of a sleeping thread issue? From what I can gather, there must be some difference in the way the threads are created/configured... but I have no idea where to start looking to figure out what's going on here. Cheers, Lawrence From owner-freebsd-hackers@FreeBSD.ORG Wed May 23 07:51:09 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4AF0516A41F for ; Wed, 23 May 2007 07:51:09 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 0B93413C46C for ; Wed, 23 May 2007 07:51:08 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 07D9F2084; Wed, 23 May 2007 09:51:05 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id EC2802083; Wed, 23 May 2007 09:51:04 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id CE29E5079; Wed, 23 May 2007 09:51:04 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Lawrence Stewart References: <4649349D.4060101@room52.net> <200705150847.38838.marc.loerner@hob.de> <46499491.2010205@room52.net> <46515DE0.20209@room52.net> <86sl9qtpd1.fsf@dwp.des.no> <4652AD8C.7000605@room52.net> <86r6p9md2n.fsf@dwp.des.no> <465397FB.9080309@room52.net> Date: Wed, 23 May 2007 09:51:04 +0200 Message-ID: <86odkcugev.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Writing a plain text file to disk from kernel space X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2007 07:51:09 -0000 Lawrence Stewart writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Since you are writing kernel code, I assume you have KDB/DDB in your > > kernel and know how to use it. > I don't know how to use them really. Thus far I haven't had a need for > really low level debugging tools... seems that may have changed > though! Any good tutorials/pointers on how to get started with kernel > debugging? The handbook and FAQ have information on debugging panics. Greg Lehey (grog@) does a tutorial on kernel debugging, you can probably find slides online (or just ask him) > > kio_write probably blocks waiting for the write to complete. You can't > > do that while holding a non-sleepable lock. > So this is where my knowledge/understanding gets very hazy... > > When a thread blocks waiting for some operation to complete or event > to happen, the thread effectively goes to sleep, correct? It depends on the type of lock used, but mostly, yes. > Looking at the kio_write code in subr_kernio.c, I'm guessing the lock > that is causing the trouble is related to the "vn_lock" function call? What matters is that kio_write() may sleep and therefore can't be called while holding a non-sleepable lock. > I don't understand though why the vnode lock would be set up in such a > way that when the write blocks whilst waiting for the underlying > filesystem to signal everything is ok, it causes the kernel to panic! You cannot sleep while holding a non-sleepable lock. You need to find out which locks are held at the point where you call kio_write(), and figure out a way to delay the kio_write() call until those locks are released. > How do I make the lock "sleepable" or make sure the thread doesn't try > go to sleep whilst holding the lock? You can't make an unsleepable lock sleepable. You might be able to replace it with a sleepable lock, but you would have to go through every part of the kernel that uses the lock and make sure that it works correctly with a sleepable lock. Most likely, it won't. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Wed May 23 05:10:16 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68D9216A400 for ; Wed, 23 May 2007 05:10:16 +0000 (UTC) (envelope-from jkh@brierdr.com) Received: from mail.brierdr.com (adsl-64-173-3-158.dsl.sntc01.pacbell.net [64.173.3.158]) by mx1.freebsd.org (Postfix) with ESMTP id 2890713C458 for ; Wed, 23 May 2007 05:10:16 +0000 (UTC) (envelope-from jkh@brierdr.com) Received: from localhost (localhost [127.0.0.1]) by mail.brierdr.com (Postfix) with ESMTP id E1178869EBA; Tue, 22 May 2007 21:52:28 -0700 (PDT) Received: from mail.brierdr.com ([127.0.0.1]) by localhost (mini-gw [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28915-10; Tue, 22 May 2007 21:52:28 -0700 (PDT) Received: from [10.0.1.200] (jkh99.queasyweasel.com [64.173.15.99]) by mail.brierdr.com (Postfix) with ESMTP id D9EE7869EAD; Tue, 22 May 2007 21:52:27 -0700 (PDT) Message-Id: <6A27EDCF-EDBE-439D-B729-F6A9DC351373@brierdr.com> From: "Jordan K. Hubbard" To: Garrett Cooper In-Reply-To: <4643E10A.5030104@u.washington.edu> Mime-Version: 1.0 (Apple Message framework v885) Date: Tue, 22 May 2007 21:52:26 -0700 References: <200705102105.27271.blackdragon@highveldmail.co.za> <4643E10A.5030104@u.washington.edu> X-Mailer: Apple Mail (2.885) X-Mailman-Approved-At: Wed, 23 May 2007 11:49:32 +0000 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: jkh@freebsd.org, David Naylor , freebsd-hackers@freebsd.org Subject: Re: New FreeBSD package system (a.k.a. Daemon Package System (dps)) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2007 05:10:16 -0000 On May 10, 2007, at 8:20 PM, Garrett Cooper wrote: > Yipes. The name of the game is to get something working in the base > system, instead of dragging in multiple 3rd party packages, with > licensing schemes that may not be aligned with the BSD license. > > SQL's great, SQL's wonderful for db use, but the problem is that > supporting it from my POV would cause a lot more grief and waiting > than having me wait a few months to get a BDB compatible scheme out > the door. One of the issues here, however, is the fact that BDB is basically just a key/value database (and all the really robust versions from Sleepycat have licensing problems of their own). SQLite has an extremely liberal license and quite a bit of power besides (and Apple has contributed a considerable number of robustness-increasing fixes to it given that it's our embedded database of choice for quite a few applications). I wouldn't get too hung up on the database part of this in any case - packaging systems are difficult to create due to the fact that they're so broad, not because they're deep. There are a huge number of issues to resolve regarding upgrades, dependency tracking (which mutates somewhat in each of the install/delete/upgrade scenarios) and package creation and husbandry in general. - Jordan From owner-freebsd-hackers@FreeBSD.ORG Thu May 24 09:53:18 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 895C116A41F for ; Thu, 24 May 2007 09:53:18 +0000 (UTC) (envelope-from mohacsi@niif.hu) Received: from mail.ki.iif.hu (mail.ki.iif.hu [193.6.222.241]) by mx1.freebsd.org (Postfix) with ESMTP id 4AE4613C43E for ; Thu, 24 May 2007 09:53:18 +0000 (UTC) (envelope-from mohacsi@niif.hu) Received: by mail.ki.iif.hu (Postfix, from userid 1003) id 104BD5654; Thu, 24 May 2007 11:53:17 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.ki.iif.hu (Postfix) with ESMTP id 0E6715650; Thu, 24 May 2007 11:53:17 +0200 (CEST) Date: Thu, 24 May 2007 11:53:17 +0200 (CEST) From: Mohacsi Janos X-X-Sender: mohacsi@mignon.ki.iif.hu To: freebsd-hackers@freebsd.org Message-ID: <20070524112217.N166@mignon.ki.iif.hu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: bushman@rsu.ru Subject: nss_ldap without nscd or cached ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2007 09:53:18 -0000 Dear All, I think there is a some architectural issues with the current implementation of nsswitch or nsdispatch(3). Let's assume you want to authenticate against an LDAP database. You will install nss_ldap from port. You configure nss_ldap.conf with binddn and its bindpw. Here comes the problem: 1. If permission of nss_ldap.conf is 0400 since it contains the clear text password of the binddn, then an ordinary user cannot bind to the database and cannot get UID->name information from LDAP database. See output: mohacsi@mignon> ls -l /home total 6 drwxr-xr-x 3 9027 wheel 512 May 23 17:57 user1 drwxrwxr-x 3 root 9030 512 May 23 15:14 documents drwxr-xr-x 2 9013 9013 512 May 23 15:13 user2 .... This does not pose problem for programs with root credentials since they can access to LDAP database since they can fetch the password... 2. If you set the permission of nss_ldap.conf to 0444 then, you can access to the LDAP UID database: mohacsi@mignon> ls -l /home total 6 drwxr-xr-x 3 user1 wheel 512 May 23 17:57 user1 drwxrwxr-x 3 root docs 512 May 23 15:14 documents drwxr-xr-x 2 user2 user2 512 May 23 15:13 user2 .... However it can generate some security problems since everybody can access to bindpw and potentially the whole LDAP database. I think some kind of solution would be to use nscd or cached (from FreeBSD 7.0) since nscd/cached could be run with root credential (and use 0400) of nss_ldap.conf. And normal users would access via nsdispatch(3) with their own credential. Other solution(?) would be to limit binddn access to read-only (also limiting access only few attributes in LDAP) then exposing the bindpw would not create big problem. However maintenance of LDAP ACI-s could be difficult: nss_ldap attribute mapping and attribute usage should be documented.... Do you think that cached(8) can be MFC-ed to RELENG_6 from current? Any alternative solution? Maybe in the ports tree? Janos Mohacsi Network Engineer, Research Associate, Head of Network Planning and Projects NIIF/HUNGARNET, HUNGARY Key 70EF9882: DEC2 C685 1ED4 C95A 145F 4300 6F64 7B00 70EF 9882 From owner-freebsd-hackers@FreeBSD.ORG Thu May 24 10:32:40 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 60C3916A469 for ; Thu, 24 May 2007 10:32:40 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from mail.r61.net (mail.r61.net [195.208.245.249]) by mx1.freebsd.org (Postfix) with ESMTP id B24D213C4AE for ; Thu, 24 May 2007 10:32:39 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from [192.168.101.1] (shogun.cc.rsu.ru [195.208.252.84]) (authenticated bits=0) by mail.r61.net (8.14.1/8.14.1) with ESMTP id l4OAJO0R007560 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 24 May 2007 14:19:24 +0400 (MSD) (envelope-from bushman@freebsd.org) Message-ID: <465566A9.7040507@freebsd.org> Date: Thu, 24 May 2007 14:19:21 +0400 From: Michael Bushkov User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Mohacsi Janos References: <20070524112217.N166@mignon.ki.iif.hu> In-Reply-To: <20070524112217.N166@mignon.ki.iif.hu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: nss_ldap without nscd or cached ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2007 10:32:40 -0000 Hello Mohacsi, > Dear All, > I think there is a some architectural issues with the current > implementation of nsswitch or nsdispatch(3). > Let's assume you want to authenticate against an LDAP database. You will > install nss_ldap from port. You configure nss_ldap.conf with binddn and > its bindpw. Here comes the problem: > > 1. If permission of nss_ldap.conf is 0400 since it contains the clear > text password of the binddn, then an ordinary user cannot bind to the > database and cannot get UID->name information from LDAP database. See > output: > > > mohacsi@mignon> ls -l /home > total 6 > drwxr-xr-x 3 9027 wheel 512 May 23 17:57 user1 > drwxrwxr-x 3 root 9030 512 May 23 15:14 documents > drwxr-xr-x 2 9013 9013 512 May 23 15:13 user2 > .... > > This does not pose problem for programs with root credentials since they > can access to LDAP database since they can fetch the password... > > 2. If you set the permission of nss_ldap.conf to 0444 then, you can access > to the LDAP UID database: > mohacsi@mignon> ls -l /home > total 6 > drwxr-xr-x 3 user1 wheel 512 May 23 17:57 user1 > drwxrwxr-x 3 root docs 512 May 23 15:14 documents > drwxr-xr-x 2 user2 user2 512 May 23 15:13 user2 > .... > > However it can generate some security problems since everybody can > access to bindpw and potentially the whole LDAP database. The problem, that you've described seems to be typical for nss_ldap users. > > > I think some kind of solution would be to use nscd or cached (from > FreeBSD 7.0) since nscd/cached could be run with root credential (and > use 0400) of nss_ldap.conf. And normal users would access via > nsdispatch(3) with their own credential. Yes - this is a solution. > > > Other solution(?) would be to limit binddn access to read-only (also > limiting access only few attributes in LDAP) then exposing the bindpw > would not create big problem. However maintenance of LDAP ACI-s could be > difficult: nss_ldap attribute mapping and attribute usage should be > documented.... I think, that limiting binddn access to readonly is the best practice whether you use nscd/cached or not. BTW, what kind of documentation do you need? I can possibly provide the necessary information. > > Do you think that cached(8) can be MFC-ed to RELENG_6 from current? Any > alternative solution? Maybe in the ports tree? The thing is cached(8) requires a lot of changes to libc to be made. So the ports tree is not the solution here. This is also a reason why it's MFCing to RELENG_6 is questionable. There is a lookupd (sysutils/lookupd) daemon in ports, which can be plugged into existing nsswitch implementation and function similar to cached/nscd - but it's quite out of date. > > Janos Mohacsi > Network Engineer, Research Associate, Head of Network Planning and Projects > NIIF/HUNGARNET, HUNGARY > Key 70EF9882: DEC2 C685 1ED4 C95A 145F 4300 6F64 7B00 70EF 9882 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- With best regards, Michael Bushkov Southern Federal University From owner-freebsd-hackers@FreeBSD.ORG Thu May 24 15:01:02 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A00CC16A400 for ; Thu, 24 May 2007 15:01:02 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 5646813C4B0 for ; Thu, 24 May 2007 15:00:52 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.1/8.13.8) id l4OF0jCg098402; Thu, 24 May 2007 10:00:45 -0500 (CDT) (envelope-from dan) Date: Thu, 24 May 2007 10:00:45 -0500 From: Dan Nelson To: Mohacsi Janos Message-ID: <20070524150045.GI98411@dan.emsphone.com> References: <20070524112217.N166@mignon.ki.iif.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070524112217.N166@mignon.ki.iif.hu> X-OS: FreeBSD 6.2-STABLE User-Agent: Mutt/1.5.15 (2007-04-06) Cc: freebsd-hackers@freebsd.org, bushman@rsu.ru Subject: Re: nss_ldap without nscd or cached ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2007 15:01:02 -0000 In the last episode (May 24), Mohacsi Janos said: > I think there is a some architectural issues with the current > implementation of nsswitch or nsdispatch(3). Let's assume you want > to authenticate against an LDAP database. You will install nss_ldap > from port. You configure nss_ldap.conf with binddn and its bindpw. > Here comes the problem: > > 1. If permission of nss_ldap.conf is 0400 since it contains the > clear text password of the binddn, then an ordinary user cannot bind > to the database and cannot get UID->name information from LDAP > database. See output: > > mohacsi@mignon> ls -l /home > total 6 > drwxr-xr-x 3 9027 wheel 512 May 23 17:57 user1 > drwxrwxr-x 3 root 9030 512 May 23 15:14 documents > drwxr-xr-x 2 9013 9013 512 May 23 15:13 user2 > .... You should be able to grant the anonymous user read access to user/group names and group membership attributes. That way you can do simple things like name->uid lookups without having to bind at all. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Thu May 24 15:48:34 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38D0216A41F for ; Thu, 24 May 2007 15:48:34 +0000 (UTC) (envelope-from mohacsi@niif.hu) Received: from mail.ki.iif.hu (mail.ki.iif.hu [193.6.222.241]) by mx1.freebsd.org (Postfix) with ESMTP id EBB8313C45E for ; Thu, 24 May 2007 15:48:31 +0000 (UTC) (envelope-from mohacsi@niif.hu) Received: by mail.ki.iif.hu (Postfix, from userid 1003) id 5A6975659; Thu, 24 May 2007 17:48:30 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.ki.iif.hu (Postfix) with ESMTP id 584365656; Thu, 24 May 2007 17:48:30 +0200 (CEST) Date: Thu, 24 May 2007 17:48:30 +0200 (CEST) From: Mohacsi Janos X-X-Sender: mohacsi@mignon.ki.iif.hu To: Michael Bushkov In-Reply-To: <465566A9.7040507@freebsd.org> Message-ID: <20070524174123.S19560@mignon.ki.iif.hu> References: <20070524112217.N166@mignon.ki.iif.hu> <465566A9.7040507@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: nss_ldap without nscd or cached ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2007 15:48:34 -0000 Hi Michael, On Thu, 24 May 2007, Michael Bushkov wrote: > Hello Mohacsi, > >> >> Other solution(?) would be to limit binddn access to read-only (also >> limiting access only few attributes in LDAP) then exposing the bindpw would >> not create big problem. However maintenance of LDAP ACI-s could be >> difficult: nss_ldap attribute mapping and attribute usage should be >> documented.... > > I think, that limiting binddn access to readonly is the best practice whether > you use nscd/cached or not. BTW, what kind of documentation do you need? I > can possibly provide the necessary information. I am curious only which ldap attributes will be used.... I would give access only those attributes in our LDAP servers which is necessary.... Thanks for your answer. Regards, Janos Mohacsi Network Engineer, Research Associate, Head of Network Planning and Projects NIIF/HUNGARNET, HUNGARY Key 70EF9882: DEC2 C685 1ED4 C95A 145F 4300 6F64 7B00 70EF 9882 From owner-freebsd-hackers@FreeBSD.ORG Thu May 24 23:39:06 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7732416A41F for ; Thu, 24 May 2007 23:39:06 +0000 (UTC) (envelope-from david@functionalchaos.net) Received: from mrelay-v1.mesd.k12.or.us (mrelay-v1.mesd.k12.or.us [198.236.68.98]) by mx1.freebsd.org (Postfix) with ESMTP id 5424013C43E for ; Thu, 24 May 2007 23:39:06 +0000 (UTC) (envelope-from david@functionalchaos.net) Received: from localhost (localhost [127.0.0.1]) by mrelay-v1.mesd.k12.or.us (Postfix) with ESMTP id EEDDA3C623C for ; Thu, 24 May 2007 16:39:05 -0700 (PDT) X-Virus-Scanned: by amavisd-new at mesd.k12.or.us Received: from mrelay-v1.mesd.k12.or.us ([127.0.0.1]) by localhost (mrelay-v1.mesd.k12.or.us [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mS8ZzM+iJV9H for ; Thu, 24 May 2007 16:39:05 -0700 (PDT) Received: from mail.mesd.k12.or.us (mail-x.mesd.k12.or.us [198.236.66.2]) by mrelay-v1.mesd.k12.or.us (Postfix) with ESMTP id 22F593C61CF for ; Thu, 24 May 2007 16:39:05 -0700 (PDT) Received: from [198.236.66.125] (dcramblett.mesd.k12.or.us [198.236.66.125]) by mail.mesd.k12.or.us (Postfix) with ESMTP id 108933F426A for ; Thu, 24 May 2007 16:39:05 -0700 (PDT) Message-ID: <46562218.7030703@functionalchaos.net> Date: Thu, 24 May 2007 16:39:04 -0700 From: David Cramblett User-Agent: Thunderbird 1.5.0.10 (X11/20070302) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4640EAD0.3020502@mesd.k12.or.us> <4647D88D.5060404@functionalchaos.net> In-Reply-To: <4647D88D.5060404@functionalchaos.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: System Drops to manual mount root prompt after HDD duplication X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2007 23:39:06 -0000 I was able to resolve this issue. Another sys-admin pointed out that my boot0cfg had the disk setup in CHS apposed to LBA. See below: |[root@www root]# boot0cfg -v ad0 |# flag start chs type end chs offset size |1 0x80 0: 1: 1 0xa5 1023:254:63 63 586067202 | |version=1.0 drive=0x80 mask=0xf ticks=182 |options=nopacket,update,nosetdrv |default_selection=F1 (Slice 1) That's a problem all right: "options=nopacket" means CHS mode. I checked th BIOS which indeed had the drive in CHS mode. I changed it to LBA as well as updated the boot0cfg: #boot0cfg -o packet ad0s1 However I still was dropped into the manual mount root prompt. While I was inspecting the BIOS I noticed that it could not see any drive larger than 130GB and the BIOS was detecting my drive as such. I moved the drive into a different machine and the problem was gone. David David Cramblett wrote: > My FreeBSD 5.2.1 server had a 4.5 GB HDD. I decided to upgrade it with > a larger drive. I installed a new drive on the second IDE channel which > made it ad2, of course, my original drive was ad0. I created a > partition, boot loader and matching slices on the new drive. Then I > copied the old drive to the new drive using tar. Once finished, I > removed the original drive and installed the new one on the primary > channel. When I booted up everything appeared normal, but when the > system starts to mount "/" it gives no error or warning and just drops > to a "Manual mount root specification" prompt. If I type "ufs:ad0s1a" > it boots up and everything is perfect. This is the same slice "/" was > on the old drive as well. > > > I have tried the following with no success: > > Checked /etc/fstab > > boot0cfg -v -B ad0 > > bsdlabel -B ad0s1 > > tried booting from a cd, going into post install config, fdisk, and set > the partition as bootable, it already was. > > Since upgrading the hard disk, I have upgraded the system to 5.5 and > then to 6.2. This system has been working great for over a week now, > just have this boot problem. > > > -------------- > > Here is my fstab: > > /dev/ad0s1b none swap sw 0 0 > /dev/ad0s1a / ufs rw 1 1 > > -------------- > > Output from bsdlabel > # bsdlabel ad0s1 > > # /dev/ad0s1: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 585018626 1048576 4.2BSD 2048 16384 28552 > b: 1048576 0 swap > c: 586067202 0 unused 0 0 # "raw" part, > don't edit > > > -------------- > > Output from boot0cfg > # boot0cfg -v ad0 > # flag start chs type end chs offset size > 1 0x80 0: 1: 1 0xa5 1023:254:63 63 586067202 > > version=1.0 drive=0x80 mask=0xf ticks=182 > options=nopacket,update,nosetdrv > default_selection=F1 (Slice 1) > > > > Thanks, > > David > From owner-freebsd-hackers@FreeBSD.ORG Thu May 24 23:39:21 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E573B16A41F; Thu, 24 May 2007 23:39:20 +0000 (UTC) (envelope-from karma@FreeBSD.org) Received: from pier.botik.ru (pier.botik.ru [193.232.174.1]) by mx1.freebsd.org (Postfix) with ESMTP id 6326C13C46C; Thu, 24 May 2007 23:39:20 +0000 (UTC) (envelope-from karma@FreeBSD.org) Received: from ez.pereslavl.ru ([192.168.56.29]:49528 helo=almond) by pier.botik.ru with esmtp (Exim 4.50) id 1HrMdT-0002W5-Q1; Fri, 25 May 2007 03:22:29 +0400 Received: from brig2-slavich-priv.botik.ru ([192.168.0.2]) by almond with esmtp (Exim 4.50) id 1HrMbk-00050I-VK; Fri, 25 May 2007 03:20:36 +0400 From: Alexey Mikhailov To: karma@ez.pereslavl.ru, freebsd-hackers@freebsd.org, trustedbsd-audit@freebsd.org, trustedbsd-discuss@freebsd.org Date: Fri, 25 May 2007 03:22:21 +0400 User-Agent: KMail/1.9.6 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705250322.22259.karma@FreeBSD.org> Cc: Subject: SoC: Distributed Audit Daemon project X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: karma@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2007 23:39:21 -0000 Hello! I'm the SoC student who will work on "Distributed Audit Daemon" project this summer. It was some discussion between me, my mentor Bjoern Zeeb and Robert Watson about design of this project. In this message I want to describe preliminary version of design we're likely to have. Your criticism and comments are very welcome! Some general theses first. 1. What this project is about? The general idea is to make it possible to log auditable events to remote hosts by secure network transport. Some basic association is daemon that acts as the server which receives BSM messages and writes them out to local filesystem. and acts as client which send BSM messages out. My initial proposal on this project can be found here: http://wiki.freebsd.org/DistributedAuditDaemon 2. As I said before initial subject of this project was "Distributed audit daemon". But after some discussions we had decided that this project can be done in more general maner. We can perform distributed logging for any user-space app. At this rate we need to get clean and general design with good level of abstraction. It seems that "Distributed logging daemon" is the good name for this project. (I will refer as "dlogd" to it) Consider this picture ( Yes, I know that my ASCII art sucks :-) ) '----------------` '-----------------` | | '---------` | Client-specific | | User-space app | <== | API [2] | ==> | part of | | [1] | `---------' | "dlogd" [3] | `----------------' `-----------------' ^^ || || (network level) [4] || || vv '-----------------` '===============` | Server-specific | | File system | <======== | part of | | hierarchy [6] | | "dlogd" [5] | `===============' `-----------------' Now I'll describe processes that will take place according to this scheme. [1] <=> [2]: Shared user-space library will incapsulate API. And I really want to keep real API simple. At this moment I'm going to have only one function that will mark log file as "to deliver" (i.e. dlogd_submit("/var/audit/whatever")). [2] <=> [3]: IPC will be UNIX domain sockets (PF_LOCAL). Authentication scheme for this is: (1) Authenticate [3] to [2]. This is reasonably authenticated by using a trusted name for the local socket, such as /var/dlogd/socket. Only a process authorized to act as the daemon will be able to create the socket. (2) Authenticate [2] to [3]. With UNIX domain sockets, a credential can be passed on connection, which we should do. When [3] receives file name logX, it makes symbolic link (it could be hard to preserve deletion but there're some issues with it) from logX to /var/dlogd/spool/audit/logX. Every T seconds [3] pushes spool out to [4] and logs succesful transactions. We can have some policies here, e.g. * Transaction fails: if (current_time - log file timestamp) > T_1 then remove log file from spool and log it * Transaction success: schedule log file removing for T_2 period [3] <=> [4]: At the network level we're going to use SSL certificates for authentication. [4] <=> [5]: We peform certification-based authentication here. And good point is to use administrator-assigned names here based on it. (if those corresponds to hostname or IP addresses -- that's fine) [5] <=> [6]: If authentication went OK we receive log file and log it to physical filesystem considering client name that we would get at previous step. Open questions: 1) Do we need some non-trivial network protocol in [3] <=> [5] communication or we can just send log file content preceded by size and name? (For example, server can ask client for missing log files, or send message that it's alive again after some crash or something) 2) Do we need some non-trivial API that I mentioned in [1] <=> [2] step? Non-trivial API could be something like dlogd_flush("/var/audit"); /* Notify of fresh start. */ dlogd_created("/var/audit/whatever"); /* Notify of creation. */ dlogd_submit("/var/audit/whatever"); /* Notify of termination. */ From owner-freebsd-hackers@FreeBSD.ORG Fri May 25 03:26:12 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A9D6316A421 for ; Fri, 25 May 2007 03:26:12 +0000 (UTC) (envelope-from lstewart@room52.net) Received: from swin.edu.au (gpo3.cc.swin.edu.au [136.186.1.223]) by mx1.freebsd.org (Postfix) with ESMTP id 3C41313C465 for ; Fri, 25 May 2007 03:26:11 +0000 (UTC) (envelope-from lstewart@room52.net) Received: from [136.186.229.95] (lstewart.caia.swin.edu.au [136.186.229.95]) by swin.edu.au (8.13.6.20060614/8.13.1) with ESMTP id l4P3Q2jP007737; Fri, 25 May 2007 13:26:03 +1000 Message-ID: <46565781.2030407@room52.net> Date: Fri, 25 May 2007 13:26:58 +1000 From: Lawrence Stewart User-Agent: Thunderbird 1.5.0.9 (X11/20070123) MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <4649349D.4060101@room52.net> <200705150847.38838.marc.loerner@hob.de> <46499491.2010205@room52.net> <46515DE0.20209@room52.net> <86sl9qtpd1.fsf@dwp.des.no> <4652AD8C.7000605@room52.net> <86r6p9md2n.fsf@dwp.des.no> <465397FB.9080309@room52.net> <86odkcugev.fsf@dwp.des.no> In-Reply-To: <86odkcugev.fsf@dwp.des.no> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on gpo3.cc.swin.edu.au Cc: freebsd-hackers@freebsd.org Subject: Re: Writing a plain text file to disk from kernel space X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2007 03:26:12 -0000 Comments inline... Dag-Erling Smørgrav wrote: > Lawrence Stewart writes: > >> Dag-Erling Smørgrav writes: >> >>> Since you are writing kernel code, I assume you have KDB/DDB in your >>> kernel and know how to use it. >>> >> I don't know how to use them really. Thus far I haven't had a need for >> really low level debugging tools... seems that may have changed >> though! Any good tutorials/pointers on how to get started with kernel >> debugging? >> > > The handbook and FAQ have information on debugging panics. Greg Lehey > (grog@) does a tutorial on kernel debugging, you can probably find > slides online (or just ask him) > For reference, I found what looks to be a very comprehensive kernel debugging reference here: http://www.lemis.com/grog/Papers/Debug-tutorial/tutorial.pdf Greg certainly knows the ins and outs of kernel debugging! > >>> kio_write probably blocks waiting for the write to complete. You can't >>> do that while holding a non-sleepable lock. >>> >> So this is where my knowledge/understanding gets very hazy... >> >> When a thread blocks waiting for some operation to complete or event >> to happen, the thread effectively goes to sleep, correct? >> > > It depends on the type of lock used, but mostly, yes. > > >> Looking at the kio_write code in subr_kernio.c, I'm guessing the lock >> that is causing the trouble is related to the "vn_lock" function call? >> > > What matters is that kio_write() may sleep and therefore can't be called > while holding a non-sleepable lock. > > >> I don't understand though why the vnode lock would be set up in such a >> way that when the write blocks whilst waiting for the underlying >> filesystem to signal everything is ok, it causes the kernel to panic! >> > > You cannot sleep while holding a non-sleepable lock. You need to find > out which locks are held at the point where you call kio_write(), and > figure out a way to delay the kio_write() call until those locks are > released. > > >> How do I make the lock "sleepable" or make sure the thread doesn't try >> go to sleep whilst holding the lock? >> > > You can't make an unsleepable lock sleepable. You might be able to > replace it with a sleepable lock, but you would have to go through every > part of the kernel that uses the lock and make sure that it works > correctly with a sleepable lock. Most likely, it won't. > > Thanks for the explanations. I'm starting to get a better picture of what's actually going on. So it seems that there is no way I can call kio_write from within the function that is acting as a pfil output hook, because it blocks at some point whilst doing the disk write, which makes the kernel unhappy because pfil code is holding a non-sleepable mutex somewhere. If you read my other message from yesterday, I still can't figure out why this only happens with outbound TCP traffic, but anyways... I'll have a bit more of a think about it and get back to the list shortly... Cheers, Lawrence From owner-freebsd-hackers@FreeBSD.ORG Fri May 25 08:41:33 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8301616A400 for ; Fri, 25 May 2007 08:41:33 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.181]) by mx1.freebsd.org (Postfix) with ESMTP id 44D1013C46C for ; Fri, 25 May 2007 08:41:33 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: by py-out-1112.google.com with SMTP id a29so1328585pyi for ; Fri, 25 May 2007 01:41:32 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:date:to:subject:message-id:mime-version:content-type:content-disposition:user-agent:organization:x-operation-sytem:from; b=sT6zu1EMjYTBcCVegY2Mm43wlkvzD57Y73jVT6jsi6/h2u2dfB8iiDVT0LT4CHhw2krdTqk8/oAx8lUDqW9atRXFz8B8Q4meYx26qNnAa3rrb9SMQEtzzOr6HyJmKDBXdHIQz2ubJdEhx9zp/fYCsAgkPIKwP9NzOHzwipiIa1E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:to:subject:message-id:mime-version:content-type:content-disposition:user-agent:organization:x-operation-sytem:from; b=MaTgdUVWctX9QRwXyF9pmQ4VP+XG4KYLcyioRrFSYLerP9Mfa4PQ2+khiNp9faL7NKe3+ivZ4FBDo0cMsxLAi5901i5RzwszoQLSMzakaPKPdNthDublBqiTGsr3O8PGl42sywvWFOLjdW27386vi2zXOBhZqBkIszgem6zkvOo= Received: by 10.35.52.18 with SMTP id e18mr4797807pyk.1180080871970; Fri, 25 May 2007 01:14:31 -0700 (PDT) Received: from bsd.dev1.cdnetworks.co.kr ( [211.53.35.67]) by mx.google.com with ESMTP id v55sm5193361pyh.2007.05.25.01.14.30; Fri, 25 May 2007 01:14:31 -0700 (PDT) Received: by bsd.dev1.cdnetworks.co.kr (sSMTP sendmail emulation); Fri, 25 May 2007 17:14:43 +0900 Date: Fri, 25 May 2007 17:14:42 +0900 To: freebsd-hackers@freebsd.org Message-ID: <20070525081442.GA10738@bsd.dev1.cdnetworks.co.kr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Organization: CDNetworks. X-Operation-Sytem: FreeBSD From: Weongyo Jeong Subject: A sendfile(2) extension module. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2007 08:41:33 -0000 Hello. I have written a simple sendfile(2) extension module which supports a transfer from a stream socket to a stream socket. For details, you can check the below URL: http://weongyo.org/project/freebsd/sendsock/ I don't know that it is useful but I think that it is helpful when you have a plan to make a proxy. From owner-freebsd-hackers@FreeBSD.ORG Fri May 25 09:23:20 2007 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C14916A421; Fri, 25 May 2007 09:23:20 +0000 (UTC) (envelope-from Martin.Englund@Sun.COM) Received: from gmp-ea-fw-1.sun.com (gmp-ea-fw-1.sun.com [192.18.1.36]) by mx1.freebsd.org (Postfix) with ESMTP id 83B8D13C44C; Fri, 25 May 2007 09:23:19 +0000 (UTC) (envelope-from Martin.Englund@Sun.COM) Received: from d1-emea-10.sun.com (d1-emea-10.sun.com [192.18.2.120]) by gmp-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l4P8HG16023500; Fri, 25 May 2007 08:17:16 GMT Received: from conversion-daemon.d1-emea-10.sun.com by d1-emea-10.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0JIL00H0187YDY00@d1-emea-10.sun.com> (original mail from Martin.Englund@Sun.COM); Fri, 25 May 2007 09:17:16 +0100 (BST) Received: from [192.168.10.111] ([81.227.51.162]) by d1-emea-10.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0JIL001UT8CPEVHB@d1-emea-10.sun.com>; Fri, 25 May 2007 09:17:16 +0100 (BST) Date: Fri, 25 May 2007 10:16:50 +0200 From: Martin Englund In-reply-to: <200705250322.22259.karma@FreeBSD.org> Sender: Martin.Englund@Sun.COM To: karma@FreeBSD.org, Tomas Zeman Message-id: <3F513D30-D359-46E5-B23E-55A02D9DF70E@sun.com> MIME-version: 1.0 X-Mailer: Apple Mail (2.752.3) Content-type: text/plain; format=flowed; delsp=yes; charset=US-ASCII Content-transfer-encoding: 7BIT References: <200705250322.22259.karma@FreeBSD.org> X-Mailman-Approved-At: Fri, 25 May 2007 11:28:42 +0000 Cc: freebsd-hackers@FreeBSD.org, trustedbsd-audit@FreeBSD.org, audit-discuss@opensolaris.org, trustedbsd-discuss@FreeBSD.org, karma@ez.pereslavl.ru Subject: Re: SoC: Distributed Audit Daemon project X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2007 09:23:20 -0000 Hi Alexey! I think your project would be beneficial to both FreeBSD & OpenSolaris. Tomas Zeman is working on a similar thing for OpenSolaris, and I think it would be very good if you could use the distributed audit daemon to gather audit trails from both operating systems! On May 25, 2007, at 01:22 , Alexey Mikhailov wrote: > I'm the SoC student who will work on "Distributed Audit Daemon" > project this summer. It was some discussion between me, my mentor > Bjoern Zeeb and Robert Watson about design of > this project. In this message I want to describe preliminary version > of design we're likely to have. Your criticism and comments are > very welcome! > > Some general theses first. > > 1. What this project is about? > > The general idea is to make it possible to log auditable events > to remote hosts by secure network transport. Some basic association > is daemon that acts as the server which receives BSM messages and > writes them out to local filesystem. and acts as client which > send BSM messages out. > > My initial proposal on this project can be found here: > > http://wiki.freebsd.org/DistributedAuditDaemon > > 2. As I said before initial subject of this project was "Distributed > audit daemon". But after some discussions we had decided that this > project can be done in more general maner. We can perform distributed > logging for any user-space app. At this rate we need to get clean > and general design with good level of abstraction. It seems that > "Distributed logging daemon" is the good name for this project. > (I will refer as "dlogd" to it) > > Consider this picture ( Yes, I know that my ASCII art sucks :-) ) > > '----------------` '-----------------` > | | '---------` | Client-specific | > | User-space app | <== | API [2] | ==> | part of | > | [1] | `---------' | "dlogd" [3] | > `----------------' `-----------------' > ^^ > || > || > > (network level) [4] > > || > || > vv > '-----------------` > '===============` | Server-specific | > | File system | <======== | part of | > | hierarchy [6] | | "dlogd" [5] | > `===============' `-----------------' > > Now I'll describe processes that will take place according to > this scheme. > > [1] <=> [2]: Shared user-space library will incapsulate API. > And I really want to keep real API simple. At this moment > I'm going to have only one function that will mark log file > as "to deliver" (i.e. dlogd_submit("/var/audit/whatever")). > > [2] <=> [3]: IPC will be UNIX domain sockets (PF_LOCAL). > > Authentication scheme for this is: > > (1) Authenticate [3] to [2]. This is reasonably authenticated > by using a trusted name for the local socket, such as > /var/dlogd/socket. Only a process authorized to act as the daemon > will be able to create the socket. > > (2) Authenticate [2] to [3]. With UNIX domain sockets, a credential > can be passed on connection, which we should do. > > When [3] receives file name logX, it makes symbolic link (it could > be hard to preserve deletion but there're some issues with it) from > logX to /var/dlogd/spool/audit/logX. Every T seconds [3] pushes > spool out to [4] and logs succesful transactions. We can have some > policies here, e.g. > > * Transaction fails: if (current_time - log file timestamp) > T_1 > then remove log file from spool and log it > > * Transaction success: schedule log file removing for T_2 period > > [3] <=> [4]: At the network level we're going to use SSL certificates > for authentication. > > [4] <=> [5]: We peform certification-based authentication here. And > good point is to use administrator-assigned names here based on it. > (if those corresponds to hostname or IP addresses -- that's fine) > > [5] <=> [6]: If authentication went OK we receive log file and log > it to physical filesystem considering client name that we would get > at previous step. > > Open questions: > > 1) Do we need some non-trivial network protocol in [3] <=> [5] > communication or we can just send log file content preceded by > size and name? (For example, server can ask client for missing log > files, or send message that it's alive again after some crash or > something) > > 2) Do we need some non-trivial API that I mentioned in [1] <=> [2] > step? Non-trivial API could be something like > > dlogd_flush("/var/audit"); /* Notify of fresh start. */ > dlogd_created("/var/audit/whatever"); /* Notify of creation. */ > dlogd_submit("/var/audit/whatever"); /* Notify of termination. */ > > _______________________________________________ > trustedbsd-discuss@FreeBSD.org mailing list > http://lists.freebsd.org/mailman/listinfo/trustedbsd-discuss > To unsubscribe, send any mail to "trustedbsd-discuss- > unsubscribe@FreeBSD.org" cheers, /Martin -- Martin Englund, Java Security Engineer, Java SE, Sun Microsystems Inc. Email: martin.englund@sun.com Time Zone: GMT+2 PGP: 1024D/AA514677 "The question is not if you are paranoid, it is if you are paranoid enough." From owner-freebsd-hackers@FreeBSD.ORG Fri May 25 18:03:06 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B786716A41F for ; Fri, 25 May 2007 18:03:06 +0000 (UTC) (envelope-from fetrovsky@yahoo.com) Received: from web53904.mail.re2.yahoo.com (web53904.mail.re2.yahoo.com [206.190.36.214]) by mx1.freebsd.org (Postfix) with SMTP id 6B86813C48A for ; Fri, 25 May 2007 18:03:06 +0000 (UTC) (envelope-from fetrovsky@yahoo.com) Received: (qmail 33456 invoked by uid 60001); 25 May 2007 17:36:24 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=SQKR1+ksbz6YvFfPBCpkZlVZSTC4a5UgmEgxoZvXP3BJ538RlabA7A46QB3UMokTQ/e2S/2HEpiAVU1F+FfdKJ3KlA9MTDCl1uh7qTYu6evwedYz70A3aqWWPlR8imx36EGurKU1NoTaLN3UuR0DqTqGNrka9DPaW55u7AP1w4U=; X-YMail-OSG: vUfaFnsVM1lOlC8NnLDvCHd_BVUzcv7nSQfLqaCPgnTM6svQOKKdNirqeVTu3UUrKD4JHqYKM9vDe1wqHdhawg13.oKFJKMobR9gqlCxO5FOK59dbfGn1OQirO12HQ-- Received: from [128.195.4.221] by web53904.mail.re2.yahoo.com via HTTP; Fri, 25 May 2007 10:36:24 PDT X-Mailer: YahooMailRC/651.23.1 YahooMailWebService/0.7.41.14 Date: Fri, 25 May 2007 10:36:24 -0700 (PDT) From: Daniel Valencia To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Message-ID: <859152.33245.qm@web53904.mail.re2.yahoo.com> Content-Type: text/plain; charset=ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Maximum data size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2007 18:03:06 -0000 Hi all, I am trying to allow a program to use more than 512MB of memory (specifically a little over 1GB), but I can't seem to be able to. I tried with ulimit -d 2097152, but when I check back again (immediately after setting it), it reads "data seg size (kbytes, -d) 524288" (again). I tried changing kern.maxdsiz, but I get "sysctl: unknown oid 'kern.maxdsiz'"... I'm running 6-STABLE as of two days ago. Thanks a lot! - Daniel ____________________________________________________________________________________Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/ From owner-freebsd-hackers@FreeBSD.ORG Fri May 25 18:16:44 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CCE916A4D7; Fri, 25 May 2007 18:16:44 +0000 (UTC) (envelope-from mail@maxlor.com) Received: from XSMTP0.ethz.ch (xsmtp0.ethz.ch [82.130.70.14]) by mx1.freebsd.org (Postfix) with ESMTP id 8E0FF13C469; Fri, 25 May 2007 18:16:43 +0000 (UTC) (envelope-from mail@maxlor.com) Received: from xfe0.d.ethz.ch ([82.130.124.40]) by XSMTP0.ethz.ch with Microsoft SMTPSVC(6.0.3790.2499); Fri, 25 May 2007 20:04:38 +0200 Received: from vpn-global-dhcp3-063.ethz.ch ([129.132.210.63]) by xfe0.d.ethz.ch over TLS secured channel with Microsoft SMTPSVC(6.0.3790.2499); Fri, 25 May 2007 20:04:38 +0200 From: Benjamin Lutz To: freebsd-hackers@freebsd.org, karma@freebsd.org Date: Fri, 25 May 2007 20:04:34 +0200 User-Agent: KMail/1.9.6 References: <200705250322.22259.karma@FreeBSD.org> In-Reply-To: <200705250322.22259.karma@FreeBSD.org> X-Face: $Ov27?7*N,h60fIEfNJdb!m,@#4T/d; 1hw|W0zvsHM(a$Yn6BYQ0^SEEXvi8>D`|V*F"=?utf-8?q?=5F+=0A=09R2?=@Aq>+mNb4`,'[[%z9v0Fa~]AD1}xQO3|>b.z&}l#R-_(P`?@Mz"kS; XC>Eti,i3>%@=?utf-8?q?g=3F=0A=094f?=,\c7|Ghwb&ky$b2PJ^\0b83NkLsFKv|smL/cI4UD%Tu8alAD MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2327765.LZ6vGXiOra"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200705252004.38092.mail@maxlor.com> X-OriginalArrivalTime: 25 May 2007 18:04:38.0632 (UTC) FILETIME=[290F2E80:01C79EF7] Cc: trustedbsd-audit@freebsd.org, trustedbsd-discuss@freebsd.org, karma@ez.pereslavl.ru Subject: Re: SoC: Distributed Audit Daemon project X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2007 18:16:44 -0000 --nextPart2327765.LZ6vGXiOra Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 25 May 2007 01:22:21 Alexey Mikhailov wrote: > [...] > 2. As I said before initial subject of this project was "Distributed > audit daemon". But after some discussions we had decided that this > project can be done in more general maner. We can perform distributed > logging for any user-space app. > [...] This sounds very similar to syslogd. Is it feasible to make dlogd a drop-in= =20 replacement for syslogd, at least from a syslog-using-program point of view? Cheers Benjamin --nextPart2327765.LZ6vGXiOra Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBGVyUyzZEjpyKHuQwRAmWxAJ4oEWYm7QmgNIgitGMGs5V73fdeCACcDTp2 d9VrAs9znve5fgz1baqM0lI= =WL1p -----END PGP SIGNATURE----- --nextPart2327765.LZ6vGXiOra-- From owner-freebsd-hackers@FreeBSD.ORG Fri May 25 18:22:30 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 166D116A475 for ; Fri, 25 May 2007 18:22:30 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id EF9E413C483 for ; Fri, 25 May 2007 18:22:29 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.1/8.13.8) with ESMTP id l4PILFCW045213; Fri, 25 May 2007 11:21:15 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.1/8.13.8/Submit) id l4PILEMI045212; Fri, 25 May 2007 11:21:14 -0700 (PDT) (envelope-from sgk) Date: Fri, 25 May 2007 11:21:14 -0700 From: Steve Kargl To: Daniel Valencia Message-ID: <20070525182114.GA45185@troutmask.apl.washington.edu> References: <859152.33245.qm@web53904.mail.re2.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <859152.33245.qm@web53904.mail.re2.yahoo.com> User-Agent: Mutt/1.4.2.2i Cc: freebsd-hackers@freebsd.org Subject: Re: Maximum data size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2007 18:22:30 -0000 On Fri, May 25, 2007 at 10:36:24AM -0700, Daniel Valencia wrote: > > I am trying to allow a program to use more than 512MB of memory > (specifically a little over 1GB), but I can't seem to be able to. > I tried with ulimit -d 2097152, but when I check back again (immediately > after setting it), it reads "data seg size (kbytes, -d) 524288" (again). > I tried changing kern.maxdsiz, but I get "sysctl: unknown oid > 'kern.maxdsiz'"... I'm running 6-STABLE as of two days ago. > With a tcsh, issue the command limit. What does it report? What is contained in /etc/login.conf? The kern.maxdsiz can be set in /boot/loader.conf. -- Steve From owner-freebsd-hackers@FreeBSD.ORG Fri May 25 18:30:14 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D619D16A400 for ; Fri, 25 May 2007 18:30:14 +0000 (UTC) (envelope-from fetrovsky@yahoo.com) Received: from web53910.mail.re2.yahoo.com (web53910.mail.re2.yahoo.com [206.190.36.220]) by mx1.freebsd.org (Postfix) with SMTP id 9F1AA13C455 for ; Fri, 25 May 2007 18:30:14 +0000 (UTC) (envelope-from fetrovsky@yahoo.com) Received: (qmail 98389 invoked by uid 60001); 25 May 2007 18:30:14 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Message-ID; b=fKtb32pUVdOadVrw62S3fkvAdyqRIRHlyNKvtgHwRjIQFychREKq5pVfQ49c0rTFsuWKO9RDTL5jEou7/adsQf/oLTcj4adgWd66zOlcOqTiBSfvXzOSPGzNspfSg9orHET5KbmtxvsHKtKwi/i9ZnGLhNE//9O8WtHqSSejrkw=; X-YMail-OSG: 8WZNNEUVM1mJRARSN7PJImsMOT8nXHYs.w42xbcs_lKuIQSH1UJ3bGFcbYbkENE1Vsq4T_2kjy77H3sqHM8hTi_WUkRTD67SSYPfP4euSxx8tr10LupThHfoO5V84Q-- Received: from [128.195.4.221] by web53910.mail.re2.yahoo.com via HTTP; Fri, 25 May 2007 11:30:13 PDT X-Mailer: YahooMailRC/651.23.1 YahooMailWebService/0.7.41.14 Date: Fri, 25 May 2007 11:30:13 -0700 (PDT) From: Daniel Valencia To: Stephen Montgomery-Smith MIME-Version: 1.0 Message-ID: <120902.97783.qm@web53910.mail.re2.yahoo.com> Content-Type: text/plain; charset=ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Maximum data size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2007 18:30:14 -0000 Hey, thanks a lot!! that was it - Daniel ----- Original Message ---- From: Stephen Montgomery-Smith To: Daniel Valencia Sent: Friday, May 25, 2007 11:11:29 AM Subject: Re: Maximum data size Daniel Valencia wrote: > Hi all, > > I am trying to allow a program to use more than 512MB of memory (specifically a little over 1GB), but I can't seem to be able to. I tried with ulimit -d 2097152, but when I check back again (immediately after setting it), it reads "data seg size (kbytes, -d) 524288" (again). I tried changing kern.maxdsiz, but I get "sysctl: unknown oid 'kern.maxdsiz'"... I'm running 6-STABLE as of two days ago. Change kern.maxdsiz in /boot/loader.conf. It is one of those variables that must be set at boot time. ____________________________________________________________________________________Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz From owner-freebsd-hackers@FreeBSD.ORG Fri May 25 18:35:11 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4AD616A468 for ; Fri, 25 May 2007 18:35:11 +0000 (UTC) (envelope-from brianh@webair.com) Received: from digi.webair.com (digi.webair.com [209.200.8.196]) by mx1.freebsd.org (Postfix) with ESMTP id 6823E13C4BF for ; Fri, 25 May 2007 18:35:11 +0000 (UTC) (envelope-from brianh@webair.com) Received: from localhost (brianh@localhost [127.0.0.1]) by digi.webair.com (8.13.6/8.13.6) with ESMTP id l4PIWYhs004339; Fri, 25 May 2007 14:32:34 -0400 (EDT) (envelope-from brianh@webair.com) Date: Fri, 25 May 2007 14:32:34 -0400 (EDT) From: Brian Hourigan To: Daniel Valencia In-Reply-To: <859152.33245.qm@web53904.mail.re2.yahoo.com> Message-ID: <20070525143134.L4278@digi.webair.com> References: <859152.33245.qm@web53904.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Maximum data size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2007 18:35:11 -0000 Daniel, I use these options in my kernel for 1GB: options MAXDSIZ="(1024*1024*1024)" options MAXSSIZ="(1024*1024*1024)" options DFLDSIZ="(1024*1024*1024)" See http://lists.freebsd.org/pipermail/freebsd-questions/2004-August/056890.html - Brian On Fri, 25 May 2007, Daniel Valencia wrote: > Hi all, > > I am trying to allow a program to use more than 512MB of memory (specifically a little over 1GB), but I can't seem to be able to. I tried with ulimit -d 2097152, but when I check back again (immediately after setting it), it reads "data seg size (kbytes, -d) 524288" (again). I tried changing kern.maxdsiz, but I get "sysctl: unknown oid 'kern.maxdsiz'"... I'm running 6-STABLE as of two days ago. > > > Thanks a lot! > > - Daniel > > > > > > ____________________________________________________________________________________Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. > http://farechase.yahoo.com/ > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Fri May 25 18:44:18 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 300C916A475 for ; Fri, 25 May 2007 18:44:18 +0000 (UTC) (envelope-from ivan@serezhkin.com) Received: from guns.agava.net (guns.agava.net [81.200.14.42]) by mx1.freebsd.org (Postfix) with ESMTP id A4D9D13C4AE for ; Fri, 25 May 2007 18:44:17 +0000 (UTC) (envelope-from ivan@serezhkin.com) Received: by gw.agava-guns.domain (Postfix, from userid 426) id 149E7118204; Fri, 25 May 2007 22:21:45 +0400 (MSD) Received: from ivan.agava-guns.domain (ivan.agava-guns.domain [192.168.4.199]) by gw.agava-guns.domain (Postfix) with ESMTP id BBE971181DA; Fri, 25 May 2007 22:21:44 +0400 (MSD) Message-ID: <4657293F.9090406@serezhkin.com> Date: Fri, 25 May 2007 22:21:51 +0400 From: "Ivan B. Serezhkin" User-Agent: Thunderbird 2.0.0.0 (X11/20070513) MIME-Version: 1.0 To: Daniel Valencia References: <859152.33245.qm@web53904.mail.re2.yahoo.com> In-Reply-To: <859152.33245.qm@web53904.mail.re2.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Maximum data size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2007 18:44:18 -0000 Daniel Valencia wrote: > Hi all, > > I am trying to allow a program to use more than 512MB of memory (specifically a little over 1GB), but I can't seem to be able to. I tried with ulimit -d 2097152, but when I check back again (immediately after setting it), it reads "data seg size (kbytes, -d) 524288" (again). I tried changing kern.maxdsiz, but I get "sysctl: unknown oid 'kern.maxdsiz'"... I'm running 6-STABLE as of two days ago. > Good day try in kernel config something options MAXDSIZ=(1024UL*1024*1024) MAXDSIZ constant is hard encoded into kernel -- Ivan B. Serezhkin From owner-freebsd-hackers@FreeBSD.ORG Sat May 26 02:21:53 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D45316A469 for ; Sat, 26 May 2007 02:21:53 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id AA4C713C448 for ; Sat, 26 May 2007 02:21:52 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (dialup105.ach.sch.gr [81.186.70.105]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-3) with ESMTP id l4Q2ISCk027349 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 26 May 2007 05:18:37 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.1/8.14.1) with ESMTP id l4Q2IMu2002249; Sat, 26 May 2007 05:18:23 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.1/8.14.1/Submit) id l4Q2IKJw002248; Sat, 26 May 2007 05:18:20 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Sat, 26 May 2007 05:18:19 +0300 From: Giorgos Keramidas To: Alexey Mikhailov Message-ID: <20070526021819.GB2071@kobe.laptop> References: <200705250322.22259.karma@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200705250322.22259.karma@FreeBSD.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.689, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.51, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org, trustedbsd-audit@freebsd.org, trustedbsd-discuss@freebsd.org, karma@ez.pereslavl.ru Subject: Re: SoC: Distributed Audit Daemon project X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2007 02:21:53 -0000 On 2007-05-25 03:22, Alexey Mikhailov wrote: > Hello! Hi Alexey :) > http://wiki.freebsd.org/DistributedAuditDaemon > [...] > Consider this picture ( Yes, I know that my ASCII art sucks :-) ) > > '----------------` '-----------------` > | | '---------` | Client-specific | > | User-space app | <== | API [2] | ==> | part of | > | [1] | `---------' | "dlogd" [3] | > `----------------' `-----------------' > ^^ > || > || > > (network level) [4] > > || > || > vv > '-----------------` > '===============` | Server-specific | > | File system | <======== | part of | > | hierarchy [6] | | "dlogd" [5] | > `===============' `-----------------' [...] > [1] <=> [2]: Shared user-space library will incapsulate API. > And I really want to keep real API simple. At this moment > I'm going to have only one function that will mark log file > as "to deliver" (i.e. dlogd_submit("/var/audit/whatever")). It may be worth keeping the API simple by having only two calls: dlog_register("/var/audit/file"); dlog_unregister("/var/audit/file"); Then dlogd can use kqueue to monitor the file itself, so you don't need special calls/methods to notify it of new events arriving on the file. This is just an idea, and I haven't fully thought all the details of how a "flush" operation could be implemented if dlogd used kqueue itself. From owner-freebsd-hackers@FreeBSD.ORG Sat May 26 07:49:26 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 18E1816A41F; Sat, 26 May 2007 07:49:26 +0000 (UTC) (envelope-from karma@FreeBSD.org) Received: from pier.botik.ru (pier.botik.ru [193.232.174.1]) by mx1.freebsd.org (Postfix) with ESMTP id C1A6113C44B; Sat, 26 May 2007 07:49:25 +0000 (UTC) (envelope-from karma@FreeBSD.org) Received: from ez.pereslavl.ru ([192.168.56.29]:54365 helo=almond) by pier.botik.ru with esmtp (Exim 4.50) id 1Hrr1b-0005gE-II; Sat, 26 May 2007 11:49:23 +0400 Received: from ez ([192.168.0.2]) by almond with esmtp (Exim 4.50) id 1Hrqzo-0005aq-C3; Sat, 26 May 2007 11:47:28 +0400 From: Alexey Mikhailov To: freebsd-hackers@freebsd.org Date: Sat, 26 May 2007 11:49:17 +0400 User-Agent: KMail/1.9.6 References: <200705250322.22259.karma@FreeBSD.org> <200705252004.38092.mail@maxlor.com> In-Reply-To: <200705252004.38092.mail@maxlor.com> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705261149.18510.karma@FreeBSD.org> Cc: Benjamin Lutz , trustedbsd-audit@freebsd.org, trustedbsd-discuss@freebsd.org Subject: Re: SoC: Distributed Audit Daemon project X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: karma@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2007 07:49:26 -0000 On Friday 25 May 2007 22:04:34 Benjamin Lutz wrote: > On Friday 25 May 2007 01:22:21 Alexey Mikhailov wrote: > > [...] > > 2. As I said before initial subject of this project was > > "Distributed audit daemon". But after some discussions we had > > decided that this project can be done in more general maner. We can > > perform distributed logging for any user-space app. > > [...] > > This sounds very similar to syslogd. Is it feasible to make dlogd a > drop-in replacement for syslogd, at least from a syslog-using-program > point of view? Our project concentrates on log shipping. We're paying most attention to securely and reliable log ships. So our project differs from syslogd in major way. But actually it could be possible to be dlogd used by syslogd\syslog-ng for logs shipping, as I see it. I.e. consider this scenario. (client syslogd) <-> (API) <-> (client-specific part of dlogd) ^^ || vv (network channel) ^^ || vv (server syslogd) <-> (API) <-> (server-specific part of dlogd) But server-side communcation (i mean server-side syslogd <-> API <-> dlogd) will need more thinking. I'm not going to think of\implement this kind of feature this summer but I'll consider it later for sure. From owner-freebsd-hackers@FreeBSD.ORG Sat May 26 08:19:55 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3381F16A400; Sat, 26 May 2007 08:19:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id E2B9913C447; Sat, 26 May 2007 08:19:54 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l4Q8FrYA015240; Sat, 26 May 2007 02:15:53 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 26 May 2007 02:16:09 -0600 (MDT) Message-Id: <20070526.021609.-1749708199.imp@bsdimp.com> To: mail@maxlor.com From: "M. Warner Losh" In-Reply-To: <200705252004.38092.mail@maxlor.com> References: <200705250322.22259.karma@FreeBSD.org> <200705252004.38092.mail@maxlor.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 26 May 2007 02:15:54 -0600 (MDT) Cc: karma@freebsd.org, freebsd-hackers@freebsd.org, trustedbsd-audit@freebsd.org, trustedbsd-discuss@freebsd.org, karma@ez.pereslavl.ru Subject: Re: SoC: Distributed Audit Daemon project X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2007 08:19:55 -0000 In message: <200705252004.38092.mail@maxlor.com> Benjamin Lutz writes: : On Friday 25 May 2007 01:22:21 Alexey Mikhailov wrote: : > [...] : > 2. As I said before initial subject of this project was "Distributed : > audit daemon". But after some discussions we had decided that this : > project can be done in more general maner. We can perform distributed : > logging for any user-space app. : > [...] : : This sounds very similar to syslogd. Is it feasible to make dlogd a drop-in : replacement for syslogd, at least from a syslog-using-program point of view? I suspect that it is dealing with different data streams. syslog is for programs sending text voluntarily. auditd is for pulling audit trails out of the kernel for which the 'target' programs have no knowledge that the audit trails are being generated, let alone anyway to prevent it. Warner From owner-freebsd-hackers@FreeBSD.ORG Sat May 26 16:43:17 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C96A116A468 for ; Sat, 26 May 2007 16:43:17 +0000 (UTC) (envelope-from dmw@unete.cl) Received: from mail01.ifxnetworks.com (mail01.ifxnetworks.com [190.61.128.11]) by mx1.freebsd.org (Postfix) with ESMTP id 6C6CA13C46C for ; Sat, 26 May 2007 16:43:17 +0000 (UTC) (envelope-from dmw@unete.cl) Received: (qmail 2930 invoked from network); 26 May 2007 16:43:16 -0000 X-Spam-DCC: CollegeOfNewCaledonia: mail01.ifxnetworks.com 1189; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail01.ifxnetworks.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=6.0 tests=none autolearn=disabled version=3.1.8 Received: from unknown (HELO quake) (dmw@unete.cl@[200.73.82.51]) (envelope-sender ) by mail01.ifxnetworks.com (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 26 May 2007 16:43:15 -0000 From: Daniel Molina Wegener Organization: DMW To: FreeBSD Hackers Date: Sat, 26 May 2007 12:42:58 -0400 User-Agent: KMail/1.9.6 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705261242.58950.dmw@unete.cl> Subject: Problems compiling BUILDING from STABLE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dmw@unete.cl List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2007 16:43:17 -0000 Hello I'm trying to build CURRENT from STABLE, I'm using a shell script that sets the next environment variables: -----------------------------8<------------------------------ export MAKEOBJDIRPREFIX="/work/FreeBSD/obj" export PREFIX="/work/FreeBSD" export DESTDIR="/work/FreeBSD/build" export TARGET="i386" -----------------------------8<------------------------------ I run the script, that executes make, with these environment variables, but I get the next error while building world: -----------------------------8<------------------------------ ===> lib/csu/i386-elf (obj,depend,all,install) rm -f .depend mkdep -f .depend -a -I/work/FreeBSD/usr/src/lib/csu/i386-elf/../common -I/wor k/FreeBSD/usr/src/lib/csu/i386-elf/../../libc/include /work/FreeBSD/usr/src/lib/ csu/i386-elf/crt1.c /work/FreeBSD/usr/src/lib/csu/i386-elf/crti.S /work/FreeBSD/ usr/src/lib/csu/i386-elf/crtn.S cc -march=prescott -O2 -pipe -march=prescott -I/work/FreeBSD/usr/src/lib/csu/i38 6-elf/../common -I/work/FreeBSD/usr/src/lib/csu/i386-elf/../../libc/include -Ws ystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wn ested-externs -Wredundant-decls -Wno-pointer-sign -c /work/FreeBSD/usr/src/lib/c su/i386-elf/crt1.c cc1: error: unrecognized command line option "-Wchar-subscripts" -----------------------------8<------------------------------- What's my error? Regards, -- .O. | Daniel Molina Wegener | C/C++ Developer ..O | dmw [at] unete [dot] cl | FOSS Coding Adict OOO | BSD & Linux User | Standards Rocks! From owner-freebsd-hackers@FreeBSD.ORG Sat May 26 16:59:43 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E8B1716A400 for ; Sat, 26 May 2007 16:59:43 +0000 (UTC) (envelope-from maslanbsd@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.225]) by mx1.freebsd.org (Postfix) with ESMTP id AA04813C44C for ; Sat, 26 May 2007 16:59:43 +0000 (UTC) (envelope-from maslanbsd@gmail.com) Received: by nz-out-0506.google.com with SMTP id 14so90928nzn for ; Sat, 26 May 2007 09:59:43 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=RqFdy+xHPqugpX/uk4XAzkVJiLe3FMNelpiY1RI/k+qoTOc4H10bgasIseA5YKd3Jlxvs55R/VZOxlAoEH/7MCsd13S9OMBRZLOzu0frv/J306ZSO/tVVys2NDvIRfxU2f0ZjI3m5yZBmqviROmn7LVJypSxGfGnXFdGR2ezAuc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JeP3ha0qbghuTcpB0nbSSQ0GXAPDn+WlKW/68m/LroX05nfpaKpgWa375Lb/f0Kmjg5yKKkmrFCx3lFrabbLawJKjaWyH/ZbrCj052XkJIz2nMTivo4lk8ve+dMsz6W5hx4/Ht9DNiBpH7JPUWRHDZAi1diri2sSF0pzUJF9QIw= Received: by 10.143.16.9 with SMTP id t9mr111366wfi.1180198782816; Sat, 26 May 2007 09:59:42 -0700 (PDT) Received: by 10.142.86.18 with HTTP; Sat, 26 May 2007 09:59:42 -0700 (PDT) Message-ID: <319cceca0705260959s24574b11u5947fec0ff1a8577@mail.gmail.com> Date: Sat, 26 May 2007 09:59:42 -0700 From: Maslan To: dmw@unete.cl In-Reply-To: <200705261242.58950.dmw@unete.cl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200705261242.58950.dmw@unete.cl> Cc: FreeBSD Hackers Subject: Re: Problems compiling BUILDING from STABLE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2007 16:59:44 -0000 > What's my error? Have u missed with the CFLAGS ? --- OS Developer I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) --- http://libosdk.berlios.de From owner-freebsd-hackers@FreeBSD.ORG Sat May 26 17:14:55 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A6A016A46C for ; Sat, 26 May 2007 17:14:53 +0000 (UTC) (envelope-from maslanbsd@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.228]) by mx1.freebsd.org (Postfix) with ESMTP id B3BCA13C483 for ; Sat, 26 May 2007 17:14:53 +0000 (UTC) (envelope-from maslanbsd@gmail.com) Received: by nz-out-0506.google.com with SMTP id 14so92917nzn for ; Sat, 26 May 2007 10:14:53 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pVwxH4GA1cCw8dQkecCTlol7AayyknDVO72RzgLQbPaSAF2TUOVnG+GNDy6fQFsfcg0RgPs/hRY3uxJXGQFu4e1h2rWwGPc/LFk2vvx5fBlwmg21kdL5DILlaNhFKkKeNHZ3daRrD9y1Z74Q7M72a3jW6lsb7Y0mfVyVZ12Y34M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CTK2dajHgFIH2joLB//3kZlHtxJaENBfHL0ORvzJzbJiJhxpU1/24tLd4E2yLfQ5Jw1QPFsE6ig/ZerYET25VUn9UpvZfeThO4eNl42R/isJUktEsMrEpQ0emn96nsYOaKUeKegor6yG8oKEmd+hA/DkLXf3XtoPVYd1NxC9MiM= Received: by 10.143.35.1 with SMTP id n1mr109868wfj.1180199692798; Sat, 26 May 2007 10:14:52 -0700 (PDT) Received: by 10.142.86.18 with HTTP; Sat, 26 May 2007 10:14:52 -0700 (PDT) Message-ID: <319cceca0705261014s5bde07e1p770aabb6301a6b7f@mail.gmail.com> Date: Sat, 26 May 2007 10:14:52 -0700 From: Maslan To: dmw@unete.cl In-Reply-To: <319cceca0705260959s24574b11u5947fec0ff1a8577@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200705261242.58950.dmw@unete.cl> <319cceca0705260959s24574b11u5947fec0ff1a8577@mail.gmail.com> Cc: FreeBSD Hackers Subject: Re: Problems compiling BUILDING from STABLE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2007 17:14:55 -0000 > Have u missed with the CFLAGS ? Sorry, i mean "messed up" --- OS Developer I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) --- http://libosdk.berlios.de From owner-freebsd-hackers@FreeBSD.ORG Sat May 26 17:43:49 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 84AFD16A421 for ; Sat, 26 May 2007 17:43:49 +0000 (UTC) (envelope-from dmw@unete.cl) Received: from mail01.ifxnetworks.com (mail01.ifxnetworks.com [190.61.128.11]) by mx1.freebsd.org (Postfix) with ESMTP id 24F7713C465 for ; Sat, 26 May 2007 17:43:48 +0000 (UTC) (envelope-from dmw@unete.cl) Received: (qmail 1894 invoked from network); 26 May 2007 17:43:48 -0000 X-Spam-DCC: : mail01.ifxnetworks.com 1114; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail01.ifxnetworks.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=6.0 tests=UPPERCASE_25_50 autolearn=disabled version=3.1.8 Received: from unknown (HELO quake) (dmw@unete.cl@[200.73.82.51]) (envelope-sender ) by mail01.ifxnetworks.com (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 26 May 2007 17:43:47 -0000 From: Daniel Molina Wegener Organization: DMW To: freebsd-hackers@freebsd.org Date: Sat, 26 May 2007 13:43:30 -0400 User-Agent: KMail/1.9.6 References: <200705261242.58950.dmw@unete.cl> <319cceca0705260959s24574b11u5947fec0ff1a8577@mail.gmail.com> <319cceca0705261014s5bde07e1p770aabb6301a6b7f@mail.gmail.com> In-Reply-To: <319cceca0705261014s5bde07e1p770aabb6301a6b7f@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705261343.30607.dmw@unete.cl> Cc: Maslan Subject: Re: Problems compiling BUILDING from STABLE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dmw@unete.cl List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2007 17:43:49 -0000 On Saturday 26 May 2007 13:14:52 Maslan wrote: > > Have u missed with the CFLAGS ? > > Sorry, i mean "messed up" Sorry, I can't understand... what's wrong with my CFLAGS. These flags works for STABLE -- in my make.conf: --------------------------------8<------------------------- LOCLACFLAGS=-march=prescott -O2 -pipe CFLAGS=$(LOCLACFLAGS) COPTFLAGS=$(LOCLACFLAGS) CXXFLAGS+=$(LOCLACFLAGS) CXXOPTFLAGS+=$(LOCLACFLAGS) --------------------------------8<------------------------- Why shouln't work for CURRENT? All the other CFLAGS are added because the targets are using the level 6 of warnings in sys/mk/bsd.sys.mk > > > --- > OS Developer > I'm Searching For Perfection, > So Even If U Need Portability U've To Use Assembly ;-) > --- > http://libosdk.berlios.de > [SNIP] Regards, -- .O. | Daniel Molina Wegener | C/C++ Developer ..O | dmw [at] unete [dot] cl | FOSS Coding Adict OOO | BSD & Linux User | Standards Rocks! From owner-freebsd-hackers@FreeBSD.ORG Sat May 26 21:41:57 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 46AC616A41F for ; Sat, 26 May 2007 21:41:57 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout3.cac.washington.edu (mxout3.cac.washington.edu [140.142.32.166]) by mx1.freebsd.org (Postfix) with ESMTP id 235E813C43E for ; Sat, 26 May 2007 21:41:57 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.7] (may be forged)) by mxout3.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l4QLfuxd006754 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 26 May 2007 14:41:56 -0700 X-Auth-Received: from [192.168.10.45] (c-67-166-149-71.hsd1.ca.comcast.net [67.166.149.71]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l4QLftnw031931 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 26 May 2007 14:41:56 -0700 Message-ID: <4658A9CD.2040607@u.washington.edu> Date: Sat, 26 May 2007 14:42:37 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: dmw@unete.cl References: <200705261242.58950.dmw@unete.cl> <319cceca0705260959s24574b11u5947fec0ff1a8577@mail.gmail.com> <319cceca0705261014s5bde07e1p770aabb6301a6b7f@mail.gmail.com> <200705261343.30607.dmw@unete.cl> In-Reply-To: <200705261343.30607.dmw@unete.cl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.1.294258, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.5.26.141834 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: freebsd-hackers@freebsd.org, Maslan Subject: Re: Problems compiling BUILDING from STABLE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2007 21:41:57 -0000 Daniel Molina Wegener wrote: > On Saturday 26 May 2007 13:14:52 Maslan wrote: >>> Have u missed with the CFLAGS ? >> Sorry, i mean "messed up" > > Sorry, I can't understand... what's wrong with my CFLAGS. > These flags works for STABLE -- in my make.conf: > > --------------------------------8<------------------------- > LOCLACFLAGS=-march=prescott -O2 -pipe > CFLAGS=$(LOCLACFLAGS) > COPTFLAGS=$(LOCLACFLAGS) > CXXFLAGS+=$(LOCLACFLAGS) > CXXOPTFLAGS+=$(LOCLACFLAGS) > --------------------------------8<------------------------- > > Why shouln't work for CURRENT? > > All the other CFLAGS are added because the targets are using > the level 6 of warnings in sys/mk/bsd.sys.mk > >> >> --- >> OS Developer >> I'm Searching For Perfection, >> So Even If U Need Portability U've To Use Assembly ;-) >> --- >> http://libosdk.berlios.de >> [SNIP] > > Regards, Set CPUTYPE to prescott. You don't need to pass it in as -march, like the manpage for gcc says. Only pass it in as -march=prescott if you're compiling your own program outside of make/gmake. -Garrett