Re: best way to make dvd appear to me a .iso file to the FS

2013-10-01 Thread Fernando Apesteguía
El 01/10/2013 03:46, Aryeh Friedman aryeh.fried...@gmail.com escribió:

 bhyveload(8) only let's you use .ISO's for install media and I want to
make
 it so I can just insert a DVD (/dev/cd0) and bhyve can read it as if it
was
 a just a normal file and not a device... short of copying it to the hard
 drive is there any other solution anyone can think of?

You could use mkisofs/growisofs to create such file from the mounted CD/DVD.

 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: ps_strings

2013-08-18 Thread Fernando Apesteguía
On Sat, Aug 17, 2013 at 8:00 PM, Carlos Jacobo Puga Medina 
cjpug...@gmail.com wrote:

 Hi people,

 Despite I made a request not long ago[1], I'm looking for documentation to
 create the ps_strings structure man page because isn't covered in other man
 page such e.g. execve(2). So, I'm interested to know for what it's
 currently used.

 Any input will be appreciated.


It is for storing the vectors for program arguments and environment. They
are placed at the top of the process stack. This information is used for
instance, by the ps(1) program via the kvm(3) interface. The same structure
is accesed from the linuxolator (linprocfs.c) to implement the environ
pseudo-file.

In the first case (libkvm interface) a sysctl is used to retrieve that
information. Anyway, both paths end up calling proc_getenvv/proc_getargv in
kern_proc.c. Those are selectors for the function that does the actual
work: get_ps_strings. This function first calls get_proc_vector to copy the
relevant memory area (look for vptr in the case statement) from the
process stack and then it iterates to extract all the strings.

Have a look at the comment in sys/exec.h

All this is probably not needed for the man page, but hey, just my two
cents.





 --CJPM


 [1] http://lists.freebsd.org/pipermail/freebsd-doc/2013-July/022422.html.
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Can't override function keys in kbdcontrol

2013-07-29 Thread Fernando Apesteguía
On Mon, Jul 29, 2013 at 11:06 AM, Pragm B pra...@gmail.com wrote:

 Hello everyone,

 I have problems overriding the functions keys of my keyboard in FreeBSD 9.1

 The kbdcontrol utility can be used to define specific values for the
 function keys. See here:

 http://www.freebsd.org/cgi/man.cgi?query=atkbdapropos=0sektion=0manpath=FreeBSD+9.1-RELEASEarch=defaultformat=html

 It is stated that the function keys can be overridden using
 kbdcontrol -f # s

 where '#' is a number from 1 to 96 and 's' is a string that will be
 outputted.

 When '#' is between 65 and 96 (unassigned functions), this works.
 However, this does not work for functions keys between 1 and 64!


What do you mean by does not work? Do you get any errors?

I'm on 9.1-RELEASE-p3

$ kbdcontrol -f 37 hello

Here I type Ctrl-Shift-F1 and get:
$hello





 Any insight is much appreciated :)

 Cheers,
 Pragmb
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: bin/176713: [patch] nc(1) closes network socket too soon

2013-07-21 Thread Fernando Apesteguía
On Sun, Jul 21, 2013 at 5:05 AM, Ronald F. Guilmette
r...@tristatelogic.comwrote:


 In message CAGwOe2ZEV3o-=
 z1a3pgbtchaehmbqb5fwpx-7emgbtsj7ay...@mail.gmail.com
 =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= fernando.apesteg...@gmail.com
 wrote:

 It seems to work for me:

 Good.

 Just to make sure that we are clear, you are simply confirming what my
 bug report (bin/176713) said, i.e. that _without_ my fix, nc can
 prematurely
 truncate the output from some servers, whereas _with_ my fix this bad
 behaviour on the part of nc is cured... Is that correct?


Yes, that is what I tested. Behavior before (truncated output) and after
(correct output) applying the patch.

If this is going to be the final version of the patch, i.e. if it is going
to include the -q flag, then the patch needs to be extended to reflect that
in nc(1) man page.



 If so, thank you for confirming that my proposed fix produces the
 desired result.

 I feel compelled to say again that in actual point of fact, the way that
 I personally would prefer to see this problem resolved would *not* be to
 add a new option for the nc program.  Rather, I think that it would
 actually be best simply to delete from the nc source code the one single
 line that is causing nc to stop its operation as soon as it receives
 an EOF from its stdin channel.  If that line is simply deleted, then
 nc will instead wait until it receives an EOF from the remote server
 that it is talking to, and quite obviously, this change causes nc to
 produce output which is arguably more correct and which is certainly
 more useful that the prematurely truncated results that nc sometimes
 produces at present.

  P.P.S.  I have just realized that yet one more critical enhancement for
  nc is called for, and I will be filing a separate and additional PR for
  that soon.  I hope that someone will be able to take a look at that as
  soon as it is filed.
 
 Just out of curiosity. What is it about?

 Well, as it turns out, the additional fix that I had believed that I
 was going to propose for nc was not that critical after all... at least
 not for my current and immediate application(s).  However it might still
 have some value in some cases anyway, so I will describe what I had in
 mind.

 Quite simply, I believe that it would be Good if the nc program had a
 new and additional option which, when used, would cause nc to refrain
 from sending any data _to_ the remote server until such time as it had
 received one entire line _from_ the remote server.

 Such an option could be useful when using nc to communicate with remote
 servers running certain protocols.  For example, the rules of the SMTP
 protocol... just to name one... require that a client wait until the
 server has sent out an initial greeting banner before the client sends
 anything to the server.  Some SMTP servers are lenient about enforcing
 this protocol rule, so in practice it may often not be necessary to wait
 for the greeting banner before sending SMTP commands from the client to
 the server.  However there may perhaps be other instances where waiting
 actually is required, and thus I believe that an option to produce that
 kind of behavior might be a useful addition to the nc command.


 Regards,
 rfg

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: bin/176713: [patch] nc(1) closes network socket too soon

2013-07-20 Thread Fernando Apesteguía
On Sat, Jul 20, 2013 at 4:31 PM, Ronald F. Guilmette
r...@tristatelogic.comwrote:



 Could someone please take a look at this bug report (bin/176713) and
 also at the simple patch that I provided to fix the problem?

 This is quite a serious problem, and my PR has been pending with no
 action since Wed, 6 Mar 2013.


 Regards,
 rfg


 P.S.  Please note that in reality, I do not believe that it is necessary
 to add a new -q option in order to preserve backwards compatability,
 however
 I proposed one because in my experience there is always going to be some
 purist who will claim that *any* change in semantics, however small or
 helpful, in *any* software ``may'' break something.  In reality, the
 problem in this can most easily be solved simply by removing the one
 statement:

 shutdown(nfd, SHUT_WR);

 entirely from the source, rather than making it conditional on -q, as I
 suggested in my PR, bin/176713.


It seems to work for me:

Old version:

$ echo 193.0.6.139 | nc whois.ripe.net 43
% This is the RIPE Database query service.
% The objects are in RPSL format.
%
% The RIPE Database is subject to Terms and Conditions.
% See http://www.ripe.net/db/support/db-terms-conditions.pdf

with the patched version:

echo 193.0.6.139 | ./nc -q whois.ripe.net 43
% This is the RIPE Database query service.
% The objects are in RPSL format.
%
% The RIPE Database is subject to Terms and Conditions.
% See http://www.ripe.net/db/support/db-terms-conditions.pdf

% Note: this output has been filtered.
%   To receive output for a database update, use the -B flag.

% Information related to '193.0.0.0 - 193.0.7.255'

% Abuse contact for '193.0.0.0 - 193.0.7.255' is 'ab...@ripe.net'

inetnum:193.0.0.0 - 193.0.7.255
netname:RIPE-NCC
descr:  RIPE Network Coordination Centre
org:ORG-RIEN1-RIPE
descr:  Amsterdam, Netherlands
remarks:Used for RIPE NCC infrastructure.
country:NL
admin-c:JDR-RIPE
admin-c:BRD-RIPE
tech-c: OPS4-RIPE
status: ASSIGNED PI
source: RIPE # Filtered
mnt-by: RIPE-NCC-MNT
mnt-lower:  RIPE-NCC-MNT

organisation:   ORG-RIEN1-RIPE
org-name:   Reseaux IP Europeens Network Coordination Centre (RIPE NCC)
org-type:   RIR
descr:  RIPE NCC Operations
address:Reseaux IP Europeens Network Coordination Centre (RIPE NCC)
P.O. Box 10096
1016 EB Amsterdam
Netherlands
phone:  +3120535
fax-no: +31205354445
admin-c:AP110-RIPE
admin-c:MENN1-RIPE
abuse-c:ops4-ripe
mnt-ref:RIPE-NCC-MNT
mnt-ref:RIPE-NCC-HM-MNT
mnt-by: RIPE-NCC-HM-MNT
source: RIPE # Filtered

role:   RIPE NCC Operations
address:Singel 258
address:1016 AB Amsterdam
address:The Netherlands
phone:  +31 20 535 
fax-no: +31 20 535 4445
abuse-mailbox:  ab...@ripe.net
admin-c:JDR-RIPE
admin-c:BRD-RIPE
tech-c: GL7321-RIPE
tech-c: JA47
tech-c: MENN1-RIPE
tech-c: EMIL-RIPE
tech-c: RCO-RIPE
tech-c: APZ-RIPE
tech-c: CNAG-RIPE
tech-c: RPM-RIPE
tech-c: SO2011-RIPE
tech-c: RH5357-RIPE
tech-c: DCW-RIPE
tech-c: FMUL-RIPE
nic-hdl:OPS4-RIPE
mnt-by: RIPE-NCC-MNT
source: RIPE # Filtered

person: Brian Riddle
address:IT Manager
address:RIPE NCC - Operations
address:Singel 258
address:1016AB Amsterdam
address:The Netherlands
phone:  +31 20 535 
fax-no: +31 20 535 4445
nic-hdl:BRD-RIPE
source: RIPE # Filtered
mnt-by: RIPE-NCC-MNT

person: Jochem de Ruig
address:RIPE NCC
address:Singel 258
address:1016AB Amsterdam
address:The Netherlands
phone:  +31 20 535 
fax-no: +31 20 535 4445
nic-hdl:JDR-RIPE
source: RIPE # Filtered
mnt-by: RIPE-NCC-MNT

% Information related to '193.0.0.0/21AS'

route:  193.0.0.0/21
descr:  RIPE-NCC
origin: AS
mnt-by: RIPE-NCC-MNT
source: RIPE # Filtered

% This query was served by the RIPE Database Query Service version 1.66.3
(WHOIS2)

Tested on:

FreeBSD hammer 9.1-RELEASE-p3 FreeBSD 9.1-RELEASE-p3 #0: Mon Apr 29
18:27:25 UTC 2013
r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
amd64



 P.P.S.  I have just realized that yet one more critical enhancement for
 nc is called for, and I will be filing a separate and additional PR for
 that soon.  I hope that someone will be able to take a look at that as
 soon as it is filed.


Just out of curiosity. What is it about?


 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to 

Re: ladmins that cannot type a command

2013-05-04 Thread Fernando Apesteguía
El 04/05/2013 13:26, Wojciech Puchar woj...@wojtek.tensor.gdynia.pl
escribió:

 spending your time polishing the wheels.


 You need to spend more time writing patches rather than telling other
 people what not to do.  We're (nearly) all volunteers.

 If you think something needs fixing, you can have a go yourself or pay
 someone, but do NOT tell someone that their contribution is not
