Giter Club home page Giter Club logo

Comments (8)

qkaiser avatar qkaiser commented on August 30, 2024 1

@qkaiser starting to look into supporting custom compression algorithms. Do they use the same custom compression for everything, as in all data and metadata blocks?

As far as I remember, yes. The only place we've seen something different is when they encrypt/obfuscate headers. So yeah, same compression applied to both data and metadata blocks.

from backhand.

qkaiser avatar qkaiser commented on August 30, 2024 1

Looks like I need to add OpenWRT to the queue.

image

Is there a way to differentiate between a filesystem built with the patch and a filesystem built without the patch ? Any heuristics that you can use ?

from backhand.

qkaiser avatar qkaiser commented on August 30, 2024

Don't hesitate to reach out if you want some samples or support with this. I shared a table with squashfs v2, v3, v4, and non-standard format in our last talk (slide 35 at https://www.blackalps.ch/ba-22/files/talks/BlackAlps22-Kaiser.pdf).

from backhand.

wcampbell0x2a avatar wcampbell0x2a commented on August 30, 2024

Thanks! I'll see when I get around to this. But looks like a never ending adventure.

from backhand.

wcampbell0x2a avatar wcampbell0x2a commented on August 30, 2024

Some TP-Link gpl code has the following patch to the kernel

$ diff -bur ./fs/squashfs ~/projects/linux/fs/squashfs > patch
--- /fs/squashfs/xz_wrapper.c	2021-11-09 09:57:38.000000000 +0000
+++linux/fs/squashfs/xz_wrapper.c	2023-01-17 04:18:38.293147873 +0000
@@ -39,10 +39,8 @@
 };

 struct comp_opts {
-	__le32 flags;
-	__le16 bit_opts;
-	__le16 fb;
 	__le32 dictionary_size;
+	__le32 flags;
 };

 static void *squashfs_xz_init(struct squashfs_sb_info *msblk, void *buff,

from backhand.

wcampbell0x2a avatar wcampbell0x2a commented on August 30, 2024

@qkaiser starting to look into supporting custom compression algorithms. Do they use the same custom compression for everything, as in all data and metadata blocks?

from backhand.

wcampbell0x2a avatar wcampbell0x2a commented on August 30, 2024

Some TP-Link gpl code has the following patch to the kernel

$ diff -bur ./fs/squashfs ~/projects/linux/fs/squashfs > patch
--- /fs/squashfs/xz_wrapper.c	2021-11-09 09:57:38.000000000 +0000
+++linux/fs/squashfs/xz_wrapper.c	2023-01-17 04:18:38.293147873 +0000
@@ -39,10 +39,8 @@
 };

 struct comp_opts {
-	__le32 flags;
-	__le16 bit_opts;
-	__le16 fb;
 	__le32 dictionary_size;
+	__le32 flags;
 };

 static void *squashfs_xz_init(struct squashfs_sb_info *msblk, void *buff,

This is an openwrt patch: openwrt/openwrt@f97ad87. Looks like that... mistake is now fixed and that patch not active: https://github.com/openwrt/openwrt/tree/master/tools/squashfs4/patches.

from backhand.

wcampbell0x2a avatar wcampbell0x2a commented on August 30, 2024

Yep, its a different block length

from backhand.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.