Re: mdadm 2.6.3 segfaults on assembly (v1 superblocks)

2007-09-30 Thread martin f krafft
also sprach Neil Brown [EMAIL PROTECTED] [2007.09.24.0528 +0100]:
 Sure could.  Thanks for the report.
 
 This patch (already in .git) should fix it.

Apparently it does not, and it seems to be amd64-only since I saw it
on amd64 and a bunch of people reported success on i386:

  http://bugs.debian.org/444682

Any help appreciated. I don't have an amd64 system around for
another three weeks...

-- 
martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^.*|tr * mailto:; [EMAIL PROTECTED]
 
scientists will study your brain to learn
more about your distant cousin, man.
 
spamtraps: [EMAIL PROTECTED]


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)


[solved] Bug#444682: mdadm segfault at super1.c:1004

2007-09-30 Thread martin f. krafft
also sprach martin f krafft [EMAIL PROTECTED] [2007.09.30.1234 +0100]:
 Oh well, I think this is an amd64-specific problem. Daniel, are you
 around today to debug this? Or anyone else with amd64? I don't have
 an amd64 machine around to test this for another three weeks, so I'd
 really appreciate if someone else stepped in.

Okay, I did find one and I can reproduce. First thing to note:

#535 0x0041f07c in load_super1 (st=0x634030, fd=8, sbp=0x7fff9f4fefd0, 
devname=0x0) at super1.c:1005
#536 0x0041f07c in load_super1 (st=0x634030, fd=8, sbp=0x7fff9f4fefd0, 
devname=0x0) at super1.c:1005

load_super1 apparently recurses infinitely. Looking at the code:

  static int load_super1(struct supertype *st, int fd, void **sbp, char 
*devname)
  {
  unsigned long long dsize;
  unsigned long long sb_offset;
  struct mdp_superblock_1 *super;
  int uuid[4];
  struct bitmap_super_s *bsb;
  struct misc_dev_info *misc;

  if (st-ss == NULL || st-minor_version == -1) {
  int bestvers = -1;
  struct supertype tst;
  __u64 bestctime = 0;
  /* guess... choose latest ctime */
  tst.ss = super1;
  for (tst.minor_version = 0; tst.minor_version = 2 ; 
tst.minor_version++) {
  switch(load_super1(st, fd, sbp, devname)) {

I can't help but note that there is no way to break out of this
loop if (st-ss == NULL || st-minor_version == -1) is true when
it's called the first time.

So it turns out that I think Neil simply forgot to replace the first
argument by tst in commit a40b4fe, as the forthcoming patch does.

-- 
 .''`.   martin f. krafft [EMAIL PROTECTED]
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
 
because light travels faster than sound,
some people appear to be intelligent,
until you hear them speak.
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Fix segfault on assembly on amd64 with v1 superblocks

2007-09-30 Thread martin f. krafft
Commit a40b4fe introduced a temporary supertype variable tst, instead of
manipulating st directly. However, it was forgotton to pass tst into the
recursive load_super1 call, causing an infinite recursion.

Signed-off-by: martin f. krafft [EMAIL PROTECTED]
---
 super1.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/super1.c b/super1.c
index 52783e7..06c2655 100644
--- a/super1.c
+++ b/super1.c
@@ -1001,7 +1001,7 @@ static int load_super1(struct supertype *st, int fd, void 
**sbp, char *devname)
/* guess... choose latest ctime */
tst.ss = super1;
for (tst.minor_version = 0; tst.minor_version = 2 ; 
tst.minor_version++) {
-   switch(load_super1(st, fd, sbp, devname)) {
+   switch(load_super1(tst, fd, sbp, devname)) {
case 0: super = *sbp;
if (bestvers == -1 ||
bestctime  __le64_to_cpu(super-ctime)) {
-- 
1.5.3.1

-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Bug#444682: [PATCH] Fix segfault on assembly on amd64 with v1 superblocks

2007-09-30 Thread Daniel van Eeden
I've tested this patch and it works :)

Daniel


On Sun, 2007-09-30 at 13:22 +0100, martin f. krafft wrote:
 Commit a40b4fe introduced a temporary supertype variable tst, instead of
 manipulating st directly. However, it was forgotton to pass tst into the
 recursive load_super1 call, causing an infinite recursion.
 
 Signed-off-by: martin f. krafft [EMAIL PROTECTED]
 ---
  super1.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/super1.c b/super1.c
 index 52783e7..06c2655 100644
 --- a/super1.c
 +++ b/super1.c
 @@ -1001,7 +1001,7 @@ static int load_super1(struct supertype *st, int fd, 
 void **sbp, char *devname)
   /* guess... choose latest ctime */
   tst.ss = super1;
   for (tst.minor_version = 0; tst.minor_version = 2 ; 
 tst.minor_version++) {
 - switch(load_super1(st, fd, sbp, devname)) {
 + switch(load_super1(tst, fd, sbp, devname)) {
   case 0: super = *sbp;
   if (bestvers == -1 ||
   bestctime  __le64_to_cpu(super-ctime)) {

-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Backups w/ rsync

2007-09-30 Thread Michal Soltys

Wolfgang Denk wrote:

Dear Bill,

in message [EMAIL PROTECTED] you wrote:


Be aware that rsync is useful for making a *copy* of your files, which 
isn't always the best backup. If the goal is to preserve data and be 
able to recover in time of disaster, it's probably not optimal, while if 
you need frequent access to old or deleted files it's fine.


If you want to do real backups you should use real tools, like bacula
etc.



I wouldn't agree here. All depends on how you organize yuor things, write
scripts, and so on. It isn't any less real solution than amanda or bacula.
It's much more DIY solution though, so not everyone will be inclined to use it.

ps.
Sorry for offtopic. Last in this subject from me.

-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html