worthwhile
 while pushing your agenda.


 yes i am telling someone that his contribution is not worthwhile. Or to
be more exact - that it hurts.


Too bad, it's his contribution not yours. I'm really happy that you can not
prevent people from contributing in any form.

 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: ladmins that cannot type a command

2013-05-04 Thread Fernando Apesteguía
El 04/05/2013 13:26, Wojciech Puchar woj...@wojtek.tensor.gdynia.pl
escribió:

 or partially. Then I gave a try Kde accessibility and found out that it's
 not quite ready for real usage. But it was something, at least.
 About Gui I always think it's better to have it than not.


 Not true. GUI is only a problem. you may just make your fonts larger
using xterm.

Accessibility is not only about larger fonts.


 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: GSoC: PKGNG GUI Proposal Available for Review

2013-05-03 Thread Fernando Apesteguía
El 03/05/2013 20:00, Justin Edward Muniz justin.mu...@maine.edu
escribió:

 On Fri, May 3, 2013 at 1:51 PM, Matt Olander m...@ixsystems.com wrote:

 
  Great proposal, Justin! I look forward to seeing your work ;)
 
  Cheers,
  -matt
 

 Thank you very much for your support, Matt!

 As soon as I start committing code, I will share a link to my repository
on
 this mailing-list.

I wish you the best of luck. I'm also happy to see you will use packagekit
as a frontend. No need to reinvent the wheel.


 Justin Muniz
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Fwd: GSOC: Qt front-ends

2013-04-24 Thread Fernando Apesteguía
El 24/04/2013 13:45, Chris Rees utis...@gmail.com escribió:

 On 24 Apr 2013 05:36, Justin Edward Muniz justin.mu...@maine.edu
wrote:
 
  
   Justin I say stick to  FreeBSD-update . My reason is, as Pkgng becomes
   more popular , a front end for ports will be less useful as binary
 packages
   become more popular . Kports is a monster program , you should set a
   reasonable goal ,and target dates; which may be hard with a cleanup
 project
   .   Also a update notifier for kde that handles FreeBSD update would
be
   very useful .
  
   My 2cents .
   ---
   Mark saad | mark.s...@longcount.org
  
 
 
  Thank you very much Mark,
 
   I was definitely hoping to get community feedback on this, and I
 value
  you voicing your opinion. I agree that kports is a mammoth, and also
that
 a
  system updater GUI should have a way to notify the user of new updates.
 
   Any other perspectives are welcome, as well as support for a
  freebsd-update approach. I am working to refine my proposal, which as
  you've pointed out is very important. Eventually I would like to help in
  all three mentioned areas, but for now I must focus on one application.
  Does anyone think that a custom kernel configuration and management GUI
  utility would be desirable?
 
   I will shape my goals to meet the needs of the community.

 Our kernel is actually very easy to configure, so I'm not convinced that
 it's needed; you may be thinking of Linux's menuconfig, but I think that
is
 because of the complexity.

I agree. Also, the kind of people who compile their kernels probably feel
more comfortable in console mode :)

The frontend for pkgng and freebsd-update might have a bigger user base.


 Chris
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: GSOC: Qt front-ends

2013-04-24 Thread Fernando Apesteguía
El 24/04/2013 21:18, Teske, Devin devin.te...@fisglobal.com escribió:


 On Apr 24, 2013, at 11:54 AM, Baptiste Daroussin wrote:

  On Wed, Apr 24, 2013 at 02:03:56PM -0400, Justin Edward Muniz wrote:
 
  I think the interface to pkgng and freebsd-update are still
  interesting; at least more worthwhile than the kernel configuration
  one.
 
  I think the pkgng one has the edge, since packages are updated far
  more often than base, and it's easier to track base.
 
  Now you are at a stage where you should make your own decision; which
  one looks the most interesting to you?  Once you decide on an area of
  interest, you can just start hacking :)
 
  Chris
 
 
 
  That's good to hear.
 
  I am sure that you are right, a pkgng GUI would probably see more use
in
  general. I am definitely close to making my decision, but this thread
has
  been so much help, I am glad for the insight.
 
  The coding is what I look forward to the most :D
 
  imho a pkgng frontend should be done via packagekit, just write a pkgng
backend
  for packagekit and you will gain for FreeBSD a KDE frontend and a GTK
frontend.
 
  That said any frontend at convenience to contributor will be anyway
good :)
 

 If you could pardon my ignorance… but what is packagekit again (for the
benefit of others)?

It's an application to manage packages. It is developed in a way that it's
easy to add new backends keeping the same interface. See[1] for the general
information and this[2] page for the currently supported back ends.

[1] http://www.packagekit.org

[2] http://www.packagekit.org/pk-matrix.html

 --
 Devin

 _
 The information contained in this message is proprietary and/or
confidential. If you are not the intended recipient, please: (i) delete the
message and all copies; (ii) do not disclose, distribute or use the message
in any manner; and (iii) notify the sender immediately. In addition, please
be aware that any message addressed to our domain is subject to archiving
and review by persons other than the intended recipient. Thank you.
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: GSOC: Qt front-end for freebsd-update

2013-04-14 Thread Fernando Apesteguía
On Sun, Apr 14, 2013 at 6:22 PM, Kimmo Paasiala kpaas...@gmail.com wrote:

 On Sun, Apr 14, 2013 at 7:17 PM, Eitan Adler li...@eitanadler.com wrote:
  On 14 April 2013 12:15, Kimmo Paasiala kpaas...@gmail.com wrote:
  I have to also ask, what would a GUI offer that the command line tools
  do not offer at the moment?
 
  A GUI.
 
 

 That's kind of given :D

 But does FreeBSD lack a GUI for ports/packages management? I don't see
 many requests for such things on the FreeBSD forums or on the mailing
 lists.


It seems we already have something similar in the ports[1] collection.
There is also a newer version[2] using Qt4 but it seems more limited. It
might be worth a look at those first.

[1] ports-mgmt/kports
[2] ports-mgmt/kports-qt4



 -Kimmo
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD in Google Code-In 2012? You can help too!

2012-10-24 Thread Fernando Apesteguía
On Wed, Oct 24, 2012 at 1:11 PM, Lars Engels lars.eng...@0x20.net wrote:
 On Tue, Oct 23, 2012 at 03:59:07PM -0400, Eitan Adler wrote:
 On 23 October 2012 12:54, David Magda dma...@ee.ryerson.ca wrote:
  On Tue, October 23, 2012 10:39, Fbsd8 wrote:
 
  The subject is Google Code-In and all the posted tasks are directed at
  creating documentation. Not one deals with coding any programs. If I was
  15-17 years old I sure would not be interested in writing documentation.
  I would want to use and develop my coding skills. To that end there a
  lot of simple PR's waiting for attention. This is an target area that
  young coders would find more interesting.
 
  It would depend on what one's interests were.

 Google code-in is aimed at *coders* and there is an expectation of
 people writing *code*.

 The biggest complaint for GCI last year was not enough coding tasks

 What about creating a new port? That is some kind of coding. If we can
 find some software that isn't ported, yet and not too hard to port (e.g.
 the wanted ports page in the wiki) we could make a task proposal of it.
 And one generic create a port for a piece of software that hasn't been
 ported, yet.
 Feel free to add me as a mentor for such a task.

Also related to that, what about writing a section about redports[1]
in the porter's handbook[2]?

And as a side question, shouldn't some (or all) of these tasks be
listed also in JuniorTasks[3]?

Just my two cents.

[1] https://redports.org/
[2] http://www.freebsd.org/doc/en/books/porters-handbook/book.html
[3] http://wiki.freebsd.org/JuniorJobs
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD in Google Code-In 2012? You can help too!

2012-10-24 Thread Fernando Apesteguía
On Wed, Oct 24, 2012 at 7:36 PM, Eitan Adler li...@eitanadler.com wrote:
 On 24 October 2012 13:24, Fernando Apesteguía
 fernando.apesteg...@gmail.com wrote:
 Also related to that, what about writing a section about redports[1]
 in the porter's handbook[2]?

 This is a good documentation task... but we need more *coding* tasks as well.

What about improving bsd ctags by adding a recursive mode like in GNU ctags?


 And as a side question, shouldn't some (or all) of these tasks be
 listed also in JuniorTasks[3]?

 I'll link the page: good point.
 --
 Eitan Adler
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: reason for magic crashes.

2012-06-24 Thread Fernando Apesteguía
On Sun, Jun 24, 2012 at 7:05 PM, Wojciech Puchar
woj...@wojtek.tensor.gdynia.pl wrote:
 i've got third crash third week in a row.


From you 5 days ago[1]:

it is unimportant as FreeBSD don't crash.
Man, I really don't understand a thing...

[1] 
http://freebsd.1045724.n5.nabble.com/Replacing-rc-8-Was-FreeBSD-Boot-Times-td5718636.html



 Every time in sunday after 18:00, every time with rsync process (which means
 rsync based backup that is done every day, not just in sunday!),

 you may see a crash (viewed from KVM) at

 http://www.tensor.gdynia.pl/~wojtek/crash.png

 what is important - syncing disk doesn't go on, system hangs here.

 For 99% system is not overheating at sunday, but i will be 100% sure as i
 added ipmitool sensor logged from cron every 5 minutes.

 Please give me an idea what to check.


 There is nothing in cron that is done at sunday.

 i don't run periodic stuff in /etc/crontab

 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Replacing rc(8) (Was: FreeBSD Boot Times)

2012-06-20 Thread Fernando Apesteguía
On Wed, Jun 20, 2012 at 10:59 AM, Atte Peltomäki atte.peltom...@iki.fi wrote:
 On Mon, Jun 18, 2012 at 03:53:26PM -0700, Doug Barton wrote:
 It's unfortunate that this thread evolved into a discussion about
 replacing rc.d, since that's almost certainly not relevant to the
 original topic of improving the overall boot time.

 Improving boot times can be done in two ways:

 1) Implement proper service dependency handling framework
 2) Implement ad-hoc service dependencies

 Second choice is obviously not kosher for all things BSD.

 *if* the first choice can be implemented into existing rc with
 reasonable amount of work and non-intrusively, it could be a viable
 approach.

 Otherwise it would make more sense to go ahead and implement a real
 improvement over existing system. In my view, this is a similar issue to
 what UFS2 had; rather breathe some life into old system without taking
 much risks and have ZFS take over later as a real improvement.

 In any case, improving boot times is the very least significant benefit
 from implementing service dependencies, especially for an OS such as
 FreeBSD which isn't meant to be rebooted except during OS upgrade.

Sorry, but as it's been said in this list, there are several use
patterns for FreeBSD. I use it in both a laptop and a PC and I boot
them every time I want to use them. Believe it or not I don't like let
them consuming energy and making noise during night, specially the
laptop :)

So please, let's assume FreeBSD has to be (re)booted from time to time
and not only for OS upgrades or when it crashes.

Also, in embedded systems, boot time is an important factor.


 --
 Atte Peltomäki
     atte.peltom...@iki.fi  http://kameli.org
 Your effort to remain what you are is what limits you
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Replacing rc(8) (Was: FreeBSD Boot Times)

2012-06-20 Thread Fernando Apesteguía
On Wed, Jun 20, 2012 at 3:23 PM, Mark Felder f...@feld.me wrote:
 On Wed, 20 Jun 2012 04:27:09 -0500, Fernando Apesteguía
 fernando.apesteg...@gmail.com wrote:

 Also, in embedded systems, boot time is an important factor.


 If you're designing a very specific embedded product based on FreeBSD why
 aren't you writing your own startup system? Why would anyone expect a
 general purpose out of the box OS to excel in a highly optimized embedded
 environment?

I didn't say I was designing anything, I just said it is a factor.
I've worked in some embedded projects in which the board had to be
rebooted from time to time. In that case we needed/wanted the system
to be up and running ASAP.

Anyway, being a general purpose OS we can not expect FreeBSD to be
installed on systems that almost never boot. That is not a reality
IMHO.


 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Replacing rc(8) (Was: FreeBSD Boot Times)

2012-06-18 Thread Fernando Apesteguía
On Tue, Jun 19, 2012 at 6:39 AM, Wojciech Puchar
woj...@wojtek.tensor.gdynia.pl wrote:
 replacing rc.d, since that's almost certainly not relevant to the
 original topic of improving the overall boot time.


 indeed.



 If you analyze the boot process thoroughly you should see that out of
 the total time taken to boot, nearly 0 is spent by rc.d actually doing
 something. Almost all of the actual time is spent waiting for other
 stuff, either the kernel (primarily) or the services that the system is
 running actually starting up.

 most of boot time consist of

 - delay in bootloader. setting autoboot_delay can partially delay it, delay
 to zero can be achieved by patching first stage booter that too add delay

 - delay in kernel initialization. making custom kernel helps of course but
 still it takes eg 10 seconds on my laptop. putting things that are not
 needed instantly at boot - as module - may help. USB being prime example.

 - delay at rc.d scripts - there are some delays inserted.


 The latter item is the only place where making changes to rc.d is going
 to help, and only then by parellelizing, and even then you are not
 really going to gain much since most things at boot time are serial.


 grep sleep /etc/rc.d/* usr/local/etc/rc.d/*



 So while talk of how to get your favorite boot-time manager into FreeBSD
 may be entertaining, it's not likely to be productive, and almost


 it is unimportant as FreeBSD don't crash.

Please, re-read already sent mails in this thread about that statement so we
don't get stuck in a loop.


 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Radeon, DRM and crash on 9.0

2012-05-20 Thread Fernando Apesteguía
On Sat, May 19, 2012 at 9:40 PM, Andriy Gapon a...@freebsd.org wrote:
 on 19/05/2012 17:52 Fernando Apesteguía said the following:
 Hi,

 I'm having some system crashes from time to time. I had this before
 but until recently I couldn't set my system so I could get crash
 dumps.

 My video card is a ATI Mobility Radeon 9700. I'm running FreeBSD
 9.0-RELEASE for amd64. These are excerpts from two crash dumps text
 files:

 core.txt.3:

 Fatal trap 28: machine check trap while in kernel mode
 cpuid = 0; apic id = 00
 instruction pointer     = 0x20:0x816480a3
 stack pointer           = 0x28:0xff804a5eb970
 frame pointer           = 0x28:0xff804a5eb990
 code segment            = base 0x0, limit 0xf, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
 processor eflags        = interrupt enabled, IOPL = 3
 current process         = 2254 (Xorg)
 trap number             = 28
 panic: machine check trap
 cpuid = 0
 KDB: stack backtrace:
 #0 0x80869abe at kdb_backtrace+0x5e
 #1 0x80833fb7 at panic+0x187
 #2 0x80b18b80 at trap_fatal+0x290
 #3 0x80b190c0 at trap+0x110
 #4 0x80b0396f at calltrap+0x8
 #5 0x816a305b at drm_ioctl+0x31b
 #6 0x8075597b at devfs_ioctl_f+0x7b
 #7 0x8087afb1 at kern_ioctl+0x111
 #8 0x8087b1df at sys_ioctl+0xef
 #9 0x80b18480 at amd64_syscall+0x450
 #10 0x80b03c57 at Xfast_syscall+0xf7


 Unread portion of the kernel message buffer:
 MCA: Bank 4, Status 0xb2070f0f
 MCA: Global Cap 0x0105, Status 0x0004
 MCA: Vendor AuthenticAMD, ID 0xf4a, APIC ID 0
 MCA: CPU 0 UNCOR PCC BUSLG ??? ERR Other timed out

 Did you notice that you were getting the machine check exceptions?
 You might want to google for this term.
 Anyway, there is sysutils/mcelog port and this is how mcelog utility decodes 
 the
 above report:
 HARDWARE ERROR. This is *NOT* a software problem!
 Please contact your hardware vendor
 CPU 0 4 northbridge
  Northbridge Watchdog error
       bit57 = processor context corrupt
       bit61 = error uncorrected
  bus error 'generic participation, request timed out
             generic error mem transaction
             generic access, level generic'
 STATUS b2070f0f MCGSTATUS 4
 MCGCAP 105 APICID 0 SOCKETID 0
 CPUID Vendor AMD Family 15 Model 4

Thanks for the reply.

I found some information about this specific error. It seems it could
be caused by overheating (among other things), and it's true this
laptop can become really hot at times. I'll have a look at it.

Thanks!



 core.txt.4

 Fatal trap 28: machine check trap while in kernel mode
 cpuid = 0; apic id = 00
 instruction pointer     = 0x20:0x816462b6
 stack pointer           = 0x28:0xff804a5eb930
 frame pointer           = 0x28:0xff804a5eb940
 code segment            = base 0x0, limit 0xf, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
 processor eflags        = interrupt enabled, IOPL = 3
 current process         = 2254 (Xorg)
 trap number             = 28
 panic: machine check trap
 cpuid = 0
 KDB: stack backtrace:
 #0 0x80869abe at kdb_backtrace+0x5e
 #1 0x80833fb7 at panic+0x187
 #2 0x80b18b80 at trap_fatal+0x290
 #3 0x80b190c0 at trap+0x110
 #4 0x80b0396f at calltrap+0x8
 #5 0x8164f3cc at radeon_cp_indirect+0x24c
 #6 0x816a305b at drm_ioctl+0x31b
 #7 0x8075597b at devfs_ioctl_f+0x7b
 #8 0x8087afb1 at kern_ioctl+0x111
 #9 0x8087b1df at sys_ioctl+0xef
 #10 0x80b18480 at amd64_syscall+0x450
 #11 0x80b03c57 at Xfast_syscall+0xf7

 dmesg | grep agp
 agp0: VIA 8385 host to PCI bridge on hostb0

 drm.ko is loaded and agp is included in kernel.

 AGP  for the card seems to be properly detected:

 dmesg | grep drm
 drm0: ATI Radeon RV350 Mobility 9600 M10 NP on vgapci0
 info: [drm] AGP at 0xe000 256MB
 info: [drm] Initialized radeon 1.31.0 20080613
 info: [drm] Setting GART location based on new memory map
 info: [drm] Loading R300 Microcode
 info: [drm] Num pipes: 1

 grep -i Direct rendering /var/log/Xorg.0.log
 (II) RADEON(0): Direct rendering enabled

 The crash is not easily reproducible but seems to be more likely to
 occur the more activity there is in the screen (like when scrolling a
 window quite fast).

 Any help is appreciated.

 Thanks in advance.
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org



 --
 Andriy Gapon
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: GSoC Project: Automated Kernel Crash Reporting System - Discussion

2012-05-16 Thread Fernando Apesteguía
On Tue, May 15, 2012 at 11:30 PM,  tza...@it.teithe.gr wrote:
 Hello Community,

 I have the project Automated Kernel Crash Reporting System for this GSoC
 and I would like to discuss my plans about it before starting the coding on
 May 21.

 I have created a page in the FreeBSD Wiki
 (http://wiki.freebsd.org/SummerOfCode2012/AutomatedKernelCrashReportingSystem)
 where I describe in details the architecture of the system.

 Here are some points that I would like to be discussed:

 * The implementation of the kcrashreporter is planned to be done in two
 shell scripts. The first shell script is a rc.d script and the second is the
 actual program. I choose to code it in shell because kcrashreporter invokes
 the kgdb to collect the necessary debugging information. I think that using
 the shell instead of traditional programming language for this kind of job
 is more straightforward and natural. Do you have a different opinion?

 * Can you recommend a secure way of sending a report from a FreeBSD system
 to the Central Collector machine?

 * Which data do you want kcrashreporter to collect? At the moment I have
 considered the panic message, the backtrace, the version level of the
 release, the hardware platform (uname -vm) and the configuration file of the
 panicked kernel (config -x `sysctl -n kern.bootfile`).

I wonder if it would be good to have a configuration file to specify
the amount of information (the type of, also) the system is going to
send.

Just my 2 cents.


 * Do you propose a different Web Server than the Apache HTTP Server? For
 example, on my initial planning I had included MySQL as the selected DBMS
 and after some discussions I changed to PostgreSQL.


 Any comment regarding the project is more than welcome.

 Thank you,
 Tzanetos

 
 This message was sent using IMP, the Internet Messaging Program.


 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FreeBSD supports kernel preemption?

2012-05-14 Thread Fernando Apesteguía
On Mon, May 14, 2012 at 4:39 AM, cz li willing...@gmail.com wrote:
 FreeBSD supports kernel preemption? Kernel preemption mechanism is
 what?Where can I find detailed information about it?

Just Google it.
Have a look at this[1]

[1] http://en.wikipedia.org/wiki/Preemption_%28computing%29


 Thank you!

 chao zhong li
 2012/05/14
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: hack.So: could not read symbols

2012-03-14 Thread Fernando Apesteguía
On Tue, Mar 13, 2012 at 10:34 PM, Fernando Apesteguía
fernando.apesteg...@gmail.com wrote:
 On Tue, Mar 13, 2012 at 12:23 AM, Ryan Stone ryst...@gmail.com wrote:
 2012/3/12 Fernando Apesteguía fernando.apesteg...@gmail.com:
 I'm using 9.0-RELEASE.

 I downloaded the snapshot 9.0-CURRENT-201012 and tried to build it's
 kernel but I get this error:

 hack.So: could not read symbols: File in wrong format

 file reports this:

 ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically
 linked, not stripped

 I compared this file with the same file generated during the
 compilation of the 9.0-RELEASE GENERIC kernel and they are identical.

 What's the problem here?

 I saw a similar issue trying to build a stable/8 kernel on
 9.0-RELEASE.  Doing a make kernel-toolchain before make buildkernel
 fixed the issue.

 Yep, that was it. Thank you!

 I was able to compile the kernel but it can not mount root fs. It
 reports error 19 (ENODEV). Weird. It tries to mount ada0p2 that is
 properly detected if I type ? when I get the mount prompt.

Any idea why this happens? My filesystem is UFS + SUJ. I tried also
with 9.0-RELEASE-201101 snapshot and it is unable to mount the root fs
too.

Thanks in advance.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: hack.So: could not read symbols

2012-03-13 Thread Fernando Apesteguía
On Tue, Mar 13, 2012 at 12:23 AM, Ryan Stone ryst...@gmail.com wrote:
 2012/3/12 Fernando Apesteguía fernando.apesteg...@gmail.com:
 I'm using 9.0-RELEASE.

 I downloaded the snapshot 9.0-CURRENT-201012 and tried to build it's
 kernel but I get this error:

 hack.So: could not read symbols: File in wrong format

 file reports this:

 ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically
 linked, not stripped

 I compared this file with the same file generated during the
 compilation of the 9.0-RELEASE GENERIC kernel and they are identical.

 What's the problem here?

 I saw a similar issue trying to build a stable/8 kernel on
 9.0-RELEASE.  Doing a make kernel-toolchain before make buildkernel
 fixed the issue.

Yep, that was it. Thank you!

I was able to compile the kernel but it can not mount root fs. It
reports error 19 (ENODEV). Weird. It tries to mount ada0p2 that is
properly detected if I type ? when I get the mount prompt.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


hack.So: could not read symbols

2012-03-12 Thread Fernando Apesteguía
I'm using 9.0-RELEASE.

I downloaded the snapshot 9.0-CURRENT-201012 and tried to build it's
kernel but I get this error:

hack.So: could not read symbols: File in wrong format

file reports this:

ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically
linked, not stripped

I compared this file with the same file generated during the
compilation of the 9.0-RELEASE GENERIC kernel and they are identical.

What's the problem here?

Thanks in advance
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: devd based AUTOMOUNTER

2012-02-20 Thread Fernando Apesteguía
On Mon, Feb 20, 2012 at 2:27 PM, vermaden verma...@interia.pl wrote:

 written by ${ME} ...

  First BUG: (not fixed yet, but workaround already is working)
 
  TEST/BUG/CASE:
  Plug in FAT32 and NTFS drives at the same time, when FAT32 device
  will be detected first, it will get mounted and the NTFS drive will be
  mounted TWICE, so I added  __check_already_mounted function
  to check if it is not already mounted.

 This BUG is fixed, I was in wrong assumption, that the script would
 be only executed for /dev/da0 but it was executed for every
 device/partition node that appeared separately, like /dev/da0,
 /dev/da0s1, /dev/da0s2 etc.

 Currently there is no knows bugs, but the prepared earlier
 'workaround functions' remain just in case.

 As I written before its now available here:
 https://github.com/vermaden/automount


What a nice piece of work.

I just downloaded it and try it on a FreeBSD 9.0-RELEASE with custom
kernel. It works like a charm. I tried three different USB devices without
noticing any problems (and I was very impolite when I unplugged them).

Thanks for this script.


 Regards,
 vermaden


















 ---
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


sysctl variable question

2011-12-18 Thread Fernando Apesteguía
Hi all,

I'm writing a small module just for fun. I would like to have two variables:

- pid of type unsigned int and RW so the user can set a pid
- process_name as a string RD that will display the process name
associated to that pid (or a message if the pid doesn't exist anymore)

My problem is with the handler functions. For process_name, as it is
read only, I wrote a simple handler that works fine. However, I want
to write another one for pid so I can sanitize the input (avoiding
pids  0 and so). As I understand, the handler I specify with
SYSCTL_OID will be called for both reads and writes. But, how can I
tell what kind of operation is it, so I know if I have to use
SYSCTL_OUT or SYSCTL_IN? I tried to have a look at sysctl_handle_int
but I don't fully understand what is going on with the arg1 parameter.
What is it for?

Thanks in advance.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: sysctl variable question

2011-12-18 Thread Fernando Apesteguía
El 18/12/2011 22:12, Julian Elischer jul...@freebsd.org escribió:

 On 12/18/11 12:18 PM, Fernando Apesteguía wrote:

 Hi all,

 I'm writing a small module just for fun. I would like to have two
variables:

 - pid of type unsigned int and RW so the user can set a pid
 - process_name as a string RD that will display the process name
 associated to that pid (or a message if the pid doesn't exist anymore)


 this is dangerous as there are some places in the kernel where processes
 are referenced by pid, so changing it may break kernel assumptions.

Sorry, i think i didn't explain it clearly. The pid variable is static in
my module and it is used just to tell the module which information it
should show in the other variable.


 My problem is with the handler functions. For process_name, as it is
 read only, I wrote a simple handler that works fine. However, I want
 to write another one for pid so I can sanitize the input (avoiding
 pids  0 and so). As I understand, the handler I specify with
 SYSCTL_OID will be called for both reads and writes. But, how can I
 tell what kind of operation is it, so I know if I have to use
 SYSCTL_OUT or SYSCTL_IN? I tried to have a look at sysctl_handle_int
 but I don't fully understand what is going on with the arg1 parameter.
 What is it for?

 Thanks in advance.
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org



___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Fileops in file.h

2010-11-08 Thread Fernando Apesteguía
2010/11/8 John Baldwin j...@freebsd.org:
 On Sunday, November 07, 2010 10:08:08 am Fernando Apesteguía wrote:
 Hi,

 I'm trying to understand  some pieces of the FreeBSD kernel.
 Having a look at struct fileops in file.h I was wondering why other
 file related functions don't have an entry in the function vector. I
 was thinking in mmap, fsync or sendfile.

 Can anyone tell me the reason?

 Mostly that it hasn't been done yet.  If there was a clean way to do an
 f_mmap() and get some of the type-specific knowledge out of vm_mmap.c I'd
 really like it.

Thanks.


 --
 John Baldwin
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Fileops in file.h

2010-11-07 Thread Fernando Apesteguía
Hi,

I'm trying to understand  some pieces of the FreeBSD kernel.
Having a look at struct fileops in file.h I was wondering why other
file related functions don't have an entry in the function vector. I
was thinking in mmap, fsync or sendfile.

Can anyone tell me the reason?

Thanks in advance.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Converting pointer to vm_offset_t

2010-05-06 Thread Fernando Apesteguía
Hi all,

Is there a way to convert a (char *) pointer (or in general any
pointer) to a vm_offset_t type?
I was thinking of sbuf_copyin, but I'm dealing with a process
different from current in kernel. I want to copy the pointer to kernel
space using a struct uio.

Thanks in advance.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Understanding proc_rwmem

2010-04-16 Thread Fernando Apesteguía
2010/4/14 John Baldwin j...@freebsd.org:
 On Wednesday 14 April 2010 4:22:56 pm Fernando Apesteguía wrote:
 Hi all,

 I'm trying to read process memory other than the current process in
 kernel. I was told to use the proc_rwmem function, however I can't get
 it working properly. At first, I'm trying to read how many elements
 the environment variables vector has. To do this I tried this from a
 linprocfs filler function:


         struct iovec iov;
       struct uio tmp_uio;
       struct ps_strings *pss;
       int ret_code;

       buff = malloc(sizeof(struct ps_strings), M_TEMP, M_WAITOK);
       memset(buff, 0, sizeof(struct ps_strings));

       PROC_LOCK_ASSERT(td-td_proc, MA_NOTOWNED);
       iov.iov_base = (caddr_t) buff;
       iov.iov_len = sizeof(struct ps_strings);
       tmp_uio.uio_iov = iov;
       tmp_uio.uio_iovcnt = 1;
       tmp_uio.uio_offset = (off_t)(p-p_sysent-sv_psstrings);
       tmp_uio.uio_resid = sizeof(struct ps_strings);
       tmp_uio.uio_segflg = UIO_USERSPACE;
       tmp_uio.uio_rw = UIO_READ;
       tmp_uio.uio_td = td;
       ret_code = proc_rwmem(td-td_proc, tmp_uio);

 I think you want to use 'p' instead of 'td-td_proc' here.  As it is you are
 reading from the current process instead of the target process I believe.

Thank you. You are right.

I made the changes suggested by both you and Kostik. I still have
random data when reading.
I'm trying to to the same thing using kern/sys_generic.c::read and
kern/sys_process.c::kern_ptrace
as examples, but I'm missing something...
After reading with proc_rwmem, is it possible to do something like the
following?

if (ret_code == 0) {
sbuf_printf(sb, proc_rwmem successfully executed: %d\n, 
ret_code);
} else {
sbuf_printf(sb, Error in proc_rwmem: %d\n, ret_code);
}

pss = (struct ps_strings *)(iov.iov_base);
sbuf_printf(sb, ps_nargvstr = %d\nps_nenvstr = %d\n,
pss-ps_nargvstr, pss-ps_nenvstr);

Thanks in advance.


 --
 John Baldwin

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Understanding proc_rwmem

2010-04-16 Thread Fernando Apesteguía
2010/4/16 John Baldwin j...@freebsd.org:
 On Friday 16 April 2010 8:11:25 am Fernando Apesteguía wrote:
 2010/4/14 John Baldwin j...@freebsd.org:
  On Wednesday 14 April 2010 4:22:56 pm Fernando Apesteguía wrote:
  Hi all,
 
  I'm trying to read process memory other than the current process in
  kernel. I was told to use the proc_rwmem function, however I can't get
  it working properly. At first, I'm trying to read how many elements
  the environment variables vector has. To do this I tried this from a
  linprocfs filler function:
 
 
          struct iovec iov;
        struct uio tmp_uio;
        struct ps_strings *pss;
        int ret_code;
 
        buff = malloc(sizeof(struct ps_strings), M_TEMP, M_WAITOK);
        memset(buff, 0, sizeof(struct ps_strings));
 
        PROC_LOCK_ASSERT(td-td_proc, MA_NOTOWNED);
        iov.iov_base = (caddr_t) buff;
        iov.iov_len = sizeof(struct ps_strings);
        tmp_uio.uio_iov = iov;
        tmp_uio.uio_iovcnt = 1;
        tmp_uio.uio_offset = (off_t)(p-p_sysent-sv_psstrings);
        tmp_uio.uio_resid = sizeof(struct ps_strings);
        tmp_uio.uio_segflg = UIO_USERSPACE;
        tmp_uio.uio_rw = UIO_READ;
        tmp_uio.uio_td = td;
        ret_code = proc_rwmem(td-td_proc, tmp_uio);
 
  I think you want to use 'p' instead of 'td-td_proc' here.  As it is you
 are
  reading from the current process instead of the target process I believe.

 Thank you. You are right.

 I made the changes suggested by both you and Kostik. I still have
 random data when reading.
 I'm trying to to the same thing using kern/sys_generic.c::read and
 kern/sys_process.c::kern_ptrace
 as examples, but I'm missing something...
 After reading with proc_rwmem, is it possible to do something like the
 following?

 if (ret_code == 0) {
               sbuf_printf(sb, proc_rwmem successfully executed: %d\n, 
 ret_code);
 } else {
               sbuf_printf(sb, Error in proc_rwmem: %d\n, ret_code);
 }

 pss = (struct ps_strings *)(iov.iov_base);
 sbuf_printf(sb, ps_nargvstr = %d\nps_nenvstr = %d\n,
 pss-ps_nargvstr, pss-ps_nenvstr);

 Thanks in advance.

 No, functions like uiomove() modify the iovec structures.  Just use 'buff'
 instead of iov.iov_base.

Ah! That was it!

Thanks!


 --
 John Baldwin

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Understanding proc_rwmem

2010-04-15 Thread Fernando Apesteguía
On Wed, Apr 14, 2010 at 11:35 PM, Kostik Belousov kostik...@gmail.com wrote:
 On Wed, Apr 14, 2010 at 05:21:00PM -0400, John Baldwin wrote:
 On Wednesday 14 April 2010 4:22:56 pm Fernando Apestegu?a wrote:
  Hi all,
 
  I'm trying to read process memory other than the current process in
  kernel. I was told to use the proc_rwmem function, however I can't get
  it working properly. At first, I'm trying to read how many elements
  the environment variables vector has. To do this I tried this from a
  linprocfs filler function:
 
 
          struct iovec iov;
      struct uio tmp_uio;
      struct ps_strings *pss;
      int ret_code;
 
      buff = malloc(sizeof(struct ps_strings), M_TEMP, M_WAITOK);
      memset(buff, 0, sizeof(struct ps_strings));
 
      PROC_LOCK_ASSERT(td-td_proc, MA_NOTOWNED);
      iov.iov_base = (caddr_t) buff;
      iov.iov_len = sizeof(struct ps_strings);
      tmp_uio.uio_iov = iov;
      tmp_uio.uio_iovcnt = 1;
      tmp_uio.uio_offset = (off_t)(p-p_sysent-sv_psstrings);
      tmp_uio.uio_resid = sizeof(struct ps_strings);
      tmp_uio.uio_segflg = UIO_USERSPACE;
      tmp_uio.uio_rw = UIO_READ;
      tmp_uio.uio_td = td;
      ret_code = proc_rwmem(td-td_proc, tmp_uio);

 I think you want to use 'p' instead of 'td-td_proc' here.  As it is you are
 reading from the current process instead of the target process I believe.

 And UIO_USERSPACE sound suspicious. Note that segment flag
 is for the requestor address space.

Ugh, sorry. Copy-paste error. Yes, that should be UIO_SYSSPACE.


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Understanding proc_rwmem

2010-04-14 Thread Fernando Apesteguía
Hi all,

I'm trying to read process memory other than the current process in
kernel. I was told to use the proc_rwmem function, however I can't get
it working properly. At first, I'm trying to read how many elements
the environment variables vector has. To do this I tried this from a
linprocfs filler function:


struct iovec iov;
struct uio tmp_uio;
struct ps_strings *pss;
int ret_code;

buff = malloc(sizeof(struct ps_strings), M_TEMP, M_WAITOK);
memset(buff, 0, sizeof(struct ps_strings));

PROC_LOCK_ASSERT(td-td_proc, MA_NOTOWNED);
iov.iov_base = (caddr_t) buff;
iov.iov_len = sizeof(struct ps_strings);
tmp_uio.uio_iov = iov;
tmp_uio.uio_iovcnt = 1;
tmp_uio.uio_offset = (off_t)(p-p_sysent-sv_psstrings);
tmp_uio.uio_resid = sizeof(struct ps_strings);
tmp_uio.uio_segflg = UIO_USERSPACE;
tmp_uio.uio_rw = UIO_READ;
tmp_uio.uio_td = td;
ret_code = proc_rwmem(td-td_proc, tmp_uio);

if (ret_code == 0) {
sbuf_printf(sb, proc_rwmem successfully executed: %d\n, 
ret_code);
} else {
sbuf_printf(sb, Error in proc_rwmem: %d\n, ret_code);
}

pss = (struct ps_strings *)(iov.iov_base);
sbuf_printf(sb, ps_nargvstr = %d\nps_nenvstr = %d\n,
pss-ps_nargvstr, pss-ps_nenvstr);

free(buff, M_TEMP);

Considering I left security and error handling aside, what is wrong
with the code above?
proc_rwmem returns 0 indicating no failure, but when I try to print
the result, I get random stuff. I thought maybe the problem is in the
uio_offset field, but p-p_sysent-sv_psstrings is a vm_offset_t. Is
the offset properly specified? If not, what else could be the problem?

Thanks in advance.

PS: I posted a similar question at forums.freebsd.org but got no
answer, that is why I ask here.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: linprocfs proc/pid/environ patch list question

2010-02-19 Thread Fernando Apesteguía
2010/2/18 Kostik Belousov kostik...@gmail.com:
 On Thu, Feb 18, 2010 at 06:48:35PM +0100, Fernando Apestegu?a wrote:
 On Wed, Feb 17, 2010 at 8:11 PM, Kostik Belousov kostik...@gmail.com wrote:
  On Wed, Feb 17, 2010 at 07:51:06PM +0100, Fernando Apestegu?a wrote:
  Hi,
 
  I have a small patch (against 8.0-RELEASE-p2) that _should_ implement
  the /proc/pid/environ file
  under linprocfs.
  However, it seems it does not work properly but I don't know what I'm
  doing wrong.
  Is this list the place to ask for help? I tried in the forums[1] but
  got no answer.
  Putting aside any does not work questions, please see comment below.

 Sorry I didn't explain this. If I have a process forked from bash
 shell in which I have
 exported VAR= the /compat/linux/proc/pid/environ for the child process
 does not show the VAR variable.
 Copyin copies the data from the address space of the current process.
 You are interested in the content of address space of different process.
 Look at the proc_rwmem().

Thanks



 
  Don't we have a 'kernel newbies'-like list?
 
  Thanks in advance.
 
  [1] http://forums.freebsd.org/showthread.php?t=11329
 
  --- sys/compat/linprocfs/linprocfs.c.orig     2009-10-25 
  02:10:29.0 +0100
  +++ sys/compat/linprocfs/linprocfs.c  2010-02-16 19:38:36.0 +0100
  @@ -939,8 +939,38 @@
   static int
   linprocfs_doprocenviron(PFS_FILL_ARGS)
   {
  +     int i, error;
  +     struct ps_strings pss;
  +     char **ps_envstr;
 
  -     sbuf_printf(sb, doprocenviron\n%c, '\0');
  +     PROC_LOCK(p);
  +     if (p_cansee(td, p) != 0)
  +             return (0);
  +     PROC_UNLOCK(p);
  +
  +     error = copyin((void *)p-p_sysent-sv_psstrings, pss,
  +                                         sizeof(pss));
  +     if (error)
  +             return (error);
  +
  +     ps_envstr = malloc(pss.ps_nenvstr * sizeof(char *),
  +         M_TEMP, M_WAITOK);
  This is essentially panic me code.  ps_nenvstr is user-controlled,
  and allows to specify arbitrary integers.
 
  Even ignoring exhaustion of the kernel map, it can cause allocation of
  big amount of physical memory. Note that execve(2) implementation uses
  swappable memory to store arguments and environment strings passed from
  vm spaces.

 Thanks for the comment. If I want to check ps_envstr, which threshold would 
 be
 reasonable? PAGE_SIZE maybe?

 Thanks again.

 
  +
  +     error = copyin((void *)pss.ps_envstr, ps_envstr,
  +         pss.ps_nenvstr * sizeof(char *));
  +
  +     if (error) {
  +             free(ps_envstr, M_TEMP);
  +             return (error);
  +     }
  +
  +     /* NULL separated list of variable=value pairs */
  +
  +     for (i = 0; i  pss.ps_nenvstr; i++) {
  +             sbuf_copyin(sb, ps_envstr[i], 0);
  +     }
  +
  +     free(ps_envstr, M_TEMP);
        return (0);
   }
  ___
  freebsd-hackers@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
  To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
 

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: linprocfs proc/pid/environ patch list question

2010-02-18 Thread Fernando Apesteguía
On Wed, Feb 17, 2010 at 8:11 PM, Kostik Belousov kostik...@gmail.com wrote:
 On Wed, Feb 17, 2010 at 07:51:06PM +0100, Fernando Apestegu?a wrote:
 Hi,

 I have a small patch (against 8.0-RELEASE-p2) that _should_ implement
 the /proc/pid/environ file
 under linprocfs.
 However, it seems it does not work properly but I don't know what I'm
 doing wrong.
 Is this list the place to ask for help? I tried in the forums[1] but
 got no answer.
 Putting aside any does not work questions, please see comment below.

Sorry I didn't explain this. If I have a process forked from bash
shell in which I have
exported VAR= the /compat/linux/proc/pid/environ for the child process
does not show the VAR variable.


 Don't we have a 'kernel newbies'-like list?

 Thanks in advance.

 [1] http://forums.freebsd.org/showthread.php?t=11329

 --- sys/compat/linprocfs/linprocfs.c.orig     2009-10-25 02:10:29.0 
 +0100
 +++ sys/compat/linprocfs/linprocfs.c  2010-02-16 19:38:36.0 +0100
 @@ -939,8 +939,38 @@
  static int
  linprocfs_doprocenviron(PFS_FILL_ARGS)
  {
 +     int i, error;
 +     struct ps_strings pss;
 +     char **ps_envstr;

 -     sbuf_printf(sb, doprocenviron\n%c, '\0');
 +     PROC_LOCK(p);
 +     if (p_cansee(td, p) != 0)
 +             return (0);
 +     PROC_UNLOCK(p);
 +
 +     error = copyin((void *)p-p_sysent-sv_psstrings, pss,
 +                                         sizeof(pss));
 +     if (error)
 +             return (error);
 +
 +     ps_envstr = malloc(pss.ps_nenvstr * sizeof(char *),
 +         M_TEMP, M_WAITOK);
 This is essentially panic me code.  ps_nenvstr is user-controlled,
 and allows to specify arbitrary integers.

 Even ignoring exhaustion of the kernel map, it can cause allocation of
 big amount of physical memory. Note that execve(2) implementation uses
 swappable memory to store arguments and environment strings passed from
 vm spaces.

Thanks for the comment. If I want to check ps_envstr, which threshold would be
reasonable? PAGE_SIZE maybe?

Thanks again.


 +
 +     error = copyin((void *)pss.ps_envstr, ps_envstr,
 +         pss.ps_nenvstr * sizeof(char *));
 +
 +     if (error) {
 +             free(ps_envstr, M_TEMP);
 +             return (error);
 +     }
 +
 +     /* NULL separated list of variable=value pairs */
 +
 +     for (i = 0; i  pss.ps_nenvstr; i++) {
 +             sbuf_copyin(sb, ps_envstr[i], 0);
 +     }
 +
 +     free(ps_envstr, M_TEMP);
       return (0);
  }
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


linprocfs proc/pid/environ patch list question

2010-02-17 Thread Fernando Apesteguía
Hi,

I have a small patch (against 8.0-RELEASE-p2) that _should_ implement
the /proc/pid/environ file
under linprocfs.
However, it seems it does not work properly but I don't know what I'm
doing wrong.
Is this list the place to ask for help? I tried in the forums[1] but
got no answer.

Don't we have a 'kernel newbies'-like list?

Thanks in advance.

[1] http://forums.freebsd.org/showthread.php?t=11329

--- sys/compat/linprocfs/linprocfs.c.orig   2009-10-25 02:10:29.0 
+0100
+++ sys/compat/linprocfs/linprocfs.c2010-02-16 19:38:36.0 +0100
@@ -939,8 +939,38 @@
 static int
 linprocfs_doprocenviron(PFS_FILL_ARGS)
 {
+   int i, error;
+   struct ps_strings pss;
+   char **ps_envstr;

-   sbuf_printf(sb, doprocenviron\n%c, '\0');
+   PROC_LOCK(p);
+   if (p_cansee(td, p) != 0)
+   return (0);
+   PROC_UNLOCK(p);
+
+   error = copyin((void *)p-p_sysent-sv_psstrings, pss,
+   sizeof(pss));
+   if (error)
+   return (error);
+
+   ps_envstr = malloc(pss.ps_nenvstr * sizeof(char *),
+   M_TEMP, M_WAITOK);
+
+   error = copyin((void *)pss.ps_envstr, ps_envstr,
+   pss.ps_nenvstr * sizeof(char *));
+
+   if (error) {
+   free(ps_envstr, M_TEMP);
+   return (error);
+   }
+
+   /* NULL separated list of variable=value pairs */
+   
+   for (i = 0; i  pss.ps_nenvstr; i++) {
+   sbuf_copyin(sb, ps_envstr[i], 0);
+   }
+
+   free(ps_envstr, M_TEMP);
return (0);
 }
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: [PATCH] linprocfs dofilesystems

2010-01-27 Thread Fernando Apesteguía
2010/1/27 John Baldwin j...@freebsd.org:
 On Tuesday 26 January 2010 4:52:35 pm Fernando Apesteguía wrote:
 2010/1/15 John Baldwin j...@freebsd.org:
  On Friday 08 January 2010 12:19:29 pm Fernando Apesteguía wrote:
  Hi all,
 
  This patch implements the filesystems file in the linux proc fs.
  I have used it for some time without seeing any problems. Let me
  know in case this is useful.
 
  Tested against 8.0-RELEASE-p1
 
  This patch is not correct.  It seems that /proc/filesystems is a list of
  available filesystems, not a list of mounted filesystems.  E.g.:
 
  cat /proc/filesystems
  nodev   sysfs
  nodev   rootfs
  nodev   bdev
  nodev   proc
  nodev   sockfs
  nodev   binfmt_misc
  nodev   usbfs
  nodev   usbdevfs
  nodev   futexfs
  nodev   tmpfs
  nodev   pipefs
  nodev   eventpollfs
  nodev   devpts
         ext2
  nodev   ramfs
  nodev   hugetlbfs
         iso9660
  nodev   relayfs
  nodev   mqueue
         ext3
  nodev   rpc_pipefs
  nodev   nfs
  nodev   nfs4
  nodev   autofs
 
  To do the same thing in FreeBSD you would need to walk the vfsconf list
  instead.  However, I'm not sure it is worth it to add this unless there
  are apps people commonly use that need it.

 You are right. I have another patch to do the right thing. However as
 you pointed
 out maybe it is not useful after all. Is it possible to delete the PR?

 Sorry for the noise

 PS: My current patch does not distinguish between common filesystems
 and pseudo filesystems, where could I find that info?

 Cheers

 Hmm, I'm not sure if there is an easy way to distinguish psuedo filesystems
 from device-backed filesystems.  Hmm, maybe the VFCF_SYNTHETIC flag?  If
 you have an updated patch I'm ok with reviewing it.  What programs are you
 using that use this file in linprocfs?

I don't need the file right now. I did it for completeness although it
could help to
procinfo[1] gsysinfo[2] and a personal application I wrote some time ago[3].
I am not a kernel developer, but I found this interesting as an exercise.
That is the main reason I tried to implement this file.

The new patch is attached. VFCF_SYNTHETIC seems to work fine as this patch shows
in my system:

$ cat /compat/linux/proc/filesystems
nodev   procfs
cd9660
nfs
nodev   devfs
ufs
msdosfs
nodev   linprocfs
ntfs

I suspect using procfs is not the most portable way of gathering
information in a UNIX system
Am I right? If so, what is the preferred way? Using sysctl?

Thanks.

/* Patch begin */
--- linprocfs.c.orig2009-10-25 02:10:29.0 +0100
+++ linprocfs.c 2010-01-27 21:10:08.0 +0100
@@ -1227,6 +1227,24 @@
return (0);
 }

+/*
+ * Filler function for proc/filesystems
+ */
+
+static int
+linprocfs_dofilesystems(PFS_FILL_ARGS)
+{
+   struct vfsconf *vfsp;
+
+   TAILQ_FOREACH(vfsp, vfsconf, vfc_list) {
+   if (vfsp-vfc_flags  VFCF_SYNTHETIC)
+   sbuf_printf(sb, nodev);
+   sbuf_printf(sb, \t%s\n, vfsp-vfc_name);
+   }
+
+   return(0);
+}
+
 #if 0
 /*
  * Filler function for proc/modules
@@ -1266,6 +1284,8 @@
NULL, NULL, NULL, PFS_RD);
pfs_create_file(root, meminfo, linprocfs_domeminfo,
NULL, NULL, NULL, PFS_RD);
+   pfs_create_file(root, filesystems, linprocfs_dofilesystems,
+   NULL, NULL, NULL, PFS_RD);
 #if 0
pfs_create_file(root, modules, linprocfs_domodules,
NULL, NULL, NULL, PFS_RD);
/* Patch end*/


[1] http://linux.die.net/man/8/procinfo
[2] http://sourceforge.net/projects/gsysinfo/
[3] http://lkmonitor.sf.net






 --
 John Baldwin

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: [PATCH] linprocfs dofilesystems

2010-01-26 Thread Fernando Apesteguía
2010/1/15 John Baldwin j...@freebsd.org:
 On Friday 08 January 2010 12:19:29 pm Fernando Apesteguía wrote:
 Hi all,

 This patch implements the filesystems file in the linux proc fs.
 I have used it for some time without seeing any problems. Let me
 know in case this is useful.

 Tested against 8.0-RELEASE-p1

 This patch is not correct.  It seems that /proc/filesystems is a list of
 available filesystems, not a list of mounted filesystems.  E.g.:

 cat /proc/filesystems
 nodev   sysfs
 nodev   rootfs
 nodev   bdev
 nodev   proc
 nodev   sockfs
 nodev   binfmt_misc
 nodev   usbfs
 nodev   usbdevfs
 nodev   futexfs
 nodev   tmpfs
 nodev   pipefs
 nodev   eventpollfs
 nodev   devpts
        ext2
 nodev   ramfs
 nodev   hugetlbfs
        iso9660
 nodev   relayfs
 nodev   mqueue
        ext3
 nodev   rpc_pipefs
 nodev   nfs
 nodev   nfs4
 nodev   autofs

 To do the same thing in FreeBSD you would need to walk the vfsconf list
 instead.  However, I'm not sure it is worth it to add this unless there
 are apps people commonly use that need it.

You are right. I have another patch to do the right thing. However as
you pointed
out maybe it is not useful after all. Is it possible to delete the PR?

Sorry for the noise

PS: My current patch does not distinguish between common filesystems
and pseudo filesystems, where could I find that info?

Cheers


 --
 John Baldwin

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: [PATCH] linprocfs dofilesystems

2010-01-10 Thread Fernando Apesteguía
2010/1/10 Gary Jennejohn gary.jennej...@freenet.de:
 On Fri, 8 Jan 2010 18:19:29 +0100
 Fernando Apestegu__a fernando.apesteg...@gmail.com wrote:

 Hi all,

 This patch implements the filesystems file in the linux proc fs.
 I have used it for some time without seeing any problems. Let me
 know in case this is useful.

 Tested against 8.0-RELEASE-p1

 Thanks

 You should file a PR with this, if you haven't done so already.

 Patches which are only sent to mailing lists tend to get lost.

Done.

misc/142595


 ---
 Gary Jennejohn

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: [PATCH] linprocfs dofilesystems

2010-01-10 Thread Fernando Apesteguía
2010/1/10 Jilles Tjoelker jil...@stack.nl:
 On Fri, Jan 08, 2010 at 06:19:29PM +0100, Fernando Apesteguía wrote:
 This patch implements the filesystems file in the linux proc fs.
 I have used it for some time without seeing any problems. Let me
 know in case this is useful.

 Concrete examples of Linux apps that start working or work better with
 this change will be helpful.

Some small utilities as procinfo[1] and other system information
apps[2], but it is not the most used file under /proc. I did this
mostly because I wanted/needed to test my own application.

Cheers.

[1] http://linux.die.net/man/8/procinfo
[2] http://sourceforge.net/projects/gsysinfo/


 --
 Jilles Tjoelker

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


[PATCH] linprocfs dofilesystems

2010-01-08 Thread Fernando Apesteguía
Hi all,

This patch implements the filesystems file in the linux proc fs.
I have used it for some time without seeing any problems. Let me
know in case this is useful.

Tested against 8.0-RELEASE-p1

Thanks


patch.linprocfs.filesystems
Description: Binary data
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

linprocfs Input/output error

2010-01-01 Thread Fernando Apesteguía
Hi all, I post here cause I didn't get any answers in freebsd-emulation.

In 8.0-RELEASE-p1 if I try to execute this:

cat /compat/linux/proc/cpuinfo  ~/cpuinfo.txt

I get

cat: /compat/linux/proc/cpuinfo: Input/output error

truss shows the read system call returns ERR#5. It is the same with
other files from linprocfs.

cat /compat/linux/proc/[any_file] works fine

What am I missing?

Thanks in advance
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: linprocfs Input/output error

2010-01-01 Thread Fernando Apesteguía
2010/1/1 Jilles Tjoelker jil...@stack.nl:
 On Fri, Jan 01, 2010 at 06:45:33PM +0100, Fernando Apesteguía wrote:
 Hi all, I post here cause I didn't get any answers in freebsd-emulation.

 In 8.0-RELEASE-p1 if I try to execute this:

 cat /compat/linux/proc/cpuinfo  ~/cpuinfo.txt

 I get

 cat: /compat/linux/proc/cpuinfo: Input/output error

 truss shows the read system call returns ERR#5. It is the same with
 other files from linprocfs.

 cat /compat/linux/proc/[any_file] works fine

 What am I missing?

 You are not missing anything, this is a bug. A while ago, cat(1) was
 changed to use larger buffers when writing to regular files on machines
 with sufficient RAM, usually a multiple of MAXPHYS. On the other hand,
 pseudofs (the general framework for filesystems such as procfs,
 linprocfs and linsysfs) in src/sys/fs/pseudofs/pseudofs_vnops.c
 pfs_read() fails any read over MAXPHYS + 1 with EIO. This limit probably
 has to do with the allocation of a buffer of that size using sbuf_new(9)
 (and so, malloc(9)).

 Some sort of limit seems appropriate, but MAXPHYS seems unrelated, and
 if the request is too long it should perhaps just truncate it.

Thanks a lot for the explanation.


 --
 Jilles Tjoelker

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FBSD 7.0-p3 NIC driver problem (Realtek)

2009-02-22 Thread Fernando Apesteguía
On Sat, Feb 21, 2009 at 2:55 AM, Pyun YongHyeon pyu...@gmail.com wrote:
 On Fri, Feb 20, 2009 at 05:25:26PM +0100, Fernando Apestegu?a wrote:
 Hi all,

 I copy here the mail I sent to freebsd-questions cause I didn't get any 
 answers:


 Yesterday I updated to 7.1-p3 on AMD64 arch.

 Since then, the NIC is not detected anymore. ifconfig doesn't show it
 and I can't connect to the Internet.

 There were well-known issues with this NIC model before,
 (http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2008-11/msg00299.html)
  but the weird thing is that it seemed to be fine with
 7.1-RELEASE and newer till this -p3.

 It doesn't recognize the card in 4/5 boot sequences (really annoying).

 Anybody with this problem?

 I'm not sure you're suffering from MAC power saving issue of
 RealTek PCIe controller. Sometimes re(4) used to fail to wakeup the
 controller which in turn resulted in 'no driver' for the
 controller. If this is the case you can see MII without any phy!
 message in dmesg output.

You are right, I see that message.

 r188358(cvs if_re.c 1.95.2.40) should fix the issue so please try
 latest 7-stable or copy if_re.c, if_rlreg.h and if_rl.c from HEAD/
 7-stable to your 7.1-RELEASE box and rebuild kernel.
 If you still see the same issue please let me know.

I copied the files and restarted my computer 5 times and the NIC was
present in all of them.
I will watch this issue and I will let you know if I notice more problems.

Thanks so much for your help.


 Btw, stable@ is more appropriate list for this type of issues.

Even if I'm not using -STABLE?

Cheers.



___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FBSD 7.0-p3 NIC driver problem (Realtek)

2009-02-22 Thread Fernando Apesteguía
On 2/23/09, Pyun YongHyeon pyu...@gmail.com wrote:
 On Sun, Feb 22, 2009 at 06:15:55PM +0100, Fernando Apestegu?a wrote:
  On Sat, Feb 21, 2009 at 2:55 AM, Pyun YongHyeon pyu...@gmail.com wrote:
   On Fri, Feb 20, 2009 at 05:25:26PM +0100, Fernando Apestegu?a wrote:
   Hi all,
  
   I copy here the mail I sent to freebsd-questions cause I didn't get any 
   answers:
  
  
   Yesterday I updated to 7.1-p3 on AMD64 arch.
  
   Since then, the NIC is not detected anymore. ifconfig doesn't show it
   and I can't connect to the Internet.
  
   There were well-known issues with this NIC model before,
   (http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2008-11/msg00299.html)
but the weird thing is that it seemed to be fine with
   7.1-RELEASE and newer till this -p3.
  
   It doesn't recognize the card in 4/5 boot sequences (really annoying).
  
   Anybody with this problem?
  
   I'm not sure you're suffering from MAC power saving issue of
   RealTek PCIe controller. Sometimes re(4) used to fail to wakeup the
   controller which in turn resulted in 'no driver' for the
   controller. If this is the case you can see MII without any phy!
   message in dmesg output.
 
  You are right, I see that message.
 
   r188358(cvs if_re.c 1.95.2.40) should fix the issue so please try
   latest 7-stable or copy if_re.c, if_rlreg.h and if_rl.c from HEAD/
   7-stable to your 7.1-RELEASE box and rebuild kernel.
   If you still see the same issue please let me know.
 
  I copied the files and restarted my computer 5 times and the NIC was
  present in all of them.

 Glad to hear that.

  I will watch this issue and I will let you know if I notice more problems.
 
  Thanks so much for your help.
 

 No problem.

  
   Btw, stable@ is more appropriate list for this type of issues.
 
  Even if I'm not using -STABLE?
 

 Yes, you're not using CURRENT.

OK, I'll keep that in mind.


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


FBSD 7.0-p3 NIC driver problem (Realtek)

2009-02-20 Thread Fernando Apesteguía
Hi all,

I copy here the mail I sent to freebsd-questions cause I didn't get any answers:


Yesterday I updated to 7.1-p3 on AMD64 arch.

Since then, the NIC is not detected anymore. ifconfig doesn't show it
and I can't connect to the Internet.

There were well-known issues with this NIC model before,
(http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2008-11/msg00299.html)
 but the weird thing is that it seemed to be fine with
7.1-RELEASE and newer till this -p3.

It doesn't recognize the card in 4/5 boot sequences (really annoying).

Anybody with this problem?

Thanks in advance.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: FBSD 7.0-p3 NIC driver problem (Realtek)

2009-02-20 Thread Fernando Apesteguía
On Fri, Feb 20, 2009 at 7:15 PM, Warren Block wbl...@wonkity.com wrote:
 On Fri, 20 Feb 2009, Fernando Apestegu?a wrote:

 Yesterday I updated to 7.1-p3 on AMD64 arch.

 Since then, the NIC is not detected anymore. ifconfig doesn't show it
 and I can't connect to the Internet.

 There were well-known issues with this NIC model before,

 (http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2008-11/msg00299.html)
 but the weird thing is that it seemed to be fine with
 7.1-RELEASE and newer till this -p3.

 Please identify the NIC more precisely with

pciconf -lv | grep -B2 Ethernet

r...@pci0:2:0:0:class=0x02 card=0x2a6f103c chip=0x816810ec rev=0x02 
hdr=0x00
vendor = 'Realtek Semiconductor'
device = 'RTL8168/8111 PCI-E Gigabit Ethernet NIC'


 It doesn't recognize the card in 4/5 boot sequences (really annoying).

 Anybody with this problem?

 If you can do 'ifconfig re0' and then the NIC is active, see this:

No, I can't. The re0 interface is not present. After executing the
command it is still missing.

Thanks for the help. Should you need more information or me doing some
tests, just tell me.


 http://www.freebsd.org/cgi/query-pr.cgi?pr=130586cat=

 -Warren Block * Rapid City, South Dakota USA

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Fwd: FBSD 7.1 BETA2 and RTL8168/8111 problem

2008-11-28 Thread Fernando Apesteguía
Hi,

I forward my orginal mail to freebsd-questions. I hope someone can
shed some light here...


-- Forwarded message --
From: Fernando Apesteguía [EMAIL PROTECTED]
Date: Fri, Nov 28, 2008 at 9:33 AM
Subject: FBSD 7.1 BETA2 and RTL8168/8111 problem
To: FreeBSD [EMAIL PROTECTED]


Hi all,

I recently installed FreeBSD 7.1 BETA2 on my system. During
installation using FTP option, I could notice the following:

After some random time (two, five or six minutes, for instance) the
installation stalled and sysinstall lost the connection. I was taken
back to the Select FTP site screen, and I had to configure my NIC
again. Then, the install resumed and I got a usable system (MINIMAL +
docs + manpages)

But the problem persists. From time to time, it seems the kernel can't
see the NIC. It happens during normal operation and no message is
shown in /var/log/messages. ifconfig doesn't show my 're0' device, so
I can't run dhclient on it and I have to reboot. I have to say that
sometimes, even when I reboot, the NIC (RTL8168/8111 PCI Express) is
not present.

This device works fine in the same computer with either Vista or
Fedora 9, though I have to say I had similar problems with earlier
versions of Fedora (device disappearing or not present after boot),
but after a kernel upgrade everything run smoothly.

Does FreeBSD use the same driver than Linux does? Anybody else with
this problem?

Thanks in advance.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: reading a file in kernelmode

2008-07-17 Thread Fernando Apesteguía
On 7/17/08, Marc Lörner [EMAIL PROTECTED] wrote:
 Hello David!

 On Thursday 17 July 2008 01:46, David wrote:
  Hello,
 
 
 
  I'm developing a FreeBSD kernel module and I'm searching for a good
  solution to open/read/close a file.
 
  My goal is to generate a MD5-Hash of a given file (path).
 
 
 
  Open-Syscall  seems to be improper.
 
 
 
  Any ideas/solutions/examples?
 

 Look at file kern/kern_ktrace.c at the use of vn_open in function
 ktrace(td, uap) and VOP_WRITE in function
 ktr_writerequest(struct thread *td, struct ktr_request *req)

 I think reading is done quite analogue to writing in case above.

Hi,

I'm just curious, is it proper to read a file from kernel space? Is it
something the kernel is supposed to do?

Thanks in advance.

 HTH,
 Marc
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to [EMAIL PROTECTED]

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD 7 64 bits kernel crash debugging

2008-07-08 Thread Fernando Apesteguía
On Thu, Jul 3, 2008 at 4:52 PM, Alexander Sack [EMAIL PROTECTED] wrote:
 On Wed, Jul 2, 2008 at 12:50 PM, Fernando Apesteguía
 [EMAIL PROTECTED] wrote:
 Hi all,

 I'm experiencing several kernel crashes with the GENERIC kernel and
 with custom kernels as well. One of my MP3 players seems to be
 recognized, but if I disconnect it from the USB port (even without
 mounting the device), I got a kernel crash.

 I've tried to follow the instructions at
 http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug.html
 I have dumpdev and dumpdir properly set to my swap partition (ad0s2b)
 and to /var/crash.

 However, during the next boot, I got a message that indicates it is
 looking for a dump on such device but it couldn't find any.

 How can I track this error?

 Have you enabled at least KDB/DDB debugger support so you can look at
 a stack trace (t) and post this?  This will at least give us/you
 some idea on what is crashing...

No, running GENERIC kernel.


 Add minimally to your kernel build conf file:

 options DDB
 options KDB

 Rebuild, reboot, and test.  I'm not sure why a crash dump is not
 working.  Have you tried specifying your dump device in your kernel
 config file?

Hi,

First of all sorry for the delay, but my ISP is pissing me off since a
couple of days and I don't have either telephone, nor Internet
connection :S

Anyway, I managed to recompile the kernel with debugging support. I
provoked the panic and here is the trace:

db t
Tracing pid 2 tid 16 td 0xff0001096340
xpt_done() at xpt_done+0x54
cam_periph_runccb() at cam_periph_runccb+0x46
daprevent() at daprevent+0x80
daclose() at daclose+0x164
g_disk_access() at g_disk_access+0x107
g_access() at g_access+0x188
g_bsd_taste() at g_bsd_taste+0xdc
g_new_provider_event() at g_new_provider_event+0x75
g_run_events() at g_run_events+0x1c7
g_event_procbody() at g_event_procbody+0x56
fork_exit() at fork_exit+0x11e
fork_trampoline() at fork_trampoline()+0xe
--- trap 0, rip = 0, rsp = 0xa0574d30, rbp = 0 ---

The chain of events that leads to this panic is as follows:

1.- I plug the mp3 player in
2.- I see console messages about the device (size, transfer speed,
etc). It is assigned the da0 device
3.- I list /dev and ther is no da0 (kernel still busy doing something?)
4.- After waiting some time (even minutes) I unplug the mp3 player and
I got the crash.

Thanks in advance.


 Let us know,

 -aps

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


FreeBSD 7 64 bits kernel crash debugging

2008-07-02 Thread Fernando Apesteguía
Hi all,

I'm experiencing several kernel crashes with the GENERIC kernel and
with custom kernels as well. One of my MP3 players seems to be
recognized, but if I disconnect it from the USB port (even without
mounting the device), I got a kernel crash.

I've tried to follow the instructions at
http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug.html
I have dumpdev and dumpdir properly set to my swap partition (ad0s2b)
and to /var/crash.

However, during the next boot, I got a message that indicates it is
looking for a dump on such device but it couldn't find any.

How can I track this error?

Thanks in advance.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Can't load firmware

2008-06-25 Thread Fernando Apesteguía
Hi all,

I'm facing some problems with my IPW2200 NIC. It seems I can't load
the firmware (from system log):

firmware_get: failed to load firmware image iwi_bss

Both if_ipw and ipw_bss modules are loaded.

This very same computer works fine with linux, including loading the firmware.

I post this question here cause I didn't get any answer in the
freebsd-questions@ list and because I read in the iwi man page that
this shouldn't happen :).

Any help is appreciated.

Thanks in advance.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't load firmware

2008-06-25 Thread Fernando Apesteguía
On Wed, Jun 25, 2008 at 5:56 PM, Andrew Thompson [EMAIL PROTECTED] wrote:
 On Wed, Jun 25, 2008 at 05:27:47PM +0200, Fernando Apestegu?a wrote:
 Hi all,

 I'm facing some problems with my IPW2200 NIC. It seems I can't load
 the firmware (from system log):

 firmware_get: failed to load firmware image iwi_bss

 Both if_ipw and ipw_bss modules are loaded.

 This very same computer works fine with linux, including loading the 
 firmware.

 Have you set legal.intel_iwi.license_ack=1 in /boot/loader.conf?

No. I'm aware of the iwi man page, but after I did that I got a
message in /var/log/messages complaining about the
legal.intel_ipw.license_ack variable, not the one specified in the iwi
man page.

I set the last one to 1 but I got the firmware loading problem. If
this has changed, I suppose it should be fixed in the documentation
IMHO.

Any more ideas? Any debugging hints?

Thanks in advance



 Andrew

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't load firmware

2008-06-25 Thread Fernando Apesteguía
On Wed, Jun 25, 2008 at 7:10 PM, Fernando Apesteguía
[EMAIL PROTECTED] wrote:
 On Wed, Jun 25, 2008 at 5:56 PM, Andrew Thompson [EMAIL PROTECTED] wrote:
 On Wed, Jun 25, 2008 at 05:27:47PM +0200, Fernando Apestegu?a wrote:
 Hi all,

 I'm facing some problems with my IPW2200 NIC. It seems I can't load
 the firmware (from system log):

 firmware_get: failed to load firmware image iwi_bss

 Both if_ipw and ipw_bss modules are loaded.

 This very same computer works fine with linux, including loading the 
 firmware.

 Have you set legal.intel_iwi.license_ack=1 in /boot/loader.conf?

 No. I'm aware of the iwi man page, but after I did that I got a
 message in /var/log/messages complaining about the
 legal.intel_ipw.license_ack variable, not the one specified in the iwi
 man page.

 I set the last one to 1 but I got the firmware loading problem. If
 this has changed, I suppose it should be fixed in the documentation
 IMHO.

 Any more ideas? Any debugging hints?

 Thanks in advance

Oops, sorry I forgot: I'm using 7.0 RELEASE.

Thanks




 Andrew


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: RTL8168/8111 PCI express support

2008-06-12 Thread Fernando Apesteguía
On Thu, Jun 12, 2008 at 4:44 AM, Pyun YongHyeon [EMAIL PROTECTED] wrote:
 On Wed, Jun 11, 2008 at 09:13:24AM +0200, Fernando Apestegu?a wrote:
   On 6/11/08, Pyun YongHyeon [EMAIL PROTECTED] wrote:
On Tue, Jun 10, 2008 at 03:11:22PM -0700, Jeremy Chadwick wrote:
  On Tue, Jun 10, 2008 at 11:08:05PM +0200, Fernando Apestegu?a wrote:
   I sent this mail to freebsd-questions but I got no answer. I hope 
 you
   can help me.
  
   I got a computer with an RTL8168/8111 PCI Express NIC. It is shown 
 in
   pciconf but it is not seen by FreeBSD 7. I'm using i386 arch.
  
   I have re and rl drivers compiled in the kernel (stock GENERIC 
 kernel,
   actually).
  
   What do I need to make the NIC work properly?
 
  CC'ing PYUN YongHyeon, who should be able to help, since he helps
  maintain the driver.  :-)
   
I don't know which revision of RealTek controller you have. Just
knowing pciconf -lv is not enough. Since 7.0 didn't recognize
your controller I guess it could be newer revision from RealTek.
There is a WIP version that try to add support for newer
controllers. In order to try the WIP version you have to update to
latest 7-stable first and apply the following patch.
   
http://people.freebsd.org/~yongari/re/re.HEAD.20080610
   
The patch still have some issues but it should detect/recognize
your controller.
  
  
   It makes sense what you say about the new revision cause the whole
   computer is quite new. In any case I will paste the pciconf -lv
   output just to be sure of the controller I have.
  
   I already have the 7-stable system installed with the kernel sources
   installed from sysinstall. Do I need any update of the source code?
  

 If you use 7-stable, you may not have to update again.
 Just apply patche above and let me know the result.

Sorry. I was wrong. I'm using 7.0 Release and my sources are those
(taken from ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.0-RELEASE/src/)
Since I don't have NIC, I can't update my system to 7.0 stable.

If the changes involved are only on those two files
(sys/dev/re/if_re.c and sys/pci/if_rlreg.h) and no more -stable
changes are required, could it be possible to get the diff generated
against the -release sources? I already tried to apply the patch
against my sources, but I get a bunch of errors.

Otherwise I think I am a bit stuck unless you tell me how to update my
system without a working network.

Thanks in advance


   Thanks in advance.
  
   
 
  I'd recommend you start by providing pciconf -lv output here.
 
  --
  | Jeremy Chadwickjdc at parodius.com |
  | Parodius Networking   http://www.parodius.com/ |
  | UNIX Systems Administrator  Mountain View, CA, USA |
  | Making life hard for others since 1977.  PGP: 4BD6C0CB |
 

 --
 Regards,
 Pyun YongHyeon

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: RTL8168/8111 PCI express support

2008-06-11 Thread Fernando Apesteguía
On 6/11/08, Pyun YongHyeon [EMAIL PROTECTED] wrote:
 On Tue, Jun 10, 2008 at 03:11:22PM -0700, Jeremy Chadwick wrote:
   On Tue, Jun 10, 2008 at 11:08:05PM +0200, Fernando Apestegu?a wrote:
I sent this mail to freebsd-questions but I got no answer. I hope you
can help me.
   
I got a computer with an RTL8168/8111 PCI Express NIC. It is shown in
pciconf but it is not seen by FreeBSD 7. I'm using i386 arch.
   
I have re and rl drivers compiled in the kernel (stock GENERIC kernel,
actually).
   
What do I need to make the NIC work properly?
  
   CC'ing PYUN YongHyeon, who should be able to help, since he helps
   maintain the driver.  :-)

 I don't know which revision of RealTek controller you have. Just
 knowing pciconf -lv is not enough. Since 7.0 didn't recognize
 your controller I guess it could be newer revision from RealTek.
 There is a WIP version that try to add support for newer
 controllers. In order to try the WIP version you have to update to
 latest 7-stable first and apply the following patch.

 http://people.freebsd.org/~yongari/re/re.HEAD.20080610

 The patch still have some issues but it should detect/recognize
 your controller.


It makes sense what you say about the new revision cause the whole
computer is quite new. In any case I will paste the pciconf -lv
output just to be sure of the controller I have.

I already have the 7-stable system installed with the kernel sources
installed from sysinstall. Do I need any update of the source code?

Thanks in advance.


  
   I'd recommend you start by providing pciconf -lv output here.
  
   --
   | Jeremy Chadwickjdc at parodius.com |
   | Parodius Networking   http://www.parodius.com/ |
   | UNIX Systems Administrator  Mountain View, CA, USA |
   | Making life hard for others since 1977.  PGP: 4BD6C0CB |
  

 --
 Regards,
 Pyun YongHyeon

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


RTL8168/8111 PCI express support

2008-06-10 Thread Fernando Apesteguía
Hi all,

I sent this mail to freebsd-questions but I got no answer. I hope you
can help me.

I got a computer with an RTL8168/8111 PCI Express NIC. It is shown in
pciconf but it is not seen by FreeBSD 7. I'm using i386 arch.

I have re and rl drivers compiled in the kernel (stock GENERIC kernel,
actually).

What do I need to make the NIC work properly?
I tried to compile the Realtek's modified driver but I got a bunch of
errors when I tried to compile it (tested up to FreeBSD 6.0 only, they say)

Does this[1] anything to do with my problem?


Thanks in advance.


[1]http://groups.google.com/group/mailing.freebsd.stable/browse_thread/thread/aa93c58a9353ea1c
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mutex lock for filesystem list.

2008-01-18 Thread Fernando Apesteguía
On 1/13/08, Ed Schouten [EMAIL PROTECTED] wrote:
 * Fernando Apesteguía [EMAIL PROTECTED] wrote:
  I'm trying to write a patch to add a file to the linprocfs. This file
  provides the list of filesystems present in the kernel.
 
  Though I was able to create the file and traverse the list, it's
  clearly unsafe. I would like to know wich semaphore I should lock
  cause I can't find it in the kernel code.
 
  In addition I'd like to know if there is a book similar to the
  Understanding the Linux kernel, but for freebsd. What is the best
  information source to get introduced in the freebsd kernel programming
  (apart of the code itself)?

 You're probably looking through the mountlist? Then you need to make
 sure you lock the mountlist_mtx. See src/sys/kern/vfs_mount.c.

Hi,

My apologies for the delay with the reply by due to a failure in my
DSL line, I had no internet connection for several days :(

Actually I'm using vfsconf list. What's the difference between
mountlist and the one I'm using?

Best Regards


 --
  Ed Schouten [EMAIL PROTECTED]
  WWW: http://g-rave.nl/


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


mutex lock for filesystem list.

2008-01-13 Thread Fernando Apesteguía
Hi all,

I'm trying to write a patch to add a file to the linprocfs. This file
provides the list of filesystems present in the kernel.

Though I was able to create the file and traverse the list, it's
clearly unsafe. I would like to know wich semaphore I should lock
cause I can't find it in the kernel code.

In addition I'd like to know if there is a book similar to the
Understanding the Linux kernel, but for freebsd. What is the best
information source to get introduced in the freebsd kernel programming
(apart of the code itself)?

Thanks in advance
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Porting from Linux to FreeBSD (procfs question)

2008-01-03 Thread Fernando Apesteguía
Hi all,

I post my question in this list cause Ivan Voras ([EMAIL PROTECTED])
suggested that here I could find more help.

I have an application written in C + Gtk + Glib that gathers
information from procfs under Linux. Now, I'm trying to port this
application to FreeBSD (I'm working with 7.0 RC1).

I've been pointed to get rid of the procfs stuff in the freebsd code
and use sysctl instead. However, I can't find some of the information
that is present under /proc in Linux.

I can only get for the CPU for instance some small bits of info in
hw.model but I can't get the cache size, supported extensions, etc.
I have the same problem with the memory (how much memory is cached, in
buffers, marked as dirty, etc...).

How can I get all that information? Could you point me to some source
I can look at?

Is this information (that I suppose it is known by the kernel) somehow
exported to userland?

Here is a small list of the information the Linux application is
available to show:

- CPU info: (vendor, model, clock speed, stepping, cache size,
supported extensions)

- Memory: total, free, shared, cached, used in buffers, marked as dirty, etc..

- Devices: list of block and char devices

- Filesystems loaded in the kernel

- Network information (bytes sent and received, packets, errors, for each NIC)

- Loaded modules (sizes of the modules, if they are used by other modules...)

- Some kernel parameters (max files per process, semaphores, etc...)
I've seen this is fully covered with sysctl.

Thanks in advance and Happy New Year.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Porting from Linux to FreeBSD (procfs question)

2008-01-03 Thread Fernando Apesteguía
On Jan 3, 2008 8:50 PM, Dag-Erling Smørgrav [EMAIL PROTECTED] wrote:
 Fernando Apesteguía [EMAIL PROTECTED] writes:
  I have an application written in C + Gtk + Glib that gathers
  information from procfs under Linux. Now, I'm trying to port this
  application to FreeBSD (I'm working with 7.0 RC1).

 man linprocfs

Yes, I checked it. But although the cpuinfo file is quite close to the
original one in Linux, there are other important files missed.
That's because I'm trying to find the best approach.

Maybe a mix of both could be good: use the linxprocfs when it is
almost straightforward (in fact I could run the app, just changing few
lines) and sysctl when the linprocfs doesn't provide the information
that I need.

Cheers



 DES
 --
 Dag-Erling Smørgrav - [EMAIL PROTECTED]

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Porting from Linux to FreeBSD (procfs question)

2008-01-03 Thread Fernando Apesteguía
On Jan 3, 2008 9:53 PM, Ivan Voras [EMAIL PROTECTED] wrote:
 Fernando Apesteguía wrote:

  Maybe a mix of both could be good: use the linxprocfs when it is
  almost straightforward (in fact I could run the app, just changing few
  lines) and sysctl when the linprocfs doesn't provide the information
  that I need.

 Also, linprocfs is never mounted by default - this might or might not be
 an obstacle, depending on how user-friendly the application is (asking
 desktop users to alter their fstabs may be asking too much :) ).


I hadn't thought about it... but it's quite to the point. Maybe it
makes no sense to ask for a particular filesystem from a graphical
Gnome application...



___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